|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #ifndef V4TRACEROUTE_H
23 #define V4TRACEROUTE_H
25 #include "ns3/application.h"
26 #include "ns3/traced-callback.h"
27 #include "ns3/nstime.h"
28 #include "ns3/average.h"
29 #include "ns3/simulator.h"
30 #include "ns3/output-stream-wrapper.h"
130 std::ostringstream
os;
a unique identifier for an interface.
Time m_interval
Wait interval seconds between sending each packet.
EventId m_waitIcmpReplyTimer
The timer used to wait for the probes ICMP replies.
uint32_t m_size
Specifies the number of data bytes to be sent.
uint16_t m_maxProbes
The maximum number of probe packets per hop.
std::ostringstream routeIpv4
The Ipv4 address of the latest hop found.
An identifier for simulation events.
uint16_t m_ttl
The current TTL value.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostringstream osRoute
Stream of characters used for printing a single route.
Ipv4 addresses are stored in host order in this class.
EventId m_next
Next packet will be sent.
uint16_t m_seq
ICMP ECHO sequence number.
Ptr< OutputStreamWrapper > printStream
Stream of the traceroute used for the output file.
std::map< uint16_t, Time > m_sent
All sent but not answered packets. Map icmp seqno -> when sent.
uint32_t GetApplicationId(void) const
Return the application ID in the node.
void Send()
Send one (ICMP ECHO) to the destination.
void Print(Ptr< OutputStreamWrapper > stream)
Prints the application traced routes into a given OutputStream.
virtual void StartApplication(void)
Application specific startup code.
uint32_t m_maxTtl
The maximium Ttl (Max number of hops to trace)
Simulation virtual time values and global simulation resolution.
uint32_t m_probeCount
The Current probe value.
virtual void StopApplication(void)
Application specific shutdown code.
virtual void DoDispose(void)
Destructor implementation.
Time m_started
Start time to report total ping time.
Traceroute application sends one ICMP ECHO request with TTL=1, and after receiving an ICMP TIME EXCEE...
Ptr< Socket > m_socket
The socket we send packets from.
bool m_verbose
produce traceroute style output if true
std::ostringstream os
Stream of characters used for printing the traceroute results.
void Receive(Ptr< Socket > socket)
Receive an ICMP Echo.
Time m_waitIcmpReplyTimeout
The wait time until the response is considered lost.
Ipv4Address m_remote
Remote address.
void HandleWaitReplyTimeout()
Triggers an action if an ICMP TIME EXCEED have not being received in the time defined by StartWaitRep...
The base class for all ns3 applications.
void StartWaitReplyTimer()
Starts a timer after sending an ICMP ECHO.
static TypeId GetTypeId(void)
Get the type ID.