"Dhcp4": {
"interfaces-config": {
"interfaces": [ "eth0" ],
- "socket-type": "raw"
+ "dhcp-socket-type": "raw"
},
"valid-lifetime": 4000,
"renew-timer": 1000,
"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>
}
},
- { "item_name": "socket-type",
+ { "item_name": "dhcp-socket-type",
"item_type": "string",
"item_optional": true,
"item_default": ""
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
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;
///
/// 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.
// Configuration with a raw socket selected.
std::string config = "{ ""\"interfaces\": [ ],"
- " \"socket-type\": \"raw\" }";
+ " \"dhcp-socket-type\": \"raw\" }";
ElementPtr config_element = Element::fromJSON(config);
// Configuration with a datagram socket selected.
std::string config = "{ ""\"interfaces\": [ ],"
- " \"socket-type\": \"datagram\" }";
+ " \"dhcp-socket-type\": \"datagram\" }";
ElementPtr config_element = Element::fromJSON(config);
// 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);
}