Kea 3.1.3
ctrl_dhcp6_srv.h
Go to the documentation of this file.
1// Copyright (C) 2012-2025 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/lease_mgr.h>
16#include <dhcpsrv/timer_mgr.h>
17#include <dhcp6/dhcp6_srv.h>
18
19namespace isc {
20namespace dhcp {
21
27public:
28
33 ControlledDhcpv6Srv(uint16_t server_port = DHCP6_SERVER_PORT,
34 uint16_t client_port = 0);
35
37 virtual ~ControlledDhcpv6Srv();
38
45 void init(const std::string& config_file);
46
64 loadConfigFile(const std::string& file_name);
65
70 void cleanup();
71
74 virtual void shutdownServer(int exit_value);
75
90
100
111
116 return (server_);
117 }
118
119private:
126 static void sessionReader(void);
127
137 commandShutdownHandler(const std::string& command,
139
150 commandConfigReloadHandler(const std::string& command,
152
162 commandConfigGetHandler(const std::string& command,
164
174 commandConfigHashGetHandler(const std::string& command,
176
191 commandConfigWriteHandler(const std::string& command,
193
204 commandConfigSetHandler(const std::string& command,
206
217 commandConfigTestHandler(const std::string& command,
219
228 commandDhcpDisableHandler(const std::string& command,
230
238 commandDhcpEnableHandler(const std::string& command,
240
251 commandVersionGetHandler(const std::string& command,
253
263 commandBuildReportHandler(const std::string& command,
265
280 commandLeasesReclaimHandler(const std::string& command,
282
293 commandSubnet6SelectTestHandler(const std::string& command,
295
305 commandServerTagGetHandler(const std::string& command,
307
318 commandConfigBackendPullHandler(const std::string& command,
320
330 commandStatusGetHandler(const std::string& command,
332
343 commandStatisticSetMaxSampleCountAllHandler(const std::string& command,
345
356 commandStatisticSetMaxSampleAgeAllHandler(const std::string& command,
358
369 commandLfcStartHandler(const std::string& command,
371
388 void reclaimExpiredLeases(const size_t max_leases, const uint16_t timeout,
389 const bool remove_lease,
390 const uint16_t max_unwarned_cycles);
391
400 void deleteExpiredReclaimedLeases(const uint32_t secs);
401
419 bool dbLostCallback(util::ReconnectCtlPtr db_reconnect_ctl);
420
432 bool dbRecoveredCallback(util::ReconnectCtlPtr db_reconnect_ctl);
433
444 bool dbFailedCallback(util::ReconnectCtlPtr db_reconnect_ctl);
445
453 void openSocketsFailedCallback(util::ReconnectCtlPtr reconnect_ctl);
454
466 void cbFetchUpdates(const SrvConfigPtr& srv_cfg,
467 boost::shared_ptr<unsigned> failure_count);
468
473 static ControlledDhcpv6Srv* server_;
474
479 TimerMgrPtr timer_mgr_;
480};
481
482} // namespace dhcp
483} // namespace isc
484
485#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 ...
An abstract API for lease database.
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.