Used to cache information about packets whose responses have not yet been received. More...
#include <DwmPingDestinationEntry.hh>

Public Member Functions | |
| PingSequencesInFlight () | |
| Constructor. | |
| void | Destination (const PingDestination &destination) |
| Sets the destination. | |
| bool | AddSent (uint16_t seq, const TimeValue &sendTime) |
| Adds to the cache. | |
| bool | ProcessReceive (uint16_t seq, const TimeValue &recvTime, TimeValue &rtt) |
| Process a received packet. | |
| bool | Outstanding () const |
| Returns true if we have sent packets for which we have not yet received a response. More... | |
Protected Member Functions | |
| void | CleanupOld () |
Protected Attributes | |
| PingDestination | _destination |
| std::map< uint16_t, TimeValue > | _sequences |
Used to cache information about packets whose responses have not yet been received.
We keep a map of send times keyed by identifiers. The identifier for a destination is incremented each time we send a packet to the destination, after which we insert a map entry with AddSent(). ProcessReceive() is called when we receive a packet, to look up the time at which the request packet was sent and hence calculate a round-trip time.
| bool Dwm::PingSequencesInFlight::Outstanding | ( | ) | const |
Returns true if we have sent packets for which we have not yet received a response.