equal
deleted
inserted
replaced
2 #define V4PING_H |
2 #define V4PING_H |
3 |
3 |
4 #include "ns3/application.h" |
4 #include "ns3/application.h" |
5 #include "ns3/traced-callback.h" |
5 #include "ns3/traced-callback.h" |
6 #include "ns3/nstime.h" |
6 #include "ns3/nstime.h" |
|
7 #include "ns3/average.h" |
|
8 #include "ns3/simulator.h" |
7 |
9 |
8 namespace ns3 { |
10 namespace ns3 { |
9 |
11 |
10 class Socket; |
12 class Socket; |
11 |
13 |
24 virtual void StartApplication (void); |
26 virtual void StartApplication (void); |
25 virtual void StopApplication (void); |
27 virtual void StopApplication (void); |
26 virtual void DoDispose (void); |
28 virtual void DoDispose (void); |
27 uint32_t GetApplicationId (void) const; |
29 uint32_t GetApplicationId (void) const; |
28 void Receive (Ptr<Socket> socket); |
30 void Receive (Ptr<Socket> socket); |
|
31 void Send (); |
29 |
32 |
|
33 /// Remote address |
30 Ipv4Address m_remote; |
34 Ipv4Address m_remote; |
|
35 /// Wait interval seconds between sending each packet |
|
36 Time m_interval; |
|
37 /** |
|
38 * Specifies the number of data bytes to be sent. |
|
39 * The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data. |
|
40 */ |
|
41 uint32_t m_size; |
31 Ptr<Socket> m_socket; |
42 Ptr<Socket> m_socket; |
32 uint16_t m_seq; |
43 uint16_t m_seq; |
33 TracedCallback<Time> m_traceRtt; |
44 TracedCallback<Time> m_traceRtt; |
|
45 /// produce ping-style output if true |
|
46 bool m_verbose; |
|
47 /// received packets counter |
|
48 uint32_t m_recv; |
|
49 /// Start time to report total ping time |
|
50 Time m_started; |
|
51 /// Average rtt is ms |
|
52 Average<double> m_avgRtt; |
|
53 /// Next packet will be sent |
|
54 EventId m_next; |
34 }; |
55 }; |
35 |
56 |
36 } // namespace ns3 |
57 } // namespace ns3 |
37 |
58 |
38 #endif /* V4PING_H */ |
59 #endif /* V4PING_H */ |