| Kea 3.0.2-git

isc::ping_check Namespace Reference

## Classes
struct | AddressIndexTag
| Tag for index by target address. More...
class | ConfigCache
| ConfigCache stores ping check config per subnet. More...
class | DuplicateContext
| Exception thrown when an attempt was made to add a duplicate context. More...
struct | ExpirationIndexTag
| Tag for index by expiration time. More...
class | ICMPEndpoint
| The `ICMPEndpoint` class is a concrete derived class of `IOEndpoint` that represents an endpoint of a ICMP packet. More...
class | ICMPMsg
| Embodies an ICMP message. More...
class | ICMPSocket
| The `ICMPSocket` class is a concrete derived class of `IOAsioSocket` that represents a ICMP socket. More...
struct | NextToSendIndexTag
| Tag for index by send wait start time. More...
class | PingChannel
| Provides thread-safe ICMP ECHO REQUEST/ECHO REPLY service. More...
class | PingCheckConfig
| Houses the Ping check configuration parameters for a single scope (e.g. More...
class | PingCheckMgr
| Ping Check Manager. More...
class | PingContext
| Embodies the life cycle of a ping check test for a single address for a single DHCPDISCOVER. More...
class | PingContextStore
| Maintains an in-memory store of PingContexts. More...
struct | QueryIndexTag
| Tag for index by the query packet. More...
class | SocketCallback
| Functor associated with the socket object. More...

## Typedefs
typedef boost::shared_ptr< ConfigCache > | ConfigCachePtr
| Defines a shared pointer to a ConfigCache.
typedef std::function< void(ICMPMsgPtr &echo, bool send_failed)> | EchoSentCallback
| Function type for callback to invoke upon ECHO send completion.
typedef boost::shared_ptr< ICMPMsg > | ICMPMsgPtr
| Shared pointer type for ICMPMsg.
typedef boost::shared_ptr< struct icmp > | ICMPPtr
| Shared pointer type for struct icmp.
typedef std::function< PingContextPtr()> | NextToSendCallback
| Function type for callback to fetch a context with next target to ping.
typedef boost::shared_ptr< PingChannel > | PingChannelPtr
| Defines a smart pointer to PingChannel.
typedef boost::shared_ptr< PingCheckConfig > | PingCheckConfigPtr
| Defines a shared pointer to a PingCheckConfig.
typedef boost::shared_ptr< PingCheckMgr > | PingCheckMgrPtr
| Defines a shared pointer to a PingCheckMgr.
typedef std::vector< PingContextPtr > | PingContextCollection
| Type for a collection of PingContextPtrs.
typedef boost::shared_ptr< PingContextCollection > | PingContextCollectionPtr
| Type for a pointer to a collection of PingContextPtrs.
typedef boost::multi_index_container< PingContextPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< AddressIndexTag >, boost::multi_index::const_mem_fun< PingContext, const isc::asiolink::IOAddress &, &PingContext::getTarget > >, boost::multi_index::ordered_unique< boost::multi_index::tag< QueryIndexTag >, boost::multi_index::const_mem_fun< PingContext, isc::dhcp::Pkt4Ptr, &PingContext::getQuery > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< NextToSendIndexTag >, boost::multi_index::composite_key< PingContext, boost::multi_index::const_mem_fun< PingContext, bool, &PingContext::isWaitingToSend >, boost::multi_index::const_mem_fun< PingContext, const TimeStamp &, &PingContext::getSendWaitStart > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ExpirationIndexTag >, boost::multi_index::composite_key< PingContext, boost::multi_index::const_mem_fun< PingContext, bool, &PingContext::isWaitingForReply >, boost::multi_index::const_mem_fun< PingContext, const TimeStamp &, &PingContext::getNextExpiry > > > > > | PingContextContainer
| A multi index container holding pointers to PingContexts.
typedef boost::shared_ptr< PingContext > | PingContextPtr
| Defines a shared pointer to a PingContext.
typedef boost::shared_ptr< PingContextStore > | PingContextStorePtr
| Defines a pointer to a PingContextStore.
typedef ICMPSocket< SocketCallback > | PingSocket
| Socket type for performing ICMP socket IO.
typedef boost::shared_ptr< PingSocket > | PingSocketPtr
| Defines a pointer to PingSocket.
typedef std::function< void(ICMPMsgPtr &reply)> | ReplyReceivedCallback
| Function type for callback to invoke when an ICMP reply has been received.
typedef std::function< void()> | ShutdownCallback
| Function type for callback to invoke when the channel has shutdown.
typedef std::function< void(boost::system::error_code ec, size_t length)> | SocketCallbackFunction
| Type of the function implementing a callback invoked by the `SocketCallback` functor.
using | TimeStamp = std::chrono::time_point<std::chrono::system_clock>
| Specifies the type for time stamps.
typedef std::function< void(PingContextPtr context)> | UpdateToSendCallback
| Function type for callback to update a context to SENDING state.

## Variables
PingCheckMgrPtr | mgr
| PingCheckMgr singleton.
isc::log::Logger | ping_check_logger ("ping-check-hooks")

## Typedef Documentation

## ◆ ConfigCachePtr

typedef boost::shared_ptr<ConfigCache> isc::ping_check::ConfigCachePtr

Defines a shared pointer to a ConfigCache.

Definition at line 142 of file config_cache.h.

## ◆ EchoSentCallback

typedef std::function<void(ICMPMsgPtr& echo, bool send_failed)> isc::ping_check::EchoSentCallback

Function type for callback to invoke upon ECHO send completion.

Definition at line 77 of file ping_channel.h.

## ◆ ICMPMsgPtr

typedef boost::shared_ptr<ICMPMsg> isc::ping_check::ICMPMsgPtr

Shared pointer type for ICMPMsg.

Definition at line 26 of file icmp_msg.h.

## ◆ ICMPPtr

typedef boost::shared_ptr<struct icmp> isc::ping_check::ICMPPtr

Shared pointer type for struct icmp.

Definition at line 29 of file icmp_msg.h.

## ◆ NextToSendCallback

typedef std::function<PingContextPtr()> isc::ping_check::NextToSendCallback

Function type for callback to fetch a context with next target to ping.

Definition at line 71 of file ping_channel.h.

## ◆ PingChannelPtr

typedef boost::shared_ptr<PingChannel> isc::ping_check::PingChannelPtr

Defines a smart pointer to PingChannel.

Definition at line 386 of file ping_channel.h.

## ◆ PingCheckConfigPtr

typedef boost::shared_ptr<PingCheckConfig> isc::ping_check::PingCheckConfigPtr

Defines a shared pointer to a PingCheckConfig.

Definition at line 129 of file ping_check_config.h.

## ◆ PingCheckMgrPtr

typedef boost::shared_ptr<PingCheckMgr> isc::ping_check::PingCheckMgrPtr

Defines a shared pointer to a PingCheckMgr.

Definition at line 441 of file ping_check_mgr.h.

## ◆ PingContextCollection

typedef std::vector<PingContextPtr> isc::ping_check::PingContextCollection

Type for a collection of PingContextPtrs.

Definition at line 113 of file ping_context_store.h.

## ◆ PingContextCollectionPtr

typedef boost::shared_ptr<PingContextCollection> isc::ping_check::PingContextCollectionPtr

Type for a pointer to a collection of PingContextPtrs.

Definition at line 115 of file ping_context_store.h.

## ◆ PingContextContainer

typedef boost::multi_index_container< PingContextPtr, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag<AddressIndexTag>, boost::multi_index::const_mem_fun<PingContext, const isc::asiolink::IOAddress&, &PingContext::getTarget> >, boost::multi_index::ordered_unique< boost::multi_index::tag<QueryIndexTag>, boost::multi_index::const_mem_fun<PingContext, isc::dhcp::Pkt4Ptr, &PingContext::getQuery> >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<NextToSendIndexTag>, boost::multi_index::composite_key< PingContext, boost::multi_index::const_mem_fun<PingContext, bool, &PingContext::isWaitingToSend>, boost::multi_index::const_mem_fun<PingContext, const TimeStamp&, &PingContext::getSendWaitStart> > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<ExpirationIndexTag>, boost::multi_index::composite_key< PingContext, boost::multi_index::const_mem_fun<PingContext, bool, &PingContext::isWaitingForReply>, boost::multi_index::const_mem_fun<PingContext, const TimeStamp&, &PingContext::getNextExpiry> > > >> isc::ping_check::PingContextContainer

A multi index container holding pointers to PingContexts.

The contexts in the container may be accessed using different indexes:

- using an IPv4 address,
- using a query packet
- using a send wait start time
- using an expiration time
- using a context state

Indexes can be accessed using the index number (from 0 to 2) or a name tag. It is recommended to use the tags to access indexes as they do not depend on the order of indexes in the container.

Definition at line 110 of file ping_context_store.h.

## ◆ PingContextPtr

typedef boost::shared_ptr<PingContext> isc::ping_check::PingContextPtr

Defines a shared pointer to a PingContext.

Definition at line 275 of file ping_context.h.

## ◆ PingContextStorePtr

typedef boost::shared_ptr<PingContextStore> isc::ping_check::PingContextStorePtr

Defines a pointer to a PingContextStore.

Definition at line 34 of file ping_check_mgr.h.

## ◆ PingSocket

typedef ICMPSocket<SocketCallback> isc::ping_check::PingSocket

Socket type for performing ICMP socket IO.

Definition at line 65 of file ping_channel.h.

## ◆ PingSocketPtr

typedef boost::shared_ptr<PingSocket> isc::ping_check::PingSocketPtr

Defines a pointer to PingSocket.

Definition at line 68 of file ping_channel.h.

## ◆ ReplyReceivedCallback

typedef std::function<void(ICMPMsgPtr& reply)> isc::ping_check::ReplyReceivedCallback

Function type for callback to invoke when an ICMP reply has been received.

Definition at line 81 of file ping_channel.h.

## ◆ ShutdownCallback

typedef std::function<void()> isc::ping_check::ShutdownCallback

Function type for callback to invoke when the channel has shutdown.

Definition at line 84 of file ping_channel.h.

## ◆ SocketCallbackFunction

typedef std::function<void(boost::system::error_code ec, size_t length)> isc::ping_check::SocketCallbackFunction

Type of the function implementing a callback invoked by the `SocketCallback` functor.

Definition at line 29 of file ping_channel.h.

## ◆ TimeStamp

using isc::ping_check::TimeStamp = std::chrono::time_point<std::chrono::system_clock>

Specifies the type for time stamps.

Definition at line 20 of file ping_context.h.

## ◆ UpdateToSendCallback

typedef std::function<void(PingContextPtr context)> isc::ping_check::UpdateToSendCallback

Function type for callback to update a context to SENDING state.

Definition at line 74 of file ping_channel.h.

## Variable Documentation

## ◆ mgr

PingCheckMgrPtr isc::ping_check::mgr

PingCheckMgr singleton.

Definition at line 22 of file ping_check_callouts.cc.

Referenced by cb4_updated(), dhcp4_srv_configured(), lease4_offer(), load(), and unload().

## ◆ ping_check_logger

isc::log::Logger isc::ping_check::ping_check_logger | ( | "ping-check-hooks" |  | ) |

Definition at line 19 of file ping_check_log.h.

Referenced by cb4_updated(), isc::ping_check::PingCheckMgr::channelShutdown(), isc::ping_check::PingCheckMgr::checkPermissions(), isc::ping_check::PingChannel::close(), dhcp4_srv_configured(), isc::ping_check::PingCheckMgr::doNextEcho(), isc::ping_check::PingChannel::doRead(), isc::ping_check::PingCheckMgr::finishFree(), isc::ping_check::PingCheckMgr::getScopedConfig(), isc::ping_check::PingCheckMgr::handleEchoReply(), isc::ping_check::PingCheckMgr::handleTargetUnreachable(), lease4_offer(), load(), isc::ping_check::PingChannel::open(), isc::ping_check::PingCheckMgr::pause(), isc::ping_check::PingCheckMgr::processExpiredSince(), isc::ping_check::PingCheckMgr::replyReceived(), isc::ping_check::PingCheckMgr::resume(), isc::ping_check::PingCheckMgr::sendCompleted(), isc::ping_check::PingChannel::sendNext(), isc::ping_check::PingCheckMgr::shouldPing(), isc::ping_check::PingChannel::socketReadCallback(), isc::ping_check::PingChannel::socketWriteCallback(), isc::ping_check::PingCheckMgr::start(), isc::ping_check::PingCheckMgr::startPing(), isc::ping_check::PingCheckMgr::startSingleThreaded(), isc::ping_check::PingCheckMgr::stop(), isc::ping_check::PingChannel::stopChannel(), and unload().