A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Ipv4FlowProbe Class Reference

Class that monitors flows at the IPv4 layer of a Node. More...

#include <ipv4-flow-probe.h>

+ Inheritance diagram for ns3::Ipv4FlowProbe:
+ Collaboration diagram for ns3::Ipv4FlowProbe:

Public Types

enum  DropReason {
  DROP_NO_ROUTE = 0, DROP_TTL_EXPIRE, DROP_BAD_CHECKSUM, DROP_QUEUE,
  DROP_INTERFACE_DOWN, DROP_ROUTE_ERROR, DROP_FRAGMENT_TIMEOUT, DROP_INVALID_REASON
}
 enumeration of possible reasons why a packet may be dropped More...
- Public Types inherited from ns3::FlowProbe
typedef std::map< FlowId,
FlowStats
Stats

Public Member Functions

 Ipv4FlowProbe (Ptr< FlowMonitor > monitor, Ptr< Ipv4FlowClassifier > classifier, Ptr< Node > node)
virtual ~Ipv4FlowProbe ()
- Public Member Functions inherited from ns3::FlowProbe
virtual ~FlowProbe ()
void AddPacketDropStats (FlowId flowId, uint32_t packetSize, uint32_t reasonCode)
void AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe)
Stats GetStats () const
void SerializeToXmlStream (std::ostream &os, int indent, uint32_t index) const
- Public Member Functions inherited from ns3::SimpleRefCount< FlowProbe >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const

Private Member Functions

void DropLogger (const Ipv4Header &ipHeader, Ptr< const Packet > ipPayload, Ipv4L3Protocol::DropReason reason, Ptr< Ipv4 > ipv4, uint32_t ifIndex)
void ForwardLogger (const Ipv4Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t interface)
void ForwardUpLogger (const Ipv4Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t interface)
void QueueDropLogger (Ptr< const Packet > ipPayload)
void SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t interface)

Private Attributes

Ptr< Ipv4FlowClassifierm_classifier

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< FlowProbe >
static void Cleanup (void)
- Protected Member Functions inherited from ns3::FlowProbe
 FlowProbe (Ptr< FlowMonitor > flowMonitor)
- Protected Attributes inherited from ns3::FlowProbe
Ptr< FlowMonitorm_flowMonitor
Stats m_stats

Detailed Description

Class that monitors flows at the IPv4 layer of a Node.

For each node in the simulation, one instance of the class Ipv4FlowProbe is created to monitor that node. Ipv4FlowProbe accomplishes this by connecting callbacks to trace sources in the Ipv4L3Protocol interface of the node.

Definition at line 39 of file ipv4-flow-probe.h.

Member Enumeration Documentation

enumeration of possible reasons why a packet may be dropped

Enumerator:
DROP_NO_ROUTE 

Packet dropped due to missing route to the destination.

DROP_TTL_EXPIRE 

Packet dropped due to TTL decremented to zero during IPv4 forwarding.

DROP_BAD_CHECKSUM 

Packet dropped due to invalid checksum in the IPv4 header.

DROP_QUEUE 

Packet dropped due to queue overflow. Note: only works for NetDevices that provide a TxQueue attribute of type Queue with a Drop trace source. It currently works with Csma and PointToPoint devices, but not with WiFi or WiMax.

DROP_INTERFACE_DOWN 

Interface is down so can not send packet

DROP_ROUTE_ERROR 

Route error

DROP_FRAGMENT_TIMEOUT 

Fragment timeout exceeded

DROP_INVALID_REASON 

Definition at line 47 of file ipv4-flow-probe.h.

Constructor & Destructor Documentation

ns3::Ipv4FlowProbe::Ipv4FlowProbe ( Ptr< FlowMonitor monitor,
Ptr< Ipv4FlowClassifier classifier,
Ptr< Node node 
)
ns3::Ipv4FlowProbe::~Ipv4FlowProbe ( )
virtual

Definition at line 188 of file ipv4-flow-probe.cc.

Member Function Documentation

void ns3::Ipv4FlowProbe::ForwardLogger ( const Ipv4Header ipHeader,
Ptr< const Packet ipPayload,
uint32_t  interface 
)
private

Definition at line 213 of file ipv4-flow-probe.cc.

References ns3::Ipv4FlowClassifier::Classify(), ns3::Ipv4Header::GetSerializedSize(), ns3::Packet::GetSize(), m_classifier, ns3::FlowProbe::m_flowMonitor, NS_LOG_DEBUG, and ns3::FlowMonitor::ReportForwarding().

Referenced by Ipv4FlowProbe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4FlowProbe::ForwardUpLogger ( const Ipv4Header ipHeader,
Ptr< const Packet ipPayload,
uint32_t  interface 
)
private

Definition at line 228 of file ipv4-flow-probe.cc.

References ns3::Ipv4FlowClassifier::Classify(), ns3::Ipv4Header::GetSerializedSize(), ns3::Packet::GetSize(), m_classifier, ns3::FlowProbe::m_flowMonitor, NS_LOG_DEBUG, and ns3::FlowMonitor::ReportLastRx().

Referenced by Ipv4FlowProbe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4FlowProbe::QueueDropLogger ( Ptr< const Packet ipPayload)
private

Definition at line 325 of file ipv4-flow-probe.cc.

References DROP_QUEUE, ns3::Ipv4FlowProbeTag::GetFlowId(), ns3::Ipv4FlowProbeTag::GetPacketId(), ns3::Ipv4FlowProbeTag::GetPacketSize(), ns3::FlowProbe::m_flowMonitor, NS_LOG_DEBUG, and ns3::FlowMonitor::ReportDrop().

Referenced by Ipv4FlowProbe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv4FlowProbe::SendOutgoingLogger ( const Ipv4Header ipHeader,
Ptr< const Packet ipPayload,
uint32_t  interface 
)
private

Definition at line 193 of file ipv4-flow-probe.cc.

References ns3::Packet::AddPacketTag(), ns3::Ipv4FlowClassifier::Classify(), ns3::Ipv4Header::GetSerializedSize(), ns3::Packet::GetSize(), m_classifier, ns3::FlowProbe::m_flowMonitor, NS_LOG_DEBUG, and ns3::FlowMonitor::ReportFirstTx().

Referenced by Ipv4FlowProbe().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Ptr<Ipv4FlowClassifier> ns3::Ipv4FlowProbe::m_classifier
private

Definition at line 80 of file ipv4-flow-probe.h.

Referenced by DropLogger(), ForwardLogger(), ForwardUpLogger(), and SendOutgoingLogger().


The documentation for this class was generated from the following files: