 |
Kea
1.5.0
|
Go to the documentation of this file.
19 #include <boost/shared_ptr.hpp>
20 #include <boost/noncopyable.hpp>
69 class CfgMgr :
public boost::noncopyable {
193 void revert(
const size_t index);
238 family_ = family == AF_INET ? AF_INET : AF_INET6;
268 void ensureCurrentAllocated();
271 std::string datadir_;
285 typedef std::list<SrvConfigPtr> SrvConfigList;
289 SrvConfigList configs_;
static CfgMgr & instance()
returns a single instance of Configuration Manager
static const size_t CONFIG_LIST_SIZE
A number of configurations held by CfgMgr.
Exception thrown when the same interface has been specified twice.
Defines elements for storing the names of client classes.
void setFamily(uint16_t family)
Sets address family (AF_INET or AF_INET6)
This is a base class for exceptions thrown from the DNS library module.
void setDataDir(const std::string &datadir)
Sets new data directory.
std::string getDataDir() const
returns path do the data directory
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
CfgMgr()
Protected constructor.
void setD2ClientConfig(D2ClientConfigPtr &new_config)
Updates the DHCP-DDNS client configuration to the given value.
void revert(const size_t index)
Reverts to one of the previous configurations.
void rollback()
Removes staging configuration.
uint16_t getFamily() const
Returns address family.
boost::shared_ptr< D2ClientConfig > D2ClientConfigPtr
Defines a pointer for D2ClientConfig instances.
DuplicateListeningIface(const char *file, size_t line, const char *what)
virtual ~CfgMgr()
virtual destructor
SrvConfigPtr getStagingCfg()
Returns a pointer to the staging configuration.
void commit()
Commits the staging configuration.
void clear()
Removes current, staging and all previous configurations.
D2ClientMgr isolates Kea from the details of being a D2 client.
SrvConfigPtr getCurrentCfg()
Returns a pointer to the current configuration.
D2ClientMgr & getD2ClientMgr()
Fetches the DHCP-DDNS manager.
const D2ClientConfigPtr & getD2ClientConfig() const
Fetches the DHCP-DDNS configuration pointer.
boost::shared_ptr< SrvConfig > SrvConfigPtr
Non-const pointer to the SrvConfig.
bool ddnsEnabled()
Convenience method for checking if DHCP-DDNS updates are enabled.