![]() |
Kea 3.1.1
|
Ping Check Manager. More...
#include <ping_check_mgr.h>
Public Member Functions | |
PingCheckMgr () | |
Constructor. | |
PingCheckMgr (uint32_t num_threads, uint32_t min_echos=1, uint32_t reply_timeout=100) | |
Constructor. | |
virtual | ~PingCheckMgr () |
Destructor. | |
void | cancelExpirationTimer () |
Cancels the expiration timer (thread safe). | |
void | cancelExpirationTimerInternal () |
Cancels the expiration timer. | |
virtual void | channelShutdown () |
Callback passed to PingChannel to invoke when it shuts down. | |
void | checkPermissions () |
Check if the current thread can perform thread pool state transition. | |
bool | checkSuspended () |
Checks if operations are currently suspended due to NetworkState. | |
bool | checkSuspendedInternal () |
Checks if operations are currently suspended due to NetworkState. | |
void | configure (data::ConstElementPtr params) |
Configure the PingCheckMgr. | |
virtual PingChannelPtr | createChannel (asiolink::IOServicePtr io_service) |
Creates a ping channel instance. | |
void | doNextEcho (const PingContextPtr &context) |
Position a context to do another ping test. | |
virtual void | expirationTimedOut () |
Callback passed to expiration timer to invoke on timeout. | |
void | finishFree (const PingContextPtr &context) |
Processes a context whose address has been deemed free to use. | |
void | flush (bool finish_free=false) |
Flushes the ping context store. | |
const PingCheckConfigPtr | getGlobalConfig () const |
Fetches the current, global configuration parameters. | |
isc::asiolink::IOServicePtr | getIOService () |
Get the hook I/O service. | |
TimeStamp | getNextExpiry () |
Fetches the time at which expiration timer will next expire. | |
const PingCheckConfigPtr | getScopedConfig (dhcp::Lease4Ptr &lease) |
Fetches the current, scoped configuration parameters. | |
void | handleEchoReply (const ICMPMsgPtr &echo_reply) |
Process an ECHO REPLY message. | |
void | handleTargetUnreachable (const ICMPMsgPtr &unreachable) |
Process an UNREACHABLE message. | |
bool | isPaused () |
Indicates if the thread pool is paused. | |
bool | isRunning () |
Indicates if the thread pool is running. | |
bool | isStopped () |
Indicates if the thread pool is stopped. | |
virtual bool | nextToSend (asiolink::IOAddress &next) |
Callback passed to PingChannel to use to retrieve the next address to check. | |
void | pause () |
Pause PingChannel operations. | |
virtual size_t | processExpiredSince (const TimeStamp &since=PingContext::now()) |
Performs expiration processing for contexts whose WAITING_FOR_REPLY states expired prior to a given point in time. | |
virtual void | replyReceived (const ICMPMsgPtr &reply) |
Callback passed to PingChannel to invoke when an ICMP reply has been received. | |
void | resume () |
Resume PingChannel operations. | |
virtual void | sendCompleted (const ICMPMsgPtr &echo, bool send_failed) |
Callback passed to PingChannel to invoke when an ECHO REQUEST send has completed. | |
void | setIOService (isc::asiolink::IOServicePtr io_service) |
Set the hook I/O service. | |
virtual void | setNextExpiration () |
Updates the expiration timer (thread safe). | |
virtual void | setNextExpirationInternal () |
Updates the expiration timer. | |
virtual hooks::CalloutHandle::CalloutNextStep | shouldPing (dhcp::Lease4Ptr &lease, dhcp::Pkt4Ptr &query, dhcp::Lease4Ptr &old_lease, dhcp::ConstHostPtr host, const PingCheckConfigPtr &config) |
Determines whether or not a lease should be ping checked. | |
void | start () |
Start PingChannel operations. | |
void | startPing (dhcp::Lease4Ptr &lease, dhcp::Pkt4Ptr &query, hooks::ParkingLotHandlePtr &parking_lot) |
Initiates a ping check for a given lease and its associated DHCPDISCOVER packet. | |
void | startPing (dhcp::Lease4Ptr &lease, dhcp::Pkt4Ptr &query, hooks::ParkingLotHandlePtr &parking_lot, const PingCheckConfigPtr &config) |
Initiates a ping check for a given lease and its associated DHCPDISCOVER packet. | |
void | startService (dhcp::NetworkStatePtr network_state) |
Performs a deferred start by posting an invocation of start() to the given IOService. | |
void | startSingleThreaded () |
Start single-threaded PingChannel operations. | |
void | stop () |
Stop PingChannel operations. | |
void | stopService (bool finish_free=false) |
Shuts down the manager's channel, flushes the store. | |
void | updateSubnetConfig (dhcp::SrvConfigPtr server_config) |
Update the cache of subnet ping check configurations. | |
Protected Attributes | |
PingChannelPtr | channel_ |
Channel that conducts ICMP messaging. | |
ConfigCachePtr | config_cache_ |
Warehouses parsed global and subnet configuration. | |
asiolink::IntervalTimerPtr | expiration_timer_ |
Timer which tracks the next expiration event. | |
isc::asiolink::IOServicePtr | io_service_ |
The hook I/O service. | |
const boost::scoped_ptr< std::mutex > | mutex_ |
The mutex used to protect internal state. | |
dhcp::NetworkStatePtr | network_state_ |
Tracks whether or not the server is processing DHCP packets. | |
TimeStamp | next_expiry_ |
TimeStamp of the next expiration event. | |
PingContextStorePtr | store_ |
In-memory store of PingContexts. | |
bool | suspended_ |
Indicates whether or not operations have been suspended. | |
asiolink::IoServiceThreadPoolPtr | thread_pool_ |
Thread pool used when running multi-threaded. | |
Ping Check Manager.
PinCheckMgr carries out the higher order management of requests for ping checks from the server. It is a singleton, instantiated when the library is loaded. It is responsible for:
Definition at line 47 of file ping_check_mgr.h.
|
explicit |
Constructor.
Definition at line 30 of file ping_check_mgr.cc.
References channel_, config_cache_, io_service_, mutex_, store_, suspended_, and thread_pool_.
isc::ping_check::PingCheckMgr::PingCheckMgr | ( | uint32_t | num_threads, |
uint32_t | min_echos = 1, | ||
uint32_t | reply_timeout = 100 ) |
Constructor.
This constructor is used in testing. It permits setting some basic behavior parameters directly, rather than requiring calls to configure()
.
num_threads | number of threads to use in the thread pool (0 means follow core thread pool size). |
min_echos | minimum number of ECHO REQUESTs sent without replies received required to declare an address free to offer. Defaults to 1, must be greater than zero. |
reply_timeout | maximum number of milliseconds to wait for an ECHO REPLY after an ECHO REQUEST has been sent. Defaults to 100. |
Definition at line 39 of file ping_check_mgr.cc.
References channel_, config_cache_, io_service_, mutex_, store_, suspended_, and thread_pool_.
|
virtual |
Destructor.
Definition at line 55 of file ping_check_mgr.cc.
References stop().
void isc::ping_check::PingCheckMgr::cancelExpirationTimer | ( | ) |
Cancels the expiration timer (thread safe).
Definition at line 452 of file ping_check_mgr.cc.
References cancelExpirationTimerInternal(), and mutex_.
Referenced by pause(), and stop().
void isc::ping_check::PingCheckMgr::cancelExpirationTimerInternal | ( | ) |
Cancels the expiration timer.
Definition at line 458 of file ping_check_mgr.cc.
References isc::ping_check::PingContext::EMPTY_TIME(), expiration_timer_, and next_expiry_.
Referenced by cancelExpirationTimer(), and setNextExpirationInternal().
|
virtual |
Callback passed to PingChannel to invoke when it shuts down.
Logs the shutdown and then posts a call to stopService()
to the main IOService.
Definition at line 365 of file ping_check_mgr.cc.
References io_service_, LOG_ERROR, isc::ping_check::ping_check_logger, PING_CHECK_MGR_CHANNEL_DOWN, and stopService().
Referenced by createChannel().
void isc::ping_check::PingCheckMgr::checkPermissions | ( | ) |
Check if the current thread can perform thread pool state transition.
MultiThreadingInvalidOperation | if the state transition is done on any of the worker threads. |
Definition at line 644 of file ping_check_mgr.cc.
References LOG_ERROR, isc::ping_check::ping_check_logger, PING_CHECK_PAUSE_ILLEGAL, PING_CHECK_PAUSE_PERMISSIONS_FAILED, thread_pool_, and isc::Exception::what().
Referenced by start().
bool isc::ping_check::PingCheckMgr::checkSuspended | ( | ) |
Checks if operations are currently suspended due to NetworkState.
Thread-safe wrapper around checkSuspendedInternal().
Definition at line 537 of file ping_check_mgr.cc.
References checkSuspendedInternal(), and mutex_.
Referenced by nextToSend(), replyReceived(), sendCompleted(), and startPing().
bool isc::ping_check::PingCheckMgr::checkSuspendedInternal | ( | ) |
Checks if operations are currently suspended due to NetworkState.
If DHCP service is enabled, operations are not suspended and the function returns false. Otherwise operations, if not already suspended, are suspended by flushing the PingContext store and the function returns true. The queries for flushed contexts are dropped from parking and thus their offers discarded.
Definition at line 543 of file ping_check_mgr.cc.
References flush(), network_state_, and suspended_.
Referenced by checkSuspended(), expirationTimedOut(), and setNextExpiration().
void isc::ping_check::PingCheckMgr::configure | ( | data::ConstElementPtr | params | ) |
Configure the PingCheckMgr.
params | map containing the hook library parameters. |
BadValue | and similar exceptions on error. |
Definition at line 60 of file ping_check_mgr.cc.
References config_cache_, isc_throw, and Element::map.
|
virtual |
Creates a ping channel instance.
io_service | IOService that will drive the channel. |
Definition at line 631 of file ping_check_mgr.cc.
References channelShutdown(), nextToSend(), replyReceived(), and sendCompleted().
Referenced by start(), and startSingleThreaded().
void isc::ping_check::PingCheckMgr::doNextEcho | ( | const PingContextPtr & | context | ) |
Position a context to do another ping test.
context | context to process. |
Definition at line 399 of file ping_check_mgr.cc.
References isc::log::DBGLVL_TRACE_DETAIL, LOG_DEBUG, isc::ping_check::ping_check_logger, PING_CHECK_MGR_NEXT_ECHO_SCHEDULED, and store_.
Referenced by processExpiredSince().
|
virtual |
Callback passed to expiration timer to invoke on timeout.
Definition at line 466 of file ping_check_mgr.cc.
References channel_, checkSuspendedInternal(), isc::ping_check::PingContext::EMPTY_TIME(), mutex_, next_expiry_, processExpiredSince(), and setNextExpirationInternal().
Referenced by setNextExpirationInternal().
void isc::ping_check::PingCheckMgr::finishFree | ( | const PingContextPtr & | context | ) |
Processes a context whose address has been deemed free to use.
context | context to process. |
Definition at line 339 of file ping_check_mgr.cc.
References isc::log::DBGLVL_TRACE_BASIC, LOG_DEBUG, isc::ping_check::ping_check_logger, PING_CHECK_MGR_LEASE_FREE_TO_USE, store_, and isc::ping_check::PingContext::TARGET_FREE.
Referenced by flush(), handleTargetUnreachable(), processExpiredSince(), and sendCompleted().
void isc::ping_check::PingCheckMgr::flush | ( | bool | finish_free = false | ) |
Flushes the ping context store.
This function iterates over the contexts in the store and then either invokes finishFree() or drops their queries from parking depending upon finish_free parameter. It assumes the operations have ceased (i.e. thread pool is not running).
finish_free | if true finishFree() will be invoke on all remaining contexts in the store, otherwise their queries are simply dropped from the parking lot. |
Definition at line 781 of file ping_check_mgr.cc.
References finishFree(), and store_.
Referenced by checkSuspendedInternal(), and stopService().
const PingCheckConfigPtr isc::ping_check::PingCheckMgr::getGlobalConfig | ( | ) | const |
Fetches the current, global configuration parameters.
Definition at line 92 of file ping_check_mgr.cc.
References config_cache_.
Referenced by startPing().
|
inline |
Get the hook I/O service.
Definition at line 389 of file ping_check_mgr.h.
References io_service_.
TimeStamp isc::ping_check::PingCheckMgr::getNextExpiry | ( | ) |
Fetches the time at which expiration timer will next expire.
Definition at line 412 of file ping_check_mgr.cc.
References mutex_, and next_expiry_.
const PingCheckConfigPtr isc::ping_check::PingCheckMgr::getScopedConfig | ( | dhcp::Lease4Ptr & | lease | ) |
Fetches the current, scoped configuration parameters.
lease | lease for which the parameters are desired. |
Definition at line 97 of file ping_check_mgr.cc.
References config_cache_, isc::dhcp::CfgMgr::getCurrentCfg(), isc::dhcp::CfgMgr::instance(), isc_throw, LOG_ERROR, isc::ping_check::ping_check_logger, and PING_CHECK_MGR_SUBNET_CONFIG_FAILED.
void isc::ping_check::PingCheckMgr::handleEchoReply | ( | const ICMPMsgPtr & | echo_reply | ) |
Process an ECHO REPLY message.
echo_reply | ICMP ECHO REPLY message to process. |
Definition at line 273 of file ping_check_mgr.cc.
References isc::log::DBGLVL_TRACE_BASIC, isc::log::DBGLVL_TRACE_DETAIL, LOG_DEBUG, isc::ping_check::ping_check_logger, PING_CHECK_MGR_RECEIVED_ECHO_REPLY, PING_CHECK_MGR_RECEIVED_UNEXPECTED_ECHO_REPLY, store_, and isc::ping_check::PingContext::TARGET_IN_USE.
Referenced by replyReceived().
void isc::ping_check::PingCheckMgr::handleTargetUnreachable | ( | const ICMPMsgPtr & | unreachable | ) |
Process an UNREACHABLE message.
unreachable | ICMP UNREACHABLE message to process. |
Definition at line 311 of file ping_check_mgr.cc.
References isc::log::DBGLVL_TRACE_DETAIL, finishFree(), LOG_DEBUG, isc::ping_check::ping_check_logger, PING_CHECK_MGR_RECEIVED_UNEXPECTED_UNREACHABLE_MSG, PING_CHECK_MGR_RECEIVED_UNREACHABLE_MSG, store_, and isc::ping_check::ICMPMsg::unpack().
Referenced by replyReceived().
bool isc::ping_check::PingCheckMgr::isPaused | ( | ) |
Indicates if the thread pool is paused.
Definition at line 772 of file ping_check_mgr.cc.
References thread_pool_.
bool isc::ping_check::PingCheckMgr::isRunning | ( | ) |
Indicates if the thread pool is running.
Definition at line 744 of file ping_check_mgr.cc.
References channel_, isc::util::MultiThreadingMgr::instance(), and thread_pool_.
bool isc::ping_check::PingCheckMgr::isStopped | ( | ) |
Indicates if the thread pool is stopped.
Definition at line 758 of file ping_check_mgr.cc.
References channel_, isc::util::MultiThreadingMgr::instance(), and thread_pool_.
|
virtual |
Callback passed to PingChannel to use to retrieve the next address to check.
Fetches the context which has been in the WAITING_TO_SEND state the longest and returns its lease address.
[out] | next | upon return it will contain the next target address. Contents are only meaningful if the function returns true. |
Definition at line 182 of file ping_check_mgr.cc.
References checkSuspended(), isc::ping_check::PingContext::SENDING, and store_.
Referenced by createChannel().
void isc::ping_check::PingCheckMgr::pause | ( | ) |
Pause PingChannel operations.
In multi-threaded mode this pauses the thread pool threads, in single-threaded mode it does nothing.
Definition at line 664 of file ping_check_mgr.cc.
References cancelExpirationTimer(), isc::util::MultiThreadingMgr::instance(), LOG_ERROR, isc::ping_check::ping_check_logger, PING_CHECK_PAUSE_FAILED, and thread_pool_.
Referenced by start(), and stopService().
|
virtual |
Performs expiration processing for contexts whose WAITING_FOR_REPLY states expired prior to a given point in time.
expired_pings = store_->getExpiredSince(since) for context : expired_pings { unpark context->getQuery() store_->deleteContext(context) }
since | point in time to select against. Defaults to current time. |
Definition at line 376 of file ping_check_mgr.cc.
References isc::log::DBGLVL_TRACE_DETAIL, doNextEcho(), finishFree(), LOG_DEBUG, isc::ping_check::ping_check_logger, PING_CHECK_MGR_REPLY_TIMEOUT_EXPIRED, and store_.
Referenced by expirationTimedOut().
|
virtual |
Callback passed to PingChannel to invoke when an ICMP reply has been received.
If the reply type is an ECHO REQUEST, it is passed to handleEchoRequest(), if it is an UNREACHABLE message it is passed to handleTargetUnreachable(), any other message type is dropped on the floor and the function returns. Upon handler completion, it calls setNextExpiration() to update the expiration timer.
reply | ICMP message that was received. |
Definition at line 242 of file ping_check_mgr.cc.
References checkSuspended(), isc::ping_check::ICMPMsg::ECHO_REPLY, handleEchoReply(), handleTargetUnreachable(), isc_throw, LOG_ERROR, isc::ping_check::ping_check_logger, PING_CHECK_MGR_REPLY_RECEIVED_ERROR, setNextExpiration(), and isc::ping_check::ICMPMsg::TARGET_UNREACHABLE.
Referenced by createChannel().
void isc::ping_check::PingCheckMgr::resume | ( | ) |
Resume PingChannel operations.
In multi-threaded mode this resumes the thread pool threads, in single-threaded mode it does nothing.
Definition at line 686 of file ping_check_mgr.cc.
References isc::util::MultiThreadingMgr::instance(), LOG_ERROR, isc::ping_check::ping_check_logger, PING_CHECK_RESUME_FAILED, setNextExpiration(), and thread_pool_.
Referenced by start().
|
virtual |
Callback passed to PingChannel to invoke when an ECHO REQUEST send has completed.
If the send completed successfully we'll transition the context to WAITING_FOR_REPLY, update the context in the store, and the update next expiration.
If the send failed, this implies that a recoverable error occurred, such as a interface being down and thus, there is currently no way to send the ping to the target network. We'll treat this the same as an ICMP TARGET_UNREACHABLE and release the OFFER by calling finishFree()
.
echo | ICMP echo message that as sent. |
send_failed | True if the send completed with a non-fatal error, false otherwise. |
Definition at line 201 of file ping_check_mgr.cc.
References checkSuspended(), isc::ping_check::ICMPMsg::ECHO_REQUEST, finishFree(), isc_throw, LOG_ERROR, isc::ping_check::ping_check_logger, PING_CHECK_MGR_SEND_COMPLETED_ERROR, setNextExpiration(), and store_.
Referenced by createChannel().
|
inline |
Set the hook I/O service.
io_service | the hook I/O service. |
Definition at line 396 of file ping_check_mgr.h.
References io_service_.
|
virtual |
Updates the expiration timer (thread safe).
PingContextPtr next = pings->getExpiresNext() if next reschedule expiration timer for next->getNextExpiry(); else cancel expiration timer
Definition at line 418 of file ping_check_mgr.cc.
References checkSuspendedInternal(), mutex_, and setNextExpirationInternal().
Referenced by replyReceived(), resume(), and sendCompleted().
|
virtual |
Updates the expiration timer.
PingContextPtr next = pings->getExpiresNext() if next reschedule expiration timer for next->getNextExpiry(); else cancel expiration timer
Definition at line 428 of file ping_check_mgr.cc.
References cancelExpirationTimerInternal(), isc::ping_check::PingContext::EMPTY_TIME(), expiration_timer_, expirationTimedOut(), next_expiry_, isc::ping_check::PingContext::now(), isc::asiolink::IntervalTimer::ONE_SHOT, and store_.
Referenced by expirationTimedOut(), and setNextExpiration().
|
virtual |
Determines whether or not a lease should be ping checked.
Employs the following logic to determine if a ping-check should be conducted:
If there's a previous lease that belongs to this client and it was touched by the client less than ping-cltt-secs ago, then send the offer to the client without ping checking.
Otherwise a ping-check is called for, leave the query parked.
lease | prospective lease to check. |
query | DHCPDISCOVER associated with the lease. |
old_lease | pre-existing lease for this client (if one). |
host | host reservation associated with lease (if one) |
config | configuration parameters to employ. |
Definition at line 488 of file ping_check_mgr.cc.
References channel_, isc::log::DBGLVL_TRACE_BASIC, LOG_DEBUG, isc::hooks::CalloutHandle::NEXT_STEP_CONTINUE, isc::hooks::CalloutHandle::NEXT_STEP_DROP, isc::hooks::CalloutHandle::NEXT_STEP_PARK, PING_CHECK_DUPLICATE_CHECK, isc::ping_check::ping_check_logger, and store_.
void isc::ping_check::PingCheckMgr::start | ( | ) |
Start PingChannel operations.
Will start multi-threaded if core MT is enabled, or calls startSingleThreaded()
if core MT is disabled. Creates a thread pool with its own IOService, uses that IOService when creating the channel.
Definition at line 576 of file ping_check_mgr.cc.
References isc::util::MultiThreadingMgr::addCriticalSectionCallbacks(), channel_, checkPermissions(), config_cache_, createChannel(), expiration_timer_, isc::util::MultiThreadingMgr::instance(), isc_throw, LOG_INFO, pause(), isc::ping_check::ping_check_logger, PING_CHECK_MGR_STARTED, resume(), startSingleThreaded(), and thread_pool_.
Referenced by startService().
void isc::ping_check::PingCheckMgr::startPing | ( | dhcp::Lease4Ptr & | lease, |
dhcp::Pkt4Ptr & | query, | ||
hooks::ParkingLotHandlePtr & | parking_lot ) |
Initiates a ping check for a given lease and its associated DHCPDISCOVER packet.
Convenience method used in unit tests which uses global configuration parameters only.
lease | lease whose address needs to be ping checked. |
query | parked DHCPDISCOVER associated with the lease. |
parking_lot | parking lot in which query is parked. If empty, parking is assumed to not be employed. |
Definition at line 177 of file ping_check_mgr.cc.
References getGlobalConfig(), and startPing().
void isc::ping_check::PingCheckMgr::startPing | ( | dhcp::Lease4Ptr & | lease, |
dhcp::Pkt4Ptr & | query, | ||
hooks::ParkingLotHandlePtr & | parking_lot, | ||
const PingCheckConfigPtr & | config ) |
Initiates a ping check for a given lease and its associated DHCPDISCOVER packet.
Adds a context to the store and posts a call to PingChannel::startSend()
.
lease | lease whose address needs to be ping checked. |
query | parked DHCPDISCOVER associated with the lease. |
parking_lot | parking lot in which query is parked. If empty, parking is assumed to not be employed. |
config | configuration parameters to employ. |
Definition at line 148 of file ping_check_mgr.cc.
References channel_, checkSuspended(), isc::log::DBGLVL_TRACE_BASIC, isc_throw, LOG_DEBUG, isc::ping_check::ping_check_logger, PING_CHECK_MGR_START_PING_CHECK, and store_.
Referenced by startPing().
void isc::ping_check::PingCheckMgr::startService | ( | dhcp::NetworkStatePtr | network_state | ) |
Performs a deferred start by posting an invocation of start()
to the given IOService.
network_state | pointer to server's networks state object. |
Definition at line 531 of file ping_check_mgr.cc.
References io_service_, network_state_, and start().
void isc::ping_check::PingCheckMgr::startSingleThreaded | ( | ) |
Start single-threaded PingChannel operations.
Does not create a thread pool. Uses main thread's IOService when creating the channel.
Definition at line 617 of file ping_check_mgr.cc.
References channel_, config_cache_, createChannel(), expiration_timer_, io_service_, isc_throw, LOG_INFO, isc::ping_check::ping_check_logger, and PING_CHECK_MGR_STARTED_SINGLE_THREADED.
Referenced by start().
void isc::ping_check::PingCheckMgr::stop | ( | ) |
Stop PingChannel operations.
Definition at line 707 of file ping_check_mgr.cc.
References cancelExpirationTimer(), channel_, isc::log::DBGLVL_TRACE_BASIC, expiration_timer_, isc::util::MultiThreadingMgr::instance(), io_service_, LOG_DEBUG, LOG_INFO, isc::ping_check::ping_check_logger, PING_CHECK_MGR_STOPPED, PING_CHECK_MGR_STOPPING, isc::util::MultiThreadingMgr::removeCriticalSectionCallbacks(), and thread_pool_.
Referenced by ~PingCheckMgr(), and stopService().
void isc::ping_check::PingCheckMgr::stopService | ( | bool | finish_free = false | ) |
Shuts down the manager's channel, flushes the store.
This function gracefully winds down operation:
finish_free | if true finishFree() will be invoke on all remaining contexts in the store, otherwise their queries are simply dropped from the parking lot. |
Definition at line 559 of file ping_check_mgr.cc.
References flush(), pause(), and stop().
Referenced by channelShutdown().
void isc::ping_check::PingCheckMgr::updateSubnetConfig | ( | dhcp::SrvConfigPtr | server_config | ) |
Update the cache of subnet ping check configurations.
Iterates over the subnets in the given server configuration, and caches their ping-check configuration.
server_config | Server configuration containing the configured subnets to process. |
Definition at line 77 of file ping_check_mgr.cc.
References config_cache_.
|
protected |
Channel that conducts ICMP messaging.
Definition at line 412 of file ping_check_mgr.h.
Referenced by PingCheckMgr(), PingCheckMgr(), expirationTimedOut(), isRunning(), isStopped(), shouldPing(), start(), startPing(), startSingleThreaded(), and stop().
|
protected |
Warehouses parsed global and subnet configuration.
Definition at line 415 of file ping_check_mgr.h.
Referenced by PingCheckMgr(), PingCheckMgr(), configure(), getGlobalConfig(), getScopedConfig(), start(), startSingleThreaded(), and updateSubnetConfig().
|
protected |
Timer which tracks the next expiration event.
Definition at line 424 of file ping_check_mgr.h.
Referenced by cancelExpirationTimerInternal(), setNextExpirationInternal(), start(), startSingleThreaded(), and stop().
|
protected |
The hook I/O service.
Definition at line 403 of file ping_check_mgr.h.
Referenced by PingCheckMgr(), PingCheckMgr(), channelShutdown(), getIOService(), setIOService(), startService(), startSingleThreaded(), and stop().
|
protected |
The mutex used to protect internal state.
Definition at line 427 of file ping_check_mgr.h.
Referenced by PingCheckMgr(), PingCheckMgr(), cancelExpirationTimer(), checkSuspended(), expirationTimedOut(), getNextExpiry(), and setNextExpiration().
|
protected |
Tracks whether or not the server is processing DHCP packets.
Definition at line 418 of file ping_check_mgr.h.
Referenced by checkSuspendedInternal(), and startService().
|
protected |
TimeStamp of the next expiration event.
Definition at line 421 of file ping_check_mgr.h.
Referenced by cancelExpirationTimerInternal(), expirationTimedOut(), getNextExpiry(), and setNextExpirationInternal().
|
protected |
In-memory store of PingContexts.
Definition at line 409 of file ping_check_mgr.h.
Referenced by PingCheckMgr(), PingCheckMgr(), doNextEcho(), finishFree(), flush(), handleEchoReply(), handleTargetUnreachable(), nextToSend(), processExpiredSince(), sendCompleted(), setNextExpirationInternal(), shouldPing(), and startPing().
|
protected |
Indicates whether or not operations have been suspended.
Definition at line 430 of file ping_check_mgr.h.
Referenced by PingCheckMgr(), PingCheckMgr(), and checkSuspendedInternal().
|
protected |
Thread pool used when running multi-threaded.
Definition at line 406 of file ping_check_mgr.h.
Referenced by PingCheckMgr(), PingCheckMgr(), checkPermissions(), isPaused(), isRunning(), isStopped(), pause(), resume(), start(), and stop().