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

Doxygen introspection did not find any typical Config paths. More...

#include <dsr-options.h>

+ Inheritance diagram for ns3::dsr::DsrOptionRerr:
+ Collaboration diagram for ns3::dsr::DsrOptionRerr:

Public Member Functions

 DsrOptionRerr ()
 
virtual ~DsrOptionRerr ()
 
uint8_t DoSendError (Ptr< Packet > p, DsrOptionRerrUnreachHeader &rerr, uint32_t rerrSize, Ipv4Address ipv4Address, uint8_t protocol)
 Do Send error message. More...
 
virtual TypeId GetInstanceTypeId () const
 Get the instance type ID. More...
 
virtual uint8_t GetOptionNumber () const
 Get the option number. More...
 
virtual uint8_t Process (Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)
 Process method. More...
 
- Public Member Functions inherited from ns3::dsr::DsrOptions
 DsrOptions ()
 Constructor. More...
 
virtual ~DsrOptions ()
 Destructor. More...
 
bool CheckDuplicates (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
 Check if the route already contains the node ip address. More...
 
bool ContainAddressAfter (Ipv4Address ipv4Address, Ipv4Address destAddress, std::vector< Ipv4Address > &nodeList)
 Search for the ipv4 address in the node list. More...
 
std::vector< Ipv4AddressCutRoute (Ipv4Address ipv4Address, std::vector< Ipv4Address > &nodeList)
 Cut the route from ipv4Address to the end of the route vector. More...
 
uint32_t GetIDfromIP (Ipv4Address address)
 Get the node id with Ipv4Address. More...
 
Ptr< NodeGetNode () const
 Get the node. More...
 
Ptr< NodeGetNodeWithAddress (Ipv4Address ipv4Address)
 Get the node object with Ipv4Address. More...
 
bool IfDuplicates (std::vector< Ipv4Address > &vec, std::vector< Ipv4Address > &vec2)
 Check if the two vectors contain duplicate or not. More...
 
void PrintVector (std::vector< Ipv4Address > &vec)
 Print out the elements in the route vector. More...
 
void RemoveDuplicates (std::vector< Ipv4Address > &vec)
 Remove the duplicates from the route. More...
 
bool ReverseRoutes (std::vector< Ipv4Address > &vec)
 Reverse the routes. More...
 
Ipv4Address ReverseSearchNextHop (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
 Reverse search for the next hop in the route. More...
 
Ipv4Address ReverseSearchNextTwoHop (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
 Reverse search for the next two hop in the route. More...
 
void ScheduleReply (Ptr< Packet > &packet, std::vector< Ipv4Address > &nodeList, Ipv4Address &source, Ipv4Address &destination)
 Schedule the intermediate node route request broadcast. More...
 
Ipv4Address SearchNextHop (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
 Search for the next hop in the route. More...
 
void SetNode (Ptr< Node > node)
 Set the node. More...
 
virtual Ptr< Ipv4RouteSetRoute (Ipv4Address nextHop, Ipv4Address srcAddress)
 Set the route to use for data packets, used by the option headers when sending data/control packets. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 
virtual ~Object ()
 
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 Run the DoDispose methods of this object and all the objects aggregated to it. More...
 
AggregateIterator GetAggregateIterator (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 This method calls the virtual DoInitialize method on all the objects aggregated to this object. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
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)
 

Static Public Member Functions

static TypeId GetTypeId ()
 
- Static Public Member Functions inherited from ns3::dsr::DsrOptions
static TypeId GetTypeId (void)
 Get the type identificator. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Static Public Attributes

static const uint8_t OPT_NUMBER = 3
 Dsr Route Error option number. More...
 

Private Attributes

Ptr< Ipv4m_ipv4
 The ipv4 layer 3. More...
 
Ptr< dsr::RouteCachem_routeCache
 The route cache. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoDispose (void)
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
virtual void DoInitialize (void)
 This method is called only once by Object::Initialize. More...
 
virtual void NotifyNewAggregate (void)
 This method is invoked whenever two sets of objects are aggregated together. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 This method is invoked once all member attributes have been initialized. More...
 
- Protected Attributes inherited from ns3::dsr::DsrOptions
Time ActiveRouteTimeout
 The active route timeout value. More...
 
Ipv4Address Broadcast
 The broadcast IP address. More...
 
TracedCallback< Ptr< const
Packet > > 
m_dropTrace
 Drop trace callback. More...
 
std::vector< Ipv4Addressm_finalRoute
 The vector of final Ipv4 address. More...
 
Ptr< Ipv4m_ipv4
 The ipv4. More...
 
std::vector< Ipv4Addressm_ipv4Address
 The vector of Ipv4 address. More...
 
Ptr< Ipv4Routem_ipv4Route
 The ipv4 route. More...
 
Ptr< dsr::RouteCachem_routeCache
 The route cache table. More...
 
Ptr< dsr::RreqTablem_rreqTable
 The route request table. More...
 
TracedCallback< const
DsrOptionSRHeader & > 
m_rxPacketTrace
 The receive trace back, only triggered when final destination receive data packet. More...
 

Detailed Description

Doxygen introspection did not find any typical Config paths.

Dsr Option Route Error.


No Attributes are defined for this type.
No TraceSources are defined for this type.

TraceSources defined in parent class ns3::dsr::DsrOptions

  • Rx: Receive DSR packet.

Definition at line 428 of file dsr-options.h.

Constructor & Destructor Documentation

ns3::dsr::DsrOptionRerr::DsrOptionRerr ( )

Definition at line 1405 of file dsr-options.cc.

References NS_LOG_FUNCTION_NOARGS.

ns3::dsr::DsrOptionRerr::~DsrOptionRerr ( )
virtual

Definition at line 1410 of file dsr-options.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

uint8_t ns3::dsr::DsrOptionRerr::DoSendError ( Ptr< Packet p,
DsrOptionRerrUnreachHeader rerr,
uint32_t  rerrSize,
Ipv4Address  ipv4Address,
uint8_t  protocol 
)
TypeId ns3::dsr::DsrOptionRerr::GetInstanceTypeId ( void  ) const
virtual

Get the instance type ID.

Returns
instance type ID

Reimplemented from ns3::Object.

Definition at line 1415 of file dsr-options.cc.

References GetTypeId().

+ Here is the call graph for this function:

uint8_t ns3::dsr::DsrOptionRerr::GetOptionNumber ( ) const
virtual

Get the option number.

Returns
option number

Implements ns3::dsr::DsrOptions.

Definition at line 1420 of file dsr-options.cc.

References NS_LOG_FUNCTION_NOARGS, and OPT_NUMBER.

TypeId ns3::dsr::DsrOptionRerr::GetTypeId ( void  )
static

Definition at line 1396 of file dsr-options.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8_t ns3::dsr::DsrOptionRerr::Process ( Ptr< Packet packet,
Ptr< Packet dsrP,
Ipv4Address  ipv4Address,
Ipv4Address  source,
Ipv4Header const &  ipv4Header,
uint8_t  protocol,
bool &  isPromisc,
Ipv4Address  promiscSource 
)
virtual

Process method.

Called from DsrRouting::Receive.

Parameters
packetthe packet
dsrPthe clean packet with payload
ipv4Addressthe IPv4 address
sourceIPv4 address of the source
ipv4Headerthe IPv4 header of packet received
protocolthe protocol number of the up layer
isPromiscif the packet must be dropped
promiscSourceIPv4 address
Returns
the processed size
Todo:
This is for the other two error options, not supporting for now

Implements ns3::dsr::DsrOptions.

Definition at line 1426 of file dsr-options.cc.

References ns3::Packet::Copy(), ns3::Packet::CopyData(), data, DoSendError(), ns3::dsr::DsrOptionRerrUnreachHeader::GetErrorDst(), ns3::dsr::DsrOptionRerrUnreachHeader::GetErrorSrc(), ns3::dsr::DsrOptions::GetNodeWithAddress(), ns3::Object::GetObject(), ns3::dsr::DsrOptionRerrUnreachHeader::GetSerializedSize(), ns3::dsr::DsrOptionRerrUnsupportHeader::GetSerializedSize(), ns3::Packet::GetSize(), ns3::dsr::DsrOptionRerrUnreachHeader::GetUnreachNode(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Packet::RemoveHeader().

+ Here is the call graph for this function:

Member Data Documentation

Ptr<Ipv4> ns3::dsr::DsrOptionRerr::m_ipv4
private

The ipv4 layer 3.

Definition at line 468 of file dsr-options.h.

Ptr<dsr::RouteCache> ns3::dsr::DsrOptionRerr::m_routeCache
private

The route cache.

Definition at line 464 of file dsr-options.h.

const uint8_t ns3::dsr::DsrOptionRerr::OPT_NUMBER = 3
static

Dsr Route Error option number.

Definition at line 434 of file dsr-options.h.

Referenced by GetOptionNumber().


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