Class that monitors flows at the IPv4 layer of a Node. More...
#include <ipv4-flow-probe.h>
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... | |
![]() | |
typedef std::map< FlowId, FlowStats > | Stats |
Public Member Functions | |
Ipv4FlowProbe (Ptr< FlowMonitor > monitor, Ptr< Ipv4FlowClassifier > classifier, Ptr< Node > node) | |
virtual | ~Ipv4FlowProbe () |
![]() | |
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 |
![]() | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~ObjectBase () |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Protected Member Functions | |
virtual void | DoDispose (void) |
![]() | |
FlowProbe (Ptr< FlowMonitor > flowMonitor) | |
![]() | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
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< Ipv4FlowClassifier > | m_classifier |
Additional Inherited Members | |
![]() | |
static TypeId | GetTypeId (void) |
![]() | |
static void | Cleanup (void) |
![]() | |
static TypeId | GetTypeId (void) |
![]() | |
Ptr< FlowMonitor > | m_flowMonitor |
Stats | m_stats |
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.
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.
ns3::Ipv4FlowProbe::Ipv4FlowProbe | ( | Ptr< FlowMonitor > | monitor, |
Ptr< Ipv4FlowClassifier > | classifier, | ||
Ptr< Node > | node | ||
) |
Definition at line 148 of file ipv4-flow-probe.cc.
References ns3::Config::ConnectWithoutContext(), DropLogger(), ForwardLogger(), ForwardUpLogger(), ns3::Node::GetId(), ns3::Object::GetObject(), ns3::MakeCallback(), NS_FATAL_ERROR, NS_LOG_FUNCTION, QueueDropLogger(), and SendOutgoingLogger().
|
virtual |
Definition at line 186 of file ipv4-flow-probe.cc.
|
protectedvirtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::FlowProbe.
Definition at line 191 of file ipv4-flow-probe.cc.
References ns3::FlowProbe::DoDispose().
|
private |
Definition at line 252 of file ipv4-flow-probe.cc.
References DROP_BAD_CHECKSUM, ns3::Ipv4L3Protocol::DROP_BAD_CHECKSUM, DROP_FRAGMENT_TIMEOUT, ns3::Ipv4L3Protocol::DROP_FRAGMENT_TIMEOUT, DROP_INTERFACE_DOWN, ns3::Ipv4L3Protocol::DROP_INTERFACE_DOWN, DROP_INVALID_REASON, DROP_NO_ROUTE, ns3::Ipv4L3Protocol::DROP_NO_ROUTE, DROP_ROUTE_ERROR, ns3::Ipv4L3Protocol::DROP_ROUTE_ERROR, DROP_TTL_EXPIRE, ns3::Ipv4L3Protocol::DROP_TTL_EXPIRED, ns3::Ipv4Header::GetDestination(), ns3::Ipv4Header::GetSerializedSize(), ns3::Packet::GetSize(), ns3::Ipv4Address::GetSubnetDirectedBroadcast(), m_classifier, ns3::FlowProbe::m_flowMonitor, NS_FATAL_ERROR, and NS_LOG_DEBUG.
Referenced by Ipv4FlowProbe().
|
private |
Definition at line 217 of file ipv4-flow-probe.cc.
References ns3::Ipv4Header::GetSerializedSize(), ns3::Packet::GetSize(), m_classifier, ns3::FlowProbe::m_flowMonitor, and NS_LOG_DEBUG.
Referenced by Ipv4FlowProbe().
|
private |
Definition at line 232 of file ipv4-flow-probe.cc.
References ns3::Ipv4Header::GetSerializedSize(), ns3::Packet::GetSize(), m_classifier, ns3::FlowProbe::m_flowMonitor, and NS_LOG_DEBUG.
Referenced by Ipv4FlowProbe().
Definition at line 329 of file ipv4-flow-probe.cc.
References DROP_QUEUE, ns3::Ipv4FlowProbeTag::GetFlowId(), ns3::Ipv4FlowProbeTag::GetPacketId(), ns3::Ipv4FlowProbeTag::GetPacketSize(), ns3::FlowProbe::m_flowMonitor, and NS_LOG_DEBUG.
Referenced by Ipv4FlowProbe().
|
private |
Definition at line 197 of file ipv4-flow-probe.cc.
References ns3::Packet::AddPacketTag(), ns3::Ipv4Header::GetSerializedSize(), ns3::Packet::GetSize(), m_classifier, ns3::FlowProbe::m_flowMonitor, and NS_LOG_DEBUG.
Referenced by Ipv4FlowProbe().
|
private |
Definition at line 84 of file ipv4-flow-probe.h.
Referenced by DropLogger(), ForwardLogger(), ForwardUpLogger(), and SendOutgoingLogger().