13#include <boost/scoped_ptr.hpp>
14#include <boost/shared_ptr.hpp>
22class NetworkStateImpl;
155 unsigned int origin);
216 boost::shared_ptr<NetworkStateImpl> impl_;
219 const boost::scoped_ptr<std::mutex> mutex_;
Controls the DHCP service enabling status.
static const unsigned int DB_CONNECTION
The network state is being altered by the DB connection recovery mechanics.
void selectiveDisable(const NetworkState::Subnets &subnets)
Disable DHCP service for selected subnets.
std::set< SubnetID > Subnets
Type of the container holding collection of subnet identifiers.
NetworkState()
Constructor.
virtual isc::data::ElementPtr toElement() const
The network state as Element.
static const unsigned int USER_COMMAND
Origin of the network state transition.
std::set< std::string > Networks
Type of the container holding collection of shared network names.
static const unsigned int HA_LOCAL_COMMAND
The network state is being altered by an HA internal command.
bool isDelayedEnableService() const
Checks if delayed enabling of DHCP services is scheduled.
static const unsigned int HA_REMOTE_COMMAND
The network state is being altered by a "dhcp-disable" or "dhcp-enable" command sent by a HA partner.
void resetForDbConnection()
Reset internal counters for database connection.
void resetForLocalCommands()
Reset origins for local commands.
void selectiveEnable(const NetworkState::Subnets &subnets)
Enable DHCP service for selected subnets.
void enableService(unsigned int origin)
Enable the DHCP service state for respective transition origin.
void disableService(unsigned int origin)
Disable the DHCP service state for respective transition origin.
bool isServiceEnabled() const
Checks if the DHCP service is globally enabled.
void delayedEnableService(const unsigned int seconds, unsigned int origin)
Schedules enabling DHCP service in the future.
void resetForRemoteCommands()
Reset origins for remote commands.
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< NetworkState > NetworkStatePtr
Pointer to the NetworkState object.
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.