Kea
1.9.9-git
|
Implementation of the NetworkState
class.
More...
Public Member Functions | |
NetworkStateImpl (const NetworkState::ServerType &server_type) | |
Constructor. More... | |
~NetworkStateImpl () | |
Destructor. More... | |
void | createTimer (const unsigned int seconds, const NetworkState::Origin &origin) |
Creates a timer counting the time when enableAll should be automatically called. More... | |
void | destroyTimer (const NetworkState::Origin &origin) |
Destroys a timer if present. More... | |
void | enableAll (const NetworkState::Origin &origin) |
Enables DHCP service globally and per scopes. More... | |
void | reset (const NetworkState::Origin &origin) |
Reset internal counters for a specific origin. More... | |
void | setDisableService (const bool disable, const NetworkState::Origin &origin) |
Sets appropriate disabled or enabled DHCP service state for the respective origin. More... | |
Public Attributes | |
uint32_t | disabled_by_db_connection_ |
Flag which indicates the state has been disabled by a DB connection loss. More... | |
bool | disabled_by_ha_command_ |
Flag which indicates the state has been disabled by the HA command. More... | |
bool | disabled_by_user_command_ |
Flag which indicates the state has been disabled by an user command. More... | |
NetworkState::Networks | disabled_networks_ |
A list of networks for which the DHCP service has been disabled. More... | |
NetworkState::Subnets | disabled_subnets_ |
A list of subnets for which the DHCP service has been disabled. More... | |
bool | globally_disabled_ |
A flag indicating if DHCP service is globally disabled. More... | |
NetworkState::ServerType | server_type_ |
Server type. More... | |
TimerMgrPtr | timer_mgr_ |
A pointer to the common timer manager. More... | |
Implementation of the NetworkState
class.
Definition at line 31 of file network_state.cc.
|
inline |
Constructor.
Definition at line 35 of file network_state.cc.
|
inline |
Destructor.
Definition at line 43 of file network_state.cc.
|
inline |
Creates a timer counting the time when enableAll
should be automatically called.
If the timer has been already scheduled, it is destroyed and replaced with a new timer.
seconds | Number of seconds to elapse before the enableAll is called. |
origin | The origin of the state transition. |
Definition at line 158 of file network_state.cc.
References isc_throw, and isc::asiolink::IntervalTimer::ONE_SHOT.
|
inline |
Destroys a timer if present.
origin | The origin of the state transition. |
Definition at line 188 of file network_state.cc.
References isc_throw.
|
inline |
Enables DHCP service globally and per scopes.
If delayed enabling DHCP service has been scheduled, it cancels it.
origin | The origin of the state transition. |
Definition at line 141 of file network_state.cc.
|
inline |
Reset internal counters for a specific origin.
origin | The origin of the state transition. |
Definition at line 113 of file network_state.cc.
References isc_throw.
|
inline |
Sets appropriate disabled or enabled DHCP service state for the respective origin.
disable | The value of the flag used to perform the transition. |
origin | The origin of the state transition. |
Definition at line 60 of file network_state.cc.
References isc_throw.
uint32_t isc::dhcp::NetworkStateImpl::disabled_by_db_connection_ |
Flag which indicates the state has been disabled by a DB connection loss.
Definition at line 237 of file network_state.cc.
bool isc::dhcp::NetworkStateImpl::disabled_by_ha_command_ |
Flag which indicates the state has been disabled by the HA command.
Definition at line 233 of file network_state.cc.
bool isc::dhcp::NetworkStateImpl::disabled_by_user_command_ |
Flag which indicates the state has been disabled by an user command.
Definition at line 229 of file network_state.cc.
NetworkState::Networks isc::dhcp::NetworkStateImpl::disabled_networks_ |
A list of networks for which the DHCP service has been disabled.
Definition at line 219 of file network_state.cc.
NetworkState::Subnets isc::dhcp::NetworkStateImpl::disabled_subnets_ |
A list of subnets for which the DHCP service has been disabled.
Definition at line 216 of file network_state.cc.
bool isc::dhcp::NetworkStateImpl::globally_disabled_ |
A flag indicating if DHCP service is globally disabled.
Definition at line 213 of file network_state.cc.
NetworkState::ServerType isc::dhcp::NetworkStateImpl::server_type_ |
Server type.
Definition at line 210 of file network_state.cc.
TimerMgrPtr isc::dhcp::NetworkStateImpl::timer_mgr_ |
A pointer to the common timer manager.
This pointer is held here to make sure that the timer manager is not destroyed before an instance of this class is destroyed.
Definition at line 225 of file network_state.cc.