|
join 1.0
lightweight network framework library
|
ICMP echo statistics. More...
#include <ping.hpp>
Public Member Functions | |
| PingStats ()=default | |
| create the PingStats instance. | |
| PingStats (const std::string &device, const IpAddress &source, const std::string &host, int size, std::chrono::milliseconds interval, int hop, int df) | |
| create the PingStats instance for the given sequence settings. | |
| PingStats (const PingStats &other)=default | |
| create instance by copy. | |
| PingStats & | operator= (const PingStats &other)=default |
| assign instance by copy. | |
| PingStats (PingStats &&other)=default | |
| create instance by move. | |
| PingStats & | operator= (PingStats &&other)=default |
| assign instance by move. | |
| ~PingStats ()=default | |
| destroy the PingStats instance. | |
| const std::string & | device () const noexcept |
| get the device the echo requests are sent through. | |
| const IpAddress & | source () const noexcept |
| get the source address the echo requests are sent from. | |
| const std::string & | host () const noexcept |
| get the destination as requested by the caller. | |
| const IpAddress & | address () const noexcept |
| get the resolved destination address. | |
| int | size () const noexcept |
| get the number of data bytes sent in each echo request. | |
| std::chrono::milliseconds | interval () const noexcept |
| get the interval between two echo requests. | |
| const IpAddress & | from () const noexcept |
| get the address that answered the last echo request. | |
| uint16_t | sequence () const noexcept |
| get the sequence number of the last echo request. | |
| int | hop () const noexcept |
| get the time to live the echo requests are sent with. | |
| int | df () const noexcept |
| get the path MTU discovery setting the echo requests are sent with. | |
| int | route () const noexcept |
| get the MTU the stack knows for the destination. | |
| int | ttl () const noexcept |
| get the time to live of the last answer received. | |
| int | packetSize () const noexcept |
| get the ICMP message size of the last answer received. | |
| std::chrono::microseconds | rtt () const noexcept |
| get the round trip time of the last echo request. | |
| bool | expired () const noexcept |
| check if the last echo request expired before reaching the destination. | |
| uint32_t | mtu () const noexcept |
| get the MTU reported by the last error received. | |
| const std::string & | error () const noexcept |
| get the human readable form of the last error. | |
| const std::error_code & | code () const noexcept |
| get the error code of the last request. | |
| uint32_t | sent () const noexcept |
| get the number of echo requests sent. | |
| uint32_t | received () const noexcept |
| get the number of answers received. | |
| double | loss () const noexcept |
| get the packet loss percentage. | |
| std::chrono::microseconds | min () const noexcept |
| get the minimum round trip time. | |
| std::chrono::microseconds | max () const noexcept |
| get the maximum round trip time. | |
| std::chrono::microseconds | avg () const noexcept |
| get the average round trip time. | |
| std::chrono::microseconds | mdev () const noexcept |
| get the round trip time mean deviation. | |
| std::chrono::microseconds | total () const noexcept |
| get the total elapsed time, request intervals included. | |
| void | reset () noexcept |
| reset the round trip time aggregates and the last request outcome. | |
Friends | |
| class | Ping |
| friendship with ping. | |
ICMP echo statistics.
|
default |
create the PingStats instance.
| PingStats::PingStats | ( | const std::string & | device, |
| const IpAddress & | source, | ||
| const std::string & | host, | ||
| int | size, | ||
| std::chrono::milliseconds | interval, | ||
| int | hop, | ||
| int | df ) |
create the PingStats instance for the given sequence settings.
| device | device name to bind to. |
| source | source address to bind to. |
| host | destination host name or address. |
| size | number of data bytes sent in each echo request. |
| interval | interval between two echo requests. |
| hop | time to live the echo requests are sent with. |
| df | path MTU discovery setting the echo requests are sent with. |
|
default |
create instance by copy.
| other | other object to copy. |
|
default |
create instance by move.
| other | other object to move. |
|
default |
destroy the PingStats instance.
|
inlinenoexcept |
get the resolved destination address.
|
inlinenoexcept |
get the average round trip time.
|
inlinenoexcept |
get the error code of the last request.
|
inlinenoexcept |
get the device the echo requests are sent through.
|
inlinenoexcept |
get the path MTU discovery setting the echo requests are sent with.
|
inlinenoexcept |
get the human readable form of the last error.
|
inlinenoexcept |
check if the last echo request expired before reaching the destination.
|
inlinenoexcept |
get the address that answered the last echo request.
|
inlinenoexcept |
get the time to live the echo requests are sent with.
|
inlinenoexcept |
get the destination as requested by the caller.
|
inlinenoexcept |
get the interval between two echo requests.
|
inlinenoexcept |
get the packet loss percentage.
|
inlinenoexcept |
get the maximum round trip time.
|
noexcept |
get the round trip time mean deviation.
|
inlinenoexcept |
get the minimum round trip time.
|
inlinenoexcept |
get the MTU reported by the last error received.
assign instance by copy.
| other | other object to copy. |
assign instance by move.
| other | other object to move. |
|
inlinenoexcept |
get the ICMP message size of the last answer received.
|
inlinenoexcept |
get the number of answers received.
|
noexcept |
reset the round trip time aggregates and the last request outcome.
|
inlinenoexcept |
get the MTU the stack knows for the destination.
|
inlinenoexcept |
get the round trip time of the last echo request.
|
inlinenoexcept |
get the number of echo requests sent.
|
inlinenoexcept |
get the sequence number of the last echo request.
|
inlinenoexcept |
get the number of data bytes sent in each echo request.
|
inlinenoexcept |
get the source address the echo requests are sent from.
|
inlinenoexcept |
get the total elapsed time, request intervals included.
|
inlinenoexcept |
get the time to live of the last answer received.
|
friend |
friendship with ping.