00001 #ifndef V4PING_H 00002 #define V4PING_H 00003 00004 #include "ns3/application.h" 00005 #include "ns3/traced-callback.h" 00006 #include "ns3/nstime.h" 00007 00008 namespace ns3 { 00009 00010 class Socket; 00011 00012 class V4Ping : public Application 00013 { 00014 public: 00015 static TypeId GetTypeId (void); 00016 00017 V4Ping (); 00018 virtual ~V4Ping (); 00019 00020 private: 00021 void Write32 (uint8_t *buffer, uint32_t data); 00022 00023 // inherited from Application base class. 00024 virtual void StartApplication (void); 00025 virtual void StopApplication (void); 00026 virtual void DoDispose (void); 00027 uint32_t GetApplicationId (void) const; 00028 void Receive (Ptr<Socket> socket); 00029 00030 Ipv4Address m_remote; 00031 Ptr<Socket> m_socket; 00032 uint16_t m_seq; 00033 TracedCallback<Time> m_traceRtt; 00034 }; 00035 00036 } // namespace ns3 00037 00038 #endif /* V4PING_H */