Kea 2.7.1
ctrl_dhcp6_srv.h
Go to the documentation of this file.
1// Copyright (C) 2012-2024 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>
14#include <util/reconnect_ctl.h>
15#include <dhcpsrv/timer_mgr.h>
16#include <dhcp6/dhcp6_srv.h>
17
18namespace isc {
19namespace dhcp {
20
26public:
27
32 ControlledDhcpv6Srv(uint16_t server_port = DHCP6_SERVER_PORT,
33 uint16_t client_port = 0);
34
36 virtual ~ControlledDhcpv6Srv();
37
44 void init(const std::string& config_file);
45
63 loadConfigFile(const std::string& file_name);
64
69 void cleanup();
70
73 virtual void shutdownServer(int exit_value);
74
89
99
110
115 return (server_);
116 }
117
118private:
125 static void sessionReader(void);
126
136 commandShutdownHandler(const std::string& command,
138
149 commandConfigReloadHandler(const std::string& command,
151
161 commandConfigGetHandler(const std::string& command,
163
173 commandConfigHashGetHandler(const std::string& command,
175
190 commandConfigWriteHandler(const std::string& command,
192
203 commandConfigSetHandler(const std::string& command,
205
216 commandConfigTestHandler(const std::string& command,
218
227 commandDhcpDisableHandler(const std::string& command,
229
237 commandDhcpEnableHandler(const std::string& command,
239
250 commandVersionGetHandler(const std::string& command,
252
262 commandBuildReportHandler(const std::string& command,
264
279 commandLeasesReclaimHandler(const std::string& command,
281
291 commandServerTagGetHandler(const std::string& command,
293
304 commandConfigBackendPullHandler(const std::string& command,
306
316 commandStatusGetHandler(const std::string& command,
318
329 commandStatisticSetMaxSampleCountAllHandler(const std::string& command,
331
342 commandStatisticSetMaxSampleAgeAllHandler(const std::string& command,
344
361 void reclaimExpiredLeases(const size_t max_leases, const uint16_t timeout,
362 const bool remove_lease,
363 const uint16_t max_unwarned_cycles);
364
373 void deleteExpiredReclaimedLeases(const uint32_t secs);
374
392 bool dbLostCallback(util::ReconnectCtlPtr db_reconnect_ctl);
393
405 bool dbRecoveredCallback(util::ReconnectCtlPtr db_reconnect_ctl);
406
417 bool dbFailedCallback(util::ReconnectCtlPtr db_reconnect_ctl);
418
426 void openSocketsFailedCallback(util::ReconnectCtlPtr reconnect_ctl);
427
439 void cbFetchUpdates(const SrvConfigPtr& srv_cfg,
440 boost::shared_ptr<unsigned> failure_count);
441
446 static ControlledDhcpv6Srv* server_;
447
452 TimerMgrPtr timer_mgr_;
453};
454
455} // namespace dhcp
456} // namespace isc
457
458#endif
Controlled version of the DHCPv6 server.
void init(const std::string &config_file)
Initializes the server.
void cleanup()
Performs cleanup, immediately before termination.
static isc::data::ConstElementPtr finishConfigHookLibraries(isc::data::ConstElementPtr config)
Configuration checker for hook libraries.
virtual ~ControlledDhcpv6Srv()
Destructor.
static isc::data::ConstElementPtr processConfig(isc::data::ConstElementPtr config)
Configuration processor.
virtual void shutdownServer(int exit_value)
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)
Configure DHCPv6 server using the configuration file specified.
static isc::data::ConstElementPtr checkConfig(isc::data::ConstElementPtr config)
Configuration checker.
ControlledDhcpv6Srv(uint16_t server_port=DHCP6_SERVER_PORT, uint16_t client_port=0)
Constructor.
DHCPv6 server service.
Definition dhcp6_srv.h:66
This file contains several functions and constants that are used for handling commands and responses ...
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
boost::shared_ptr< TimerMgr > TimerMgrPtr
Type definition of the shared pointer to TimerMgr.
Definition timer_mgr.h:27
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
boost::shared_ptr< ReconnectCtl > ReconnectCtlPtr
Pointer to an instance of ReconnectCtl.
Defines the logger used by the top-level component of kea-lfc.