Kea 3.1.1
isc::ping_check::ICMPEndpoint Class Reference

The ICMPEndpoint class is a concrete derived class of IOEndpoint that represents an endpoint of a ICMP packet. More...

#include <icmp_endpoint.h>

+ Inheritance diagram for isc::ping_check::ICMPEndpoint:

Constructors and Destructor.

 ICMPEndpoint ()
 Default Constructor.
 
 ICMPEndpoint (const asiolink::IOAddress &address)
 Constructor from an address.
 
 ICMPEndpoint (boost::asio::ip::icmp::endpoint &asio_endpoint)
 Copy Constructor from an ASIO ICMP endpoint.
 
 ICMPEndpoint (const boost::asio::ip::icmp::endpoint &asio_endpoint)
 Constructor from a const ASIO ICMP endpoint.
 
virtual ~ICMPEndpoint ()
 The destructor.
 
virtual asiolink::IOAddress getAddress () const
 Fetches the IP address of the endpoint.
 
virtual const struct sockaddr & getSockAddr () const
 Fetches the IP address of the endpoint in native form.
 
virtual uint16_t getPort () const
 Fetches the IP port number of the endpoint.
 
virtual short getProtocol () const
 Fetches the network protocol of the endpoint.
 
virtual short getFamily () const
 Fetches the network protocol family of the endpoint.
 
const boost::asio::ip::icmp::endpoint & getASIOEndpoint () const
 Fetches the underlying ASIO endpoint implementation.
 
boost::asio::ip::icmp::endpoint & getASIOEndpoint ()
 Fetches the underlying ASIO endpoint implementation.
 

Additional Inherited Members

virtual ~IOEndpoint ()
 The destructor.
 
bool operator== (const IOEndpoint &other) const
 
bool operator!= (const IOEndpoint &other) const
 
static const IOEndpointcreate (const int protocol, const IOAddress &address, const unsigned short port)
 A polymorphic factory of endpoint from address and port.
 
 IOEndpoint ()
 The default constructor.
 

Detailed Description

The ICMPEndpoint class is a concrete derived class of IOEndpoint that represents an endpoint of a ICMP packet.

Other notes about TCPEndpoint applies to this class, too.

Definition at line 19 of file icmp_endpoint.h.

Constructor & Destructor Documentation

◆ ICMPEndpoint() [1/4]

isc::ping_check::ICMPEndpoint::ICMPEndpoint ( )
inline

Default Constructor.

Creates an internal endpoint. This is expected to be set by some external call.

Definition at line 30 of file icmp_endpoint.h.

◆ ICMPEndpoint() [2/4]

isc::ping_check::ICMPEndpoint::ICMPEndpoint ( const asiolink::IOAddress & address)
inlineexplicit

Constructor from an address.

Parameters
addressThe IP address of the endpoint.

Definition at line 38 of file icmp_endpoint.h.

◆ ICMPEndpoint() [3/4]

isc::ping_check::ICMPEndpoint::ICMPEndpoint ( boost::asio::ip::icmp::endpoint & asio_endpoint)
inlineexplicit

Copy Constructor from an ASIO ICMP endpoint.

This constructor is designed to be an efficient wrapper for the corresponding ASIO class, icmp::endpoint.

Parameters
asio_endpointThe ASIO representation of the ICMP endpoint.

Definition at line 50 of file icmp_endpoint.h.

◆ ICMPEndpoint() [4/4]

isc::ping_check::ICMPEndpoint::ICMPEndpoint ( const boost::asio::ip::icmp::endpoint & asio_endpoint)
inlineexplicit

Constructor from a const ASIO ICMP endpoint.

This constructor is designed to be an efficient wrapper for the corresponding ASIO class, icmp::endpoint.

Parameters
asio_endpointThe ASIO representation of the TCP endpoint.

Definition at line 60 of file icmp_endpoint.h.

◆ ~ICMPEndpoint()

virtual isc::ping_check::ICMPEndpoint::~ICMPEndpoint ( )
inlinevirtual

The destructor.

Definition at line 66 of file icmp_endpoint.h.

Member Function Documentation

◆ getAddress()

virtual asiolink::IOAddress isc::ping_check::ICMPEndpoint::getAddress ( ) const
inlinevirtual

Fetches the IP address of the endpoint.

Returns
the endpoint's IP address as an IOAddress.

Implements isc::asiolink::IOEndpoint.

Definition at line 72 of file icmp_endpoint.h.

◆ getASIOEndpoint() [1/2]

boost::asio::ip::icmp::endpoint & isc::ping_check::ICMPEndpoint::getASIOEndpoint ( )
inline

Fetches the underlying ASIO endpoint implementation.

This is not part of the exposed IOEndpoint API but allows direct access to the ASIO implementation of the endpoint

Returns
the wrapped ASIO endpoint instance as a non-const

Definition at line 120 of file icmp_endpoint.h.

◆ getASIOEndpoint() [2/2]

const boost::asio::ip::icmp::endpoint & isc::ping_check::ICMPEndpoint::getASIOEndpoint ( ) const
inline

Fetches the underlying ASIO endpoint implementation.

This is not part of the exposed IOEndpoint API but allows direct access to the ASIO implementation of the endpoint

Returns
the wrapped ASIO endpoint instance as a const

Definition at line 110 of file icmp_endpoint.h.

Referenced by isc::ping_check::ICMPSocket< C >::asyncReceive(), and isc::ping_check::ICMPSocket< C >::asyncSend().

◆ getFamily()

virtual short isc::ping_check::ICMPEndpoint::getFamily ( ) const
inlinevirtual

Fetches the network protocol family of the endpoint.

Returns
the endpoint's protocol as a short

Implements isc::asiolink::IOEndpoint.

Definition at line 100 of file icmp_endpoint.h.

◆ getPort()

virtual uint16_t isc::ping_check::ICMPEndpoint::getPort ( ) const
inlinevirtual

Fetches the IP port number of the endpoint.

Returns
the endpoint's port number as a unit16_t.

Implements isc::asiolink::IOEndpoint.

Definition at line 86 of file icmp_endpoint.h.

◆ getProtocol()

virtual short isc::ping_check::ICMPEndpoint::getProtocol ( ) const
inlinevirtual

Fetches the network protocol of the endpoint.

Returns
the endpoint's protocol as a short

Implements isc::asiolink::IOEndpoint.

Definition at line 93 of file icmp_endpoint.h.

◆ getSockAddr()

virtual const struct sockaddr & isc::ping_check::ICMPEndpoint::getSockAddr ( ) const
inlinevirtual

Fetches the IP address of the endpoint in native form.

Returns
the endpoint's IP address as a struct sockaddr.

Implements isc::asiolink::IOEndpoint.

Definition at line 79 of file icmp_endpoint.h.


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