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

Dsr Option Route Error. More...

#include <dsr-options.h>

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

Public Member Functions

 DsrOptionRerr ()
 Constructor.
virtual ~DsrOptionRerr ()
 Destructor.
uint8_t DoSendError (Ptr< Packet > p, DsrOptionRerrUnreachHeader &rerr, uint32_t rerrSize, Ipv4Address ipv4Address, uint8_t protocol)
 Do Send error message.
virtual TypeId GetInstanceTypeId () const
 Get the instance type ID.
virtual uint8_t GetOptionNumber () const
 Get the option number.
virtual uint8_t Process (Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc)
 Process method.
- Public Member Functions inherited from ns3::dsr::DsrOptions
 DsrOptions ()
 Constructor.
virtual ~DsrOptions ()
 Destructor.
bool CheckDuplicates (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
bool ContainAddressAfter (Ipv4Address ipv4Address, Ipv4Address destAddress, std::vector< Ipv4Address > &nodeList)
 Search for the ipv4 address in the node list.
std::vector< Ipv4AddressCutRoute (Ipv4Address ipv4Address, std::vector< Ipv4Address > &nodeList)
 Cut the route from ipv4Address to the end of the route vector.
uint32_t GetIDfromIP (Ipv4Address address)
Ptr< NodeGetNode () const
 Get the node.
Ptr< NodeGetNodeWithAddress (Ipv4Address ipv4Address)
bool IfDuplicates (std::vector< Ipv4Address > &vec, std::vector< Ipv4Address > &vec2)
void PrintVector (std::vector< Ipv4Address > &vec)
void RemoveDuplicates (std::vector< Ipv4Address > &vec)
bool ReverseRoutes (std::vector< Ipv4Address > &vec)
 Reverse the routes.
Ipv4Address ReverseSearchNextHop (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
void ScheduleReply (Ptr< Packet > &packet, std::vector< Ipv4Address > &nodeList, Ipv4Address &source, Ipv4Address &destination)
Ipv4Address SearchNextHop (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
void SetNode (Ptr< Node > node)
 Set the node.
virtual Ptr< Ipv4RouteSetRoute (Ipv4Address nextHop, Ipv4Address srcAddress)
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~Object ()
void AggregateObject (Ptr< Object > other)
void Dispose (void)
AggregateIterator GetAggregateIterator (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
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)

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type identificator.

Static Public Attributes

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

Private Attributes

Ptr< Ipv4m_ipv4
 The ipv4 layer 3.
uint32_t m_length
 The length of the packet.
Ptr< dsr::RouteCachem_routeCache
 The route cache.

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void DoDispose (void)
virtual void DoStart (void)
virtual void NotifyNewAggregate (void)
- Protected Attributes inherited from ns3::dsr::DsrOptions
Time ActiveRouteTimeout
 The active route timeout value.
Ipv4Address Broadcast
 The broadcast IP address.
TracedCallback< Ptr< const
Packet > > 
m_dropTrace
 Drop trace callback.
std::vector< Ipv4Addressm_finalRoute
 The vector of final Ipv4 address.
Ptr< Ipv4m_ipv4
 The ipv4.
std::vector< Ipv4Addressm_ipv4Address
 The vector of Ipv4 address.
Ptr< Ipv4Routem_ipv4Route
 The ipv4 route.
Ptr< dsr::RouteCachem_routeCache
 The route cache table.
Ptr< dsr::RreqTablem_rreqTable
 The route request table.
TracedCallback< const
DsrOptionSRHeader & > 
m_rxPacketTrace

Detailed Description

Dsr Option Route Error.

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

Constructor & Destructor Documentation

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

Constructor.

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

References NS_LOG_FUNCTION_NOARGS.

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

Destructor.

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

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

TypeId ns3::dsr::DsrOptionRerr::GetInstanceTypeId ( void  ) const
virtual

Get the instance type ID.

Returns
instance type ID

Reimplemented from ns3::Object.

Definition at line 1317 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 1322 of file dsr-options.cc.

References NS_LOG_FUNCTION_NOARGS, and OPT_NUMBER.

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

Get the type identificator.

This method returns the TypeId associated to ns3::dsr::DsrOptionRerr.

Returns
type identificator

No Attributes defined for this type.
Attributes defined in parent class ns3::dsr::DsrOptions:

No TraceSources defined for this type.
TraceSources defined in parent class ns3::dsr::DsrOptions:

  • Rx: Receive DSR packet.

Reimplemented from ns3::dsr::DsrOptions.

Definition at line 1298 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 
)
virtual

Process method.

Called from DsrRouting::Receive.

Parameters
packetthe packet
dsrPthe clean packet with payload
ipv4Headerthe IPv4 header of packet received
protocolthe protocol number of the up layer
isPromiscif the packet must be dropped
Returns
the processed size

Implements ns3::dsr::DsrOptions.

Definition at line 1328 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 566 of file dsr-options.h.

uint32_t ns3::dsr::DsrOptionRerr::m_length
private

The length of the packet.

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

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

The route cache.

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

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

Dsr Route Error option number.

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

Referenced by GetOptionNumber().


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