Kea 1.5.0
ctrl_dhcp6_srv.h
Go to the documentation of this file.
1// Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef CTRL_DHCPV6_SRV_H
8#define CTRL_DHCPV6_SRV_H
9
11#include <asiolink/asiolink.h>
12#include <cc/data.h>
15#include <dhcpsrv/timer_mgr.h>
16#include <dhcp6/dhcp6_srv.h>
17
18namespace isc {
19namespace dhcp {
20
26public:
27
31 ControlledDhcpv6Srv(uint16_t port = DHCP6_SERVER_PORT);
32
34 virtual ~ControlledDhcpv6Srv();
35
42 void init(const std::string& config_file);
43
55 loadConfigFile(const std::string& file_name);
56
61 void cleanup();
62
64 void shutdown();
65
88 processCommand(const std::string& command, isc::data::ConstElementPtr args);
89
104
114
119 return (server_);
120 }
121
122private:
123
130 static void sessionReader(void);
131
141 commandShutdownHandler(const std::string& command,
143
154 commandLibReloadHandler(const std::string& command,
156
167 commandConfigReloadHandler(const std::string& command,
169
179 commandConfigGetHandler(const std::string& command,
181
196 commandConfigWriteHandler(const std::string& command,
198
210 commandConfigSetHandler(const std::string& command,
212
224 commandConfigTestHandler(const std::string& command,
226
235 commandDhcpDisableHandler(const std::string& command,
237
245 commandDhcpEnableHandler(const std::string& command,
247
258 commandVersionGetHandler(const std::string& command,
260
270 commandBuildReportHandler(const std::string& command,
272
287 commandLeasesReclaimHandler(const std::string& command,
289
306 void reclaimExpiredLeases(const size_t max_leases, const uint16_t timeout,
307 const bool remove_lease,
308 const uint16_t max_unwarned_cycles);
309
310
319 void deleteExpiredReclaimedLeases(const uint32_t secs);
320
338 void dbReconnect(db::ReconnectCtlPtr db_reconnect_ctl);
339
356 bool dbLostCallback(db::ReconnectCtlPtr db_reconnect_ctl);
357
362 static ControlledDhcpv6Srv* server_;
363
365 isc::asiolink::IOService io_service_;
366
371 TimerMgrPtr timer_mgr_;
372};
373
374}; // namespace isc::dhcp
375}; // namespace isc
376
377#endif
Controlled version of the DHCPv6 server.
void init(const std::string &config_file)
Initializes the server.
void cleanup()
Performs cleanup, immediately before termination.
isc::data::ConstElementPtr checkConfig(isc::data::ConstElementPtr new_config)
Configuration checker.
static isc::data::ConstElementPtr processConfig(isc::data::ConstElementPtr new_config)
configuration processor
virtual ~ControlledDhcpv6Srv()
Destructor.
void shutdown()
Initiates shutdown procedure for the whole DHCPv6 server.
static ControlledDhcpv6Srv * getInstance()
returns pointer to the sole instance of Dhcpv6Srv
isc::data::ConstElementPtr loadConfigFile(const std::string &file_name)
Loads specific configuration file.
static isc::data::ConstElementPtr processCommand(const std::string &command, isc::data::ConstElementPtr args)
command processor
DHCPv6 server service.
Definition: dhcp6_srv.h:59
This file contains several functions and constants that are used for handling commands and responses ...
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:23
boost::shared_ptr< ReconnectCtl > ReconnectCtlPtr
Pointer to an instance of ReconnectCtl.
boost::shared_ptr< TimerMgr > TimerMgrPtr
Type definition of the shared pointer to TimerMgr.
Definition: timer_mgr.h:25
Defines the logger used by the top-level component of kea-dhcp-ddns.