diff options
author | Francis Dupont <fdupont@isc.org> | 2015-10-16 23:01:33 +0200 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2015-10-16 23:01:33 +0200 |
commit | 008b74a6ff58516aee92fa4eb89517fdb2d3aa22 (patch) | |
tree | bb8f0f2b70b8ae200e4c4160ffe177edd464fc87 /src/bin/dhcp6/ctrl_dhcp6_srv.cc | |
parent | [3978] spelling (diff) | |
download | kea-008b74a6ff58516aee92fa4eb89517fdb2d3aa22.tar.xz kea-008b74a6ff58516aee92fa4eb89517fdb2d3aa22.zip |
[3978] Tentative leases-reclaim command
Diffstat (limited to 'src/bin/dhcp6/ctrl_dhcp6_srv.cc')
-rw-r--r-- | src/bin/dhcp6/ctrl_dhcp6_srv.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index 91f983cf6a..f3247436ab 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -69,6 +69,16 @@ ControlledDhcpv6Srv::commandConfigReloadHandler(const string&, ConstElementPtr a return (processConfig(args)); } +ConstElementPtr +ControlledDhcpv6Srv::commandLeasesReclaimHandler(const string&, ConstElementPtr args) { + + + server_->alloc_engine_->reclaimExpiredLeases6(0, 0, true); + ConstElementPtr answer = isc::config::createAnswer(0, + "Leases successfully reclaimed/"); + return (answer); +} + isc::data::ConstElementPtr ControlledDhcpv6Srv::processCommand(const std::string& command, isc::data::ConstElementPtr args) { @@ -208,6 +218,9 @@ ControlledDhcpv6Srv::ControlledDhcpv6Srv(uint16_t port) /// @todo: register config-reload (see CtrlDhcpv4Srv::commandConfigReloadHandler) /// @todo: register libreload (see CtrlDhcpv4Srv::commandLibReloadHandler) + CommandMgr::instance().registerCommand("leases-reclaim", + boost::bind(&ControlledDhcpv6Srv::commandLeasesReclaimHandler, this, _1, _2)); + // Register statistic related commands CommandMgr::instance().registerCommand("statistic-get", boost::bind(&StatsMgr::statisticGetHandler, _1, _2)); @@ -247,6 +260,7 @@ ControlledDhcpv6Srv::~ControlledDhcpv6Srv() { // Deregister any registered commands CommandMgr::instance().deregisterCommand("shutdown"); + CommandMgr::instance().deregisterCommand("leases-reclaim"); CommandMgr::instance().deregisterCommand("statistic-get"); CommandMgr::instance().deregisterCommand("statistic-reset"); CommandMgr::instance().deregisterCommand("statistic-remove"); |