Kea 3.1.1
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...
 
struct  StateIndexTag
 Tag for index by state. More...
 

Typedefs

typedef boost::shared_ptr< ConfigCacheConfigCachePtr
 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< ICMPMsgICMPMsgPtr
 Shared pointer type for ICMPMsg.
 
typedef boost::shared_ptr< struct icmp > ICMPPtr
 Shared pointer type for struct icmp.
 
typedef std::function< bool(asiolink::IOAddress &target)> NextToSendCallback
 Function type for callback that fetches next IOAddress to ping.
 
typedef boost::shared_ptr< PingChannelPingChannelPtr
 Defines a smart pointer to PingChannel.
 
typedef boost::shared_ptr< PingCheckConfigPingCheckConfigPtr
 Defines a shared pointer to a PingCheckConfig.
 
typedef boost::shared_ptr< PingCheckMgrPingCheckMgrPtr
 Defines a shared pointer to a PingCheckMgr.
 
typedef std::vector< PingContextPtrPingContextCollection
 Type for a collection of PingContextPtrs.
 
typedef boost::shared_ptr< PingContextCollectionPingContextCollectionPtr
 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 > > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< StateIndexTag >, boost::multi_index::const_mem_fun< PingContext, PingContext::State, &PingContext::getState > > > > PingContextContainer
 A multi index container holding pointers to PingContexts.
 
typedef boost::shared_ptr< PingContextPingContextPtr
 Defines a shared pointer to a PingContext.
 
typedef boost::shared_ptr< PingContextStorePingContextStorePtr
 Defines a pointer to a PingContextStore.
 
typedef ICMPSocket< SocketCallbackPingSocket
 Socket type for performing ICMP socket IO.
 
typedef boost::shared_ptr< PingSocketPingSocketPtr
 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.
 

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 73 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<bool(asiolink::IOAddress& target)> isc::ping_check::NextToSendCallback

Function type for callback that fetches next IOAddress to ping.

Definition at line 70 of file ping_channel.h.

◆ PingChannelPtr

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

Defines a smart pointer to PingChannel.

Definition at line 366 of file ping_channel.h.

◆ 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 434 of file ping_check_mgr.h.

◆ PingContextCollection

Type for a collection of PingContextPtrs.

Definition at line 124 of file ping_context_store.h.

◆ PingContextCollectionPtr

Type for a pointer to a collection of PingContextPtrs.

Definition at line 126 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> > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<StateIndexTag>, boost::multi_index::const_mem_fun<PingContext, PingContext::State, &PingContext::getState> > >> 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 121 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

Defines a pointer to a PingContextStore.

Definition at line 34 of file ping_check_mgr.h.

◆ PingSocket

Socket type for performing ICMP socket IO.

Definition at line 64 of file ping_channel.h.

◆ PingSocketPtr

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

Defines a pointer to PingSocket.

Definition at line 67 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 77 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 80 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 28 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.

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