]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3604] Renamed the socket-type parameter to dhcp-socket-type.
authorMarcin Siodelski <marcin@isc.org>
Fri, 13 Feb 2015 10:43:48 +0000 (11:43 +0100)
committerMarcin Siodelski <marcin@isc.org>
Fri, 13 Feb 2015 10:43:48 +0000 (11:43 +0100)
doc/guide/config.xml
doc/guide/dhcp4-srv.xml
src/bin/dhcp4/dhcp4.spec
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/parsers/ifaces_config_parser.cc
src/lib/dhcpsrv/parsers/ifaces_config_parser.h
src/lib/dhcpsrv/tests/ifaces_config_parser_unittest.cc

index 5214986511095c7c80c53117ecff9a7e1f3f41b6..565c7fa49a7792218170a03fbd3c57f9309fcfee 100644 (file)
@@ -58,7 +58,7 @@
 "Dhcp4": {
     "interfaces-config": {
         "interfaces": [ "eth0" ],
-        "socket-type": "raw"
+        "dhcp-socket-type": "raw"
     },
     "valid-lifetime": 4000,
     "renew-timer": 1000,
index f0864e51271883e7f73bf02013be3a493f7d5bff..98b5160f0294a7c2671b71ae8941f5de80d1a6fd 100644 (file)
@@ -415,16 +415,16 @@ temporarily override a list of interface names and listen on all interfaces.
 "Dhcp4": {
     "interfaces-config": {
         "interfaces": [ <userinput>"eth1", "eth3"</userinput> ],
-        "socket-type": "datagram"
+        "dhcp-socket-type": "datagram"
     },
     ...
 }
   </screen>
-  The <command>socket-type</command> specifies that the datagram sockets will
+  The <command>dhcp-socket-type</command> specifies that the datagram sockets will
   be opened on all interfaces on which the server listens, i.e. "eth1" and
-  "eth3" in our case. If the <command>socket-type</command> is set to
+  "eth3" in our case. If the <command>dhcp-socket-type</command> is set to
   <userinput>raw</userinput>, it configures the server to use raw sockets
-  instead. If the <command>socket-type</command> value is not specified, the
+  instead. If the <command>dhcp-socket-type</command> value is not specified, the
   default value <userinput>raw</userinput> is used.
   </para>
 
index dc60e82322a577e2be2c940b286e55efb08d6b69..56be067d4baff4441ff02f199b9f0aff72963e9a 100644 (file)
@@ -36,7 +36,7 @@
             }
         },
 
-        { "item_name": "socket-type",
+        { "item_name": "dhcp-socket-type",
           "item_type": "string",
           "item_optional": true,
           "item_default": ""
index 4a05114e311e65885367db931982ad06f78dfaad..0d94ac3226873271e9e19b227a10ca64d4cf1919 100644 (file)
@@ -99,9 +99,9 @@ This is a debug message reporting that the DHCP configuration manager has
 returned the specified IPv6 subnet when given the address hint specified
 because it is the only subnet defined.
 
-% DHCPSRV_CFGMGR_SOCKET_TYPE_DEFAULT "socket-type" not specified , using default socket type %1
+% DHCPSRV_CFGMGR_SOCKET_TYPE_DEFAULT "dhcp-socket-type" not specified , using default socket type %1
 This informational message is logged when the administrator hasn't
-specified the "socket-type" parameter in configuration for interfaces.
+specified the "dhcp-socket-type" parameter in configuration for interfaces.
 In such case, the default socket type will be used.
 
 % DHCPSRV_CFGMGR_SOCKET_RAW_UNSUPPORTED use of raw sockets is unsupported on this OS, datagram sockets will be used
index 46eff500cbf9226c94ff6e08c0825d4ff521b0b8..ae2d0cd69476129266566674794f1c8f02ea0c7d 100644 (file)
@@ -92,7 +92,7 @@ IfacesConfigParser4::build(isc::data::ConstElementPtr ifaces_config) {
     bool socket_type_specified = false;
     BOOST_FOREACH(ConfigPair element, ifaces_config->mapValue()) {
         try {
-            if (element.first == "socket-type") {
+            if (element.first == "dhcp-socket-type") {
                 cfg->useSocketType(AF_INET, element.second->stringValue());
                 socket_type_specified = true;
 
index 8e997589ac93edf04b69318536ab0b945eae9c62..207fe127d6d8f67e92fab64847594bcaa79b88a0 100644 (file)
@@ -129,7 +129,7 @@ public:
     ///
     /// Internally it invokes the @c InterfaceConfigParser::build to parse
     /// generic parameters. In addition, it parses the following parameters:
-    /// - socket-type
+    /// - dhcp-socket-type
     ///
     /// @param ifaces_config A data element holding configuration of
     /// interfaces.
index 6bd3fc194682205522ee89f38e4bc11b022d5bec..e0a1b5d30db6d769630af70d151136edb9608dfd 100644 (file)
@@ -103,7 +103,7 @@ TEST_F(IfacesConfigParserTest, socketTypeRaw) {
 
     // Configuration with a raw socket selected.
     std::string config = "{ ""\"interfaces\": [ ],"
-        " \"socket-type\": \"raw\" }";
+        " \"dhcp-socket-type\": \"raw\" }";
 
     ElementPtr config_element = Element::fromJSON(config);
 
@@ -128,7 +128,7 @@ TEST_F(IfacesConfigParserTest, socketTypeDatagram) {
 
     // Configuration with a datagram socket selected.
     std::string config = "{ ""\"interfaces\": [ ],"
-        " \"socket-type\": \"datagram\" }";
+        " \"dhcp-socket-type\": \"datagram\" }";
 
     ElementPtr config_element = Element::fromJSON(config);
 
@@ -149,14 +149,14 @@ TEST_F(IfacesConfigParserTest, socketTypeInvalid) {
     // For DHCPv4 we only accept the raw socket or datagram socket.
     IfacesConfigParser4 parser4;
     std::string config = "{ \"interfaces\": [ ],"
-        "\"socket-type\": \"default\" }";
+        "\"dhcp-socket-type\": \"default\" }";
     ElementPtr config_element = Element::fromJSON(config);
     ASSERT_THROW(parser4.build(config_element), DhcpConfigError);
 
     // For DHCPv6 we don't accept any socket type.
     IfacesConfigParser6 parser6;
     config = "{ \"interfaces\": [ ],"
-        " \"socket-type\": \"datagram\" }";
+        " \"dhcp-socket-type\": \"datagram\" }";
     config_element = Element::fromJSON(config);
     ASSERT_THROW(parser6.build(config_element), DhcpConfigError);
 }