2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[4106] Ported DHCPv4-over-DHCPv6 IPC code from fd4o6 private branch

This commit is contained in:
Francis Dupont
2015-10-31 04:56:08 +01:00
committed by Tomek Mrugalski
parent 104187287c
commit 89c8c17a16
17 changed files with 680 additions and 7 deletions

View File

@@ -373,15 +373,16 @@ namespace dhcp {
/// @return parser for specified global DHCPv4 parameter
/// @throw NotImplemented if trying to create a parser for unknown
/// config element
DhcpConfigParser* createGlobalDhcp4ConfigParser(const std::string& config_id,
ConstElementPtr element) {
DhcpConfigParser* createGlobalDhcp4ConfigParser(const std::string& config_id,
ConstElementPtr element) {
DhcpConfigParser* parser = NULL;
if ((config_id.compare("valid-lifetime") == 0) ||
(config_id.compare("renew-timer") == 0) ||
(config_id.compare("rebind-timer") == 0) ||
(config_id.compare("decline-probation-period") == 0) ) {
(config_id.compare("decline-probation-period") == 0) ||
(config_id.compare("dhcp4o6-port") == 0) ) {
parser = new Uint32Parser(config_id,
globalContext()->uint32_values_);
globalContext()->uint32_values_);
} else if (config_id.compare("interfaces-config") == 0) {
parser = new IfacesConfigParser4();
} else if (config_id.compare("subnet4") == 0) {
@@ -423,6 +424,7 @@ namespace dhcp {
///
/// - echo-client-id
/// - decline-probation-period
/// - dhcp4o6-port
void setGlobalParameters4() {
// Although the function is modest for now, it is certain that the number
// of global switches will increase over time, hence the name.
@@ -445,6 +447,15 @@ void setGlobalParameters4() {
} catch (...) {
// That's not really needed.
}
// Set the DHCPv4-over-DHCPv6 interserver port.
try {
uint32_t dhcp4o6_port = globalContext()->uint32_values_
->getOptionalParam("dhcp4o6-port", 0);
CfgMgr::instance().getStagingCfg()->setDhcp4o6Port(dhcp4o6_port);
} catch (...) {
// Ignore errors. This flag is optional
}
}
isc::data::ConstElementPtr