Public Member Functions | |
| Pinger (awds::Routing *awdsRouting) | |
| ostream & | dbg () |
| void | resetStats () |
| void | print_stats (std::ostream &out) |
| int | startPing (Handle *h=0) |
| int | parse_opts (int argc, const char *const *argv) |
Static Public Member Functions | |
| static void | next_ping (gea::Handle *h, gea::AbsTime t, void *data) |
| static void | ping_recv (BasePacket *p, void *data) |
Public Attributes | |
| bool | busy |
| flag to indicate that a ping is currently active | |
| NodeId | dest |
| the node we are currently pinging | |
| unsigned | ttl |
| the maxium number of hops in each ping packet | |
| int | numRepeat |
| number of pings to send | |
| bool | doTracePath |
| flag, if the path should be traced | |
| double | minRTT |
| double | maxRTT |
| double | sumRTT |
| measured round trip time | |
| int | numReceived |
| number of received packets | |
| int | numTransmitted |
| number of transmitted packets | |
| awds::Routing * | awdsRouting |
| used awds instance | |
| gea::Blocker | blocker |
| blocker for creating periodic events | |
| ostream * | out |
| ostream to write user messages to | |
| ShellClient * | shellClient |
| state of the interactive shell, if present | |
| Duration | period |
| perdiod of ping packets | |
| size_t | pingSize |
| size of ping packets including header | |
| AbsTime | myT0 |
| some fized point in time | |
| ostream& Pinger::dbg | ( | ) | [inline] |
| void Pinger::next_ping | ( | gea::Handle * | h, | |
| gea::AbsTime | t, | |||
| void * | data | |||
| ) | [static] |
send the next ping packet
References awds::BasePacket::buffer, awds::BasePacket::setDest(), awds::BasePacket::size, and awds::BasePacket::unref().
Referenced by startPing().
| int Pinger::parse_opts | ( | int | argc, | |
| const char *const * | argv | |||
| ) |
parse the given options
| argc | number of arguments | |
| argv | vector of string pointers |
References awdsRouting, dbg(), dest, doTracePath, awds::Routing::getNodeByName(), numRepeat, period, pingSize, and ttl.
| void Pinger::ping_recv | ( | BasePacket * | p, | |
| void * | data | |||
| ) | [static] |
called when a ping packet is received
References awds::BasePacket::buffer, AbstractID< 6 >::fromArray(), out, awds::BasePacket::ref(), and awds::BasePacket::unref().
| void Pinger::print_stats | ( | std::ostream & | out | ) |
prints summary after stopping the ping session
| out | ostream to write the text to. |
References dest, numReceived, numTransmitted, and sumRTT.
| void Pinger::resetStats | ( | ) |
reset the internal state
reset the ping stats.
References numReceived, numTransmitted, and sumRTT.
Referenced by startPing().
| int Pinger::startPing | ( | Handle * | h = 0 |
) |
start ping
start the client side of the ping protocol
| h | handle of interactive shell, used for generating periodic events and for stopping the ping |
References blocker, busy, dbg(), dest, next_ping(), and resetStats().
1.5.8