OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Ping Class Reference

#include <ping.h>

Inheritance diagram for Ping:
Collaboration diagram for Ping:

Public Member Functions

 Ping (const PingReq *pr, DiagTable *diag_table)
 
virtual ~Ping ()
 
virtual void SendRequest ()
 
virtual void HandleReply (DiagPktHandler *handler)
 
virtual void RequestTimedOut (uint32_t seq_no)
 
virtual void SendSummary ()
 
void FillAgentHeader (AgentDiagPktData *pkt)
 
DiagPktHandlerCreateTcpPkt (Agent *agent)
 
DiagPktHandlerCreateUdpPkt (Agent *agent)
 
- Public Member Functions inherited from DiagEntry
 DiagEntry (const std::string &sip, const std::string &dip, uint8_t proto, uint16_t sport, uint16_t dport, const std::string &vrf_name, int timeout, int count, DiagTable *diag_table)
 
virtual ~DiagEntry ()
 
void Init ()
 
void EnqueueForceDelete ()
 
bool TimerExpiry (uint32_t seqno)
 
void RestartTimer ()
 
virtual bool IsDone ()
 
virtual bool ResendOnTimerExpiry ()
 
DiagKey GetKey ()
 
uint32_t GetSeqNo ()
 
uint32_t GetMaxAttempts ()
 
void SetKey (DiagKey key)
 
virtual void Retry ()
 
bool TimerCancel ()
 
DiagTablediag_table () const
 
uint32_t HashValUdpSourcePort ()
 
void FillOamPktHeader (OverlayOamPktData *pktdata, uint32_t vxlan_id, const boost::posix_time::ptime &time)
 

Static Public Member Functions

static void HandleRequest (DiagPktHandler *)
 

Static Public Attributes

static const uint32_t KPingUdpHdr
 
static const uint32_t KPingTcpHdr
 
static const uint32_t KPing6UdpHdr
 
static const uint32_t KPing6TcpHdr
 

Private Attributes

uint16_t data_len_
 
uint16_t len_
 
std::string context_
 
boost::posix_time::time_duration avg_rtt_
 
uint32_t pkt_lost_count_
 

Additional Inherited Members

- Public Types inherited from DiagEntry
typedef uint16_t DiagKey
 
typedef Timer DiagTimer
 
- Protected Attributes inherited from DiagEntry
IpAddress sip_
 
IpAddress dip_
 
uint8_t proto_
 
uint16_t sport_
 
uint16_t dport_
 
std::string vrf_name_
 
boost::system::error_code ec_
 
DiagTablediag_table_
 
DiagKey key_
 
int timeout_
 
DiagTimertimer_
 
uint32_t max_attempts_
 
uint32_t seq_no_
 

Detailed Description

Definition at line 14 of file ping.h.

Constructor & Destructor Documentation

Ping::Ping ( const PingReq *  pr,
DiagTable diag_table 
)

Definition at line 21 of file ping.cc.

Ping::~Ping ( )
virtual

Definition at line 31 of file ping.cc.

Member Function Documentation

DiagPktHandler * Ping::CreateTcpPkt ( Agent agent)

Definition at line 44 of file ping.cc.

Here is the call graph for this function:

DiagPktHandler * Ping::CreateUdpPkt ( Agent agent)

Definition at line 100 of file ping.cc.

Here is the call graph for this function:

void Ping::FillAgentHeader ( AgentDiagPktData pkt)

Definition at line 35 of file ping.cc.

void Ping::HandleReply ( DiagPktHandler handler)
virtual

Implements DiagEntry.

Definition at line 228 of file ping.cc.

Here is the call graph for this function:

static void Ping::HandleRequest ( DiagPktHandler )
static
void Ping::RequestTimedOut ( uint32_t  seq_no)
virtual

Implements DiagEntry.

Definition at line 202 of file ping.cc.

void Ping::SendRequest ( )
virtual

Implements DiagEntry.

Definition at line 154 of file ping.cc.

Here is the call graph for this function:

void Ping::SendSummary ( )
virtual

Reimplemented from DiagEntry.

Definition at line 248 of file ping.cc.

Here is the call graph for this function:

Member Data Documentation

boost::posix_time::time_duration Ping::avg_rtt_
private

Definition at line 40 of file ping.h.

std::string Ping::context_
private

Definition at line 39 of file ping.h.

uint16_t Ping::data_len_
private

Definition at line 37 of file ping.h.

const uint32_t Ping::KPing6TcpHdr
static
Initial value:
= sizeof(struct ether_header) +
sizeof(struct ip6_hdr) + sizeof(tcphdr)

Definition at line 22 of file ping.h.

const uint32_t Ping::KPing6UdpHdr
static
Initial value:
= sizeof(struct ether_header) +
sizeof(struct ip6_hdr) + sizeof(udphdr)

Definition at line 20 of file ping.h.

const uint32_t Ping::KPingTcpHdr
static
Initial value:
= sizeof(struct ether_header) +
sizeof(struct ip) + sizeof(tcphdr)

Definition at line 18 of file ping.h.

const uint32_t Ping::KPingUdpHdr
static
Initial value:
= sizeof(struct ether_header) +
sizeof(struct ip) + sizeof(udphdr)

Definition at line 16 of file ping.h.

uint16_t Ping::len_
private

Definition at line 38 of file ping.h.

uint32_t Ping::pkt_lost_count_
private

Definition at line 41 of file ping.h.


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