ns-3
ns3::dsr::DsrOptions Class Reference
Inheritance diagram for ns3::dsr::DsrOptions:
Collaboration diagram for ns3::dsr::DsrOptions:

List of all members.

Public Member Functions

 DsrOptions ()
 Constructor.
virtual ~DsrOptions ()
 Destructor.
virtual uint8_t GetOptionNumber () const =0
 Get the option number.
void SetNode (Ptr< Node > node)
 Set the node.
Ptr< NodeGetNode () const
 Get the node.
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.
virtual Ptr< Ipv4RouteSetRoute (Ipv4Address nextHop, Ipv4Address srcAddress)
bool ReverseRoutes (std::vector< Ipv4Address > &vec)
 Reverse the routes.
Ipv4Address SearchNextHop (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
Ipv4Address ReverseSearchNextHop (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
void PrintVector (std::vector< Ipv4Address > &vec)
bool IfDuplicates (std::vector< Ipv4Address > &vec, std::vector< Ipv4Address > &vec2)
bool CheckDuplicates (Ipv4Address ipv4Address, std::vector< Ipv4Address > &vec)
void RemoveDuplicates (std::vector< Ipv4Address > &vec)
void ScheduleReply (Ptr< Packet > &packet, std::vector< Ipv4Address > &nodeList, Ipv4Address &source, Ipv4Address &destination)
uint32_t GetIDfromIP (Ipv4Address address)
Ptr< NodeGetNodeWithAddress (Ipv4Address ipv4Address)
virtual uint8_t Process (Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc)=0
 Process method.
- Public Member Functions inherited from ns3::Object
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Dispose (void)
void AggregateObject (Ptr< Object > other)
AggregateIterator GetAggregateIterator (void) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
uint32_t GetReferenceCount (void) const
- Public Member Functions inherited from ns3::ObjectBase
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
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 (void)
 Get the type identificator.

Protected Attributes

TracedCallback< Ptr< const
Packet > > 
m_dropTrace
 Drop trace callback.
Ipv4Address Broadcast
 The broadcast IP address.
Ptr< dsr::RreqTablem_rreqTable
 The route request table.
Ptr< dsr::RouteCachem_routeCache
 The route cache table.
Ptr< Ipv4Routem_ipv4Route
 The ipv4 route.
Ptr< Ipv4m_ipv4
 The ipv4.
std::vector< Ipv4Addressm_ipv4Address
 The vector of Ipv4 address.
std::vector< Ipv4Addressm_finalRoute
 The vector of final Ipv4 address.
Time ActiveRouteTimeout
 The active route timeout value.
TracedCallback< const
DsrOptionSRHeader & > 
m_rxPacketTrace

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
virtual void NotifyNewAggregate (void)
virtual void DoStart (void)
virtual void DoDispose (void)
 Object (const Object &o)

Member Function Documentation

bool ns3::dsr::DsrOptions::ContainAddressAfter ( Ipv4Address  ipv4Address,
Ipv4Address  destAddress,
std::vector< Ipv4Address > &  nodeList 
)

Search for the ipv4 address in the node list.

Returns:
true if contain ip address

References NS_LOG_FUNCTION.

Referenced by ns3::dsr::DsrOptionSR::Process().

std::vector< Ipv4Address > ns3::dsr::DsrOptions::CutRoute ( Ipv4Address  ipv4Address,
std::vector< Ipv4Address > &  nodeList 
)

Cut the route from ipv4Address to the end of the route vector.

Returns:
the vector after the route cut

References NS_LOG_FUNCTION.

Referenced by ns3::dsr::DsrOptionRrep::Process().

Ptr< Node > ns3::dsr::DsrOptions::GetNode ( void  ) const

Get the node.

Returns:
the node

References NS_LOG_FUNCTION_NOARGS.

virtual uint8_t ns3::dsr::DsrOptions::GetOptionNumber ( ) const
pure virtual
TypeId ns3::dsr::DsrOptions::GetTypeId ( void  )
static

Get the type identificator.

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

Returns:
type identificator

Attributes defined for this type:

TraceSources defined for this type:

  • Rx: Receive DSR packet.

Reimplemented from ns3::Object.

Reimplemented in ns3::dsr::DsrOptionAck, ns3::dsr::DsrOptionAckReq, ns3::dsr::DsrOptionRerr, ns3::dsr::DsrOptionSR, ns3::dsr::DsrOptionRrep, ns3::dsr::DsrOptionRreq, ns3::dsr::DsrOptionPadn, and ns3::dsr::DsrOptionPad1.

References GetOptionNumber(), ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

virtual uint8_t ns3::dsr::DsrOptions::Process ( Ptr< Packet packet,
Ptr< Packet dsrP,
Ipv4Address  ipv4Address,
Ipv4Address  source,
Ipv4Header const &  ipv4Header,
uint8_t  protocol,
bool &  isPromisc 
)
pure 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

Implemented in ns3::dsr::DsrOptionAck, ns3::dsr::DsrOptionAckReq, ns3::dsr::DsrOptionRerr, ns3::dsr::DsrOptionSR, ns3::dsr::DsrOptionRrep, ns3::dsr::DsrOptionRreq, ns3::dsr::DsrOptionPadn, and ns3::dsr::DsrOptionPad1.

bool ns3::dsr::DsrOptions::ReverseRoutes ( std::vector< Ipv4Address > &  vec)

Reverse the routes.

Returns:
true if successfully reversed

References NS_LOG_FUNCTION.

Referenced by ns3::dsr::DsrOptionRreq::Process().

void ns3::dsr::DsrOptions::SetNode ( Ptr< Node node)

Set the node.

Parameters:
nodethe node to set

References NS_LOG_FUNCTION.


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