Kea  1.5.0
isc::dhcp::NetworkStateImpl Class Reference

Implementation of the NetworkState class. More...

+ Inheritance diagram for isc::dhcp::NetworkStateImpl:

Public Member Functions

 NetworkStateImpl (const NetworkState::ServerType &server_type)
 Constructor. More...
 
 ~NetworkStateImpl ()
 Destructor. More...
 
void createTimer (const unsigned int seconds)
 Creates a timer counting the time when enableAll should be automatically called. More...
 
void destroyTimer ()
 Destroys a timer if present. More...
 
void enableAll ()
 Enables DHCP service globally and per scopes. More...
 
void setDisableService (const bool disable)
 Globally disables or enables DHCP service. More...
 

Public Attributes

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...
 

Detailed Description

Implementation of the NetworkState class.

Definition at line 27 of file network_state.cc.

Constructor & Destructor Documentation

◆ NetworkStateImpl()

isc::dhcp::NetworkStateImpl::NetworkStateImpl ( const NetworkState::ServerType server_type)
inline

Constructor.

Definition at line 31 of file network_state.cc.

◆ ~NetworkStateImpl()

isc::dhcp::NetworkStateImpl::~NetworkStateImpl ( )
inline

Destructor.

Definition at line 37 of file network_state.cc.

References destroyTimer().

+ Here is the call graph for this function:

Member Function Documentation

◆ createTimer()

void isc::dhcp::NetworkStateImpl::createTimer ( const unsigned int  seconds)
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.

Parameters
secondsNumber of seconds to elapse before the enableAll is called.

Definition at line 65 of file network_state.cc.

References destroyTimer(), enableAll(), isc::asiolink::IntervalTimer::ONE_SHOT, and timer_mgr_.

+ Here is the call graph for this function:

◆ destroyTimer()

void isc::dhcp::NetworkStateImpl::destroyTimer ( )
inline

Destroys a timer if present.

Definition at line 76 of file network_state.cc.

References timer_mgr_.

Referenced by createTimer(), enableAll(), and ~NetworkStateImpl().

◆ enableAll()

void isc::dhcp::NetworkStateImpl::enableAll ( )
inline

Enables DHCP service globally and per scopes.

If delayed enabling DHCP service has been scheduled, it cancels it.

Todo:
Enable service for all subnets and networks here.

Definition at line 49 of file network_state.cc.

References destroyTimer(), and setDisableService().

Referenced by createTimer().

+ Here is the call graph for this function:

◆ setDisableService()

void isc::dhcp::NetworkStateImpl::setDisableService ( const bool  disable)
inline

Globally disables or enables DHCP service.

Definition at line 42 of file network_state.cc.

References globally_disabled_.

Referenced by enableAll().

Member Data Documentation

◆ disabled_networks_

NetworkState::Networks isc::dhcp::NetworkStateImpl::disabled_networks_

A list of networks for which the DHCP service has been disabled.

Definition at line 92 of file network_state.cc.

◆ disabled_subnets_

NetworkState::Subnets isc::dhcp::NetworkStateImpl::disabled_subnets_

A list of subnets for which the DHCP service has been disabled.

Definition at line 89 of file network_state.cc.

◆ globally_disabled_

bool isc::dhcp::NetworkStateImpl::globally_disabled_

A flag indicating if DHCP service is globally disabled.

Definition at line 86 of file network_state.cc.

Referenced by setDisableService().

◆ server_type_

NetworkState::ServerType isc::dhcp::NetworkStateImpl::server_type_

Server type.

Definition at line 83 of file network_state.cc.

◆ timer_mgr_

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 98 of file network_state.cc.

Referenced by createTimer(), and destroyTimer().


The documentation for this class was generated from the following file: