23 #ifndef IPV4_PACKET_PROBE_H 
   24 #define IPV4_PACKET_PROBE_H 
   26 #include "ns3/boolean.h" 
   27 #include "ns3/callback.h" 
   29 #include "ns3/nstime.h" 
   30 #include "ns3/object.h" 
   31 #include "ns3/packet.h" 
   32 #include "ns3/probe.h" 
   33 #include "ns3/simulator.h" 
   34 #include "ns3/traced-value.h" 
This class is designed to probe an underlying ns3 TraceSource exporting a packet, an IPv4 object,...
 
void ConnectByPath(std::string path) override
connect to a trace source provided by a config path
 
static void SetValueByPath(std::string path, Ptr< const Packet > packet, Ptr< Ipv4 > ipv4, uint32_t interface)
Set a probe value by its name in the Config system.
 
uint32_t m_packetSizeOld
The size of the traced packet.
 
ns3::TracedCallback< uint32_t, uint32_t > m_outputBytes
Traced Callback: the previous packet's size and the actual packet's size.
 
bool ConnectByObject(std::string traceSource, Ptr< Object > obj) override
connect to a trace source attribute provided by a given object
 
~Ipv4PacketProbe() override
 
ns3::TracedCallback< Ptr< const Packet >, Ptr< Ipv4 >, uint32_t > m_output
Traced Callback: the packet, the Ipv4 object and the interface.
 
void TraceSink(Ptr< const Packet > packet, Ptr< Ipv4 > ipv4, uint32_t interface)
Method to connect to an underlying ns3::TraceSource with arguments of type Ptr<const Packet>,...
 
uint32_t m_interface
The IPv4 interface for the traced packet.
 
static TypeId GetTypeId()
Get the type ID.
 
void SetValue(Ptr< const Packet > packet, Ptr< Ipv4 > ipv4, uint32_t interface)
Set a probe value.
 
Ptr< Ipv4 > m_ipv4
The IPv4 object for the traced packet.
 
Ptr< const Packet > m_packet
The traced packet.
 
Forward calls to a chain of Callback.
 
a unique identifier for an interface.
 
Every class exported by the ns3 library is enclosed in the ns3 namespace.