Dsr Option Route Reply. More...
#include <dsr-options.h>
Public Member Functions | |
DsrOptionRrep () | |
Constructor. | |
virtual | ~DsrOptionRrep () |
Destructor. | |
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. | |
![]() | |
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< Ipv4Address > | CutRoute (Ipv4Address ipv4Address, std::vector< Ipv4Address > &nodeList) |
Cut the route from ipv4Address to the end of the route vector. | |
uint32_t | GetIDfromIP (Ipv4Address address) |
Ptr< Node > | GetNode () const |
Get the node. | |
Ptr< Node > | GetNodeWithAddress (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< Ipv4Route > | SetRoute (Ipv4Address nextHop, Ipv4Address srcAddress) |
![]() | |
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) |
![]() | |
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) |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type identificator. |
Static Public Attributes | |
static const uint8_t | OPT_NUMBER = 2 |
Router alert option number. |
Private Attributes | |
Ptr< Ipv4 > | m_ipv4 |
The ip layer 3. | |
uint32_t | m_length |
The length of the packet. | |
Ptr< dsr::RouteCache > | m_routeCache |
The route cache. |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoStart (void) |
virtual void | NotifyNewAggregate (void) |
![]() | |
Time | ActiveRouteTimeout |
The active route timeout value. | |
Ipv4Address | Broadcast |
The broadcast IP address. | |
TracedCallback< Ptr< const Packet > > | m_dropTrace |
Drop trace callback. | |
std::vector< Ipv4Address > | m_finalRoute |
The vector of final Ipv4 address. | |
Ptr< Ipv4 > | m_ipv4 |
The ipv4. | |
std::vector< Ipv4Address > | m_ipv4Address |
The vector of Ipv4 address. | |
Ptr< Ipv4Route > | m_ipv4Route |
The ipv4 route. | |
Ptr< dsr::RouteCache > | m_routeCache |
The route cache table. | |
Ptr< dsr::RreqTable > | m_rreqTable |
The route request table. | |
TracedCallback< const DsrOptionSRHeader & > | m_rxPacketTrace |
Dsr Option Route Reply.
This type is not accessible from the Config system.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 380 of file dsr-options.h.
ns3::dsr::DsrOptionRrep::DsrOptionRrep | ( | ) |
|
virtual |
|
virtual |
Get the instance type ID.
Reimplemented from ns3::Object.
Definition at line 926 of file dsr-options.cc.
References GetTypeId().
|
virtual |
Get the option number.
Implements ns3::dsr::DsrOptions.
Definition at line 931 of file dsr-options.cc.
References NS_LOG_FUNCTION_NOARGS, and OPT_NUMBER.
|
static |
Get the type identificator.
Reimplemented from ns3::dsr::DsrOptions.
Definition at line 907 of file dsr-options.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
virtual |
Process method.
Called from DsrRouting::Receive.
packet | the packet |
dsrP | the clean packet with payload |
ipv4Header | the IPv4 header of packet received |
protocol | the protocol number of the up layer |
isPromisc | if the packet must be dropped |
Get the destination address, which is the last element in the nodeList
Get the destination address for the data packet, which is the last element in the nodeList
Add the newly found route to the route cache The route looks like: \ "srcAddress" + "intermediate node address" + "targetAddress"
Found a route the dst, construct the source route option header
Schedule the packet retry
Implements ns3::dsr::DsrOptions.
Definition at line 938 of file dsr-options.cc.
References ns3::dsr::DsrOptions::ActiveRouteTimeout, ns3::dsr::DsrOptionField::AddDsrOption(), ns3::Packet::AddHeader(), ns3::Packet::Copy(), ns3::Packet::CopyData(), ns3::dsr::DsrOptions::CutRoute(), ns3::dsr::DsrOptions::GetIDfromIP(), ns3::dsr::DsrOptionHeader::GetLength(), ns3::dsr::DsrOptionRrepHeader::GetNodesAddress(), ns3::dsr::DsrOptions::GetNodeWithAddress(), ns3::Object::GetObject(), ns3::dsr::DsrOptionRrepHeader::GetSerializedSize(), ns3::dsr::DsrOptions::m_dropTrace, ns3::dsr::DsrOptions::m_ipv4Route, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::dsr::DsrOptions::PrintVector(), ns3::dsr::DsrOptions::RemoveDuplicates(), ns3::Packet::RemoveHeader(), ns3::dsr::DsrOptions::ReverseSearchNextHop(), ns3::dsr::DsrOptions::SearchNextHop(), ns3::dsr::DsrFsHeader::SetDestId(), ns3::dsr::DsrFsHeader::SetMessageType(), ns3::dsr::DsrFsHeader::SetNextHeader(), ns3::dsr::DsrOptionSRHeader::SetNodesAddress(), ns3::dsr::DsrOptionRrepHeader::SetNumberAddress(), ns3::dsr::DsrFsHeader::SetPayloadLength(), ns3::dsr::DsrOptions::SetRoute(), ns3::dsr::DsrOptionSRHeader::SetSalvage(), ns3::dsr::DsrOptionSRHeader::SetSegmentsLeft(), and ns3::dsr::DsrFsHeader::SetSourceId().
The ip layer 3.
Definition at line 435 of file dsr-options.h.
|
private |
The length of the packet.
Definition at line 431 of file dsr-options.h.
|
private |
The route cache.
Definition at line 427 of file dsr-options.h.
|
static |
Router alert option number.
Definition at line 386 of file dsr-options.h.
Referenced by GetOptionNumber().