Doxygen introspection did not find any typical Config paths. More...
#include <dsr-options.h>
Public Member Functions | |
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< Ipv4Address > | CutRoute (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< Node > | GetNode () const |
Get the node. More... | |
Ptr< Node > | GetNodeWithAddress (Ipv4Address ipv4Address) |
Get the node object with Ipv4Address. More... | |
virtual uint8_t | GetOptionNumber () const =0 |
Get the option number. 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... | |
virtual uint8_t | Process (Ptr< Packet > packet, Ptr< Packet > dsrP, Ipv4Address ipv4Address, Ipv4Address source, Ipv4Header const &ipv4Header, uint8_t protocol, bool &isPromisc, Ipv4Address promiscSource)=0 |
Process method. 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< Ipv4Route > | SetRoute (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 |
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) |
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... | |
SimpleRefCount & | operator= (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 (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... | |
Protected Attributes | |
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< Ipv4Address > | m_finalRoute |
The vector of final Ipv4 address. More... | |
Ptr< Ipv4 > | m_ipv4 |
The ipv4. More... | |
std::vector< Ipv4Address > | m_ipv4Address |
The vector of Ipv4 address. More... | |
Ptr< Ipv4Route > | m_ipv4Route |
The ipv4 route. More... | |
Ptr< dsr::RouteCache > | m_routeCache |
The route cache table. More... | |
Ptr< dsr::RreqTable > | m_rreqTable |
The route request table. More... | |
TracedCallback< const DsrOptionSRHeader & > | m_rxPacketTrace |
The receive trace back, only triggered when final destination receive data packet. More... | |
Private Attributes | |
Ptr< Node > | m_node |
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... | |
Doxygen introspection did not find any typical Config paths.
Definition at line 74 of file dsr-options.h.
ns3::dsr::DsrOptions::DsrOptions | ( | ) |
|
virtual |
bool ns3::dsr::DsrOptions::CheckDuplicates | ( | Ipv4Address | ipv4Address, |
std::vector< Ipv4Address > & | vec | ||
) |
Check if the route already contains the node ip address.
ipv4Address | the IPv4 address that we are looking for |
vec | List of IPv4 addresses |
Definition at line 280 of file dsr-options.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRreq::Process().
bool ns3::dsr::DsrOptions::ContainAddressAfter | ( | Ipv4Address | ipv4Address, |
Ipv4Address | destAddress, | ||
std::vector< Ipv4Address > & | nodeList | ||
) |
Search for the ipv4 address in the node list.
ipv4Address | IPv4 address to search for |
destAddress | IPv4 address in the list that we begin the search |
nodeList | List of IPv4 addresses |
Definition at line 107 of file dsr-options.cc.
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.
ipv4Address | the address to begin cutting |
nodeList | List of IPv4 addresses |
Definition at line 123 of file dsr-options.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRrep::Process().
uint32_t ns3::dsr::DsrOptions::GetIDfromIP | ( | Ipv4Address | address | ) |
Get the node id with Ipv4Address.
address | IPv4 address to look for ID |
Definition at line 342 of file dsr-options.cc.
References first::address, ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), ns3::Object::GetObject(), and NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRreq::Process(), and ns3::dsr::DsrOptionRrep::Process().
Get the node.
Definition at line 101 of file dsr-options.cc.
References m_node, and NS_LOG_FUNCTION_NOARGS.
Ptr< Node > ns3::dsr::DsrOptions::GetNodeWithAddress | ( | Ipv4Address | ipv4Address | ) |
Get the node object with Ipv4Address.
ipv4Address | IPv4 address of the node |
Definition at line 358 of file dsr-options.cc.
References ns3::NodeList::GetNNodes(), ns3::NodeList::GetNode(), ns3::Object::GetObject(), and NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRerr::DoSendError(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), ns3::dsr::DsrOptionSR::Process(), ns3::dsr::DsrOptionRerr::Process(), ns3::dsr::DsrOptionAckReq::Process(), and ns3::dsr::DsrOptionAck::Process().
|
pure virtual |
Get the option number.
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.
Referenced by GetTypeId().
|
static |
Get the type identificator.
Definition at line 71 of file dsr-options.cc.
References GetOptionNumber(), m_rxPacketTrace, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
bool ns3::dsr::DsrOptions::IfDuplicates | ( | std::vector< Ipv4Address > & | vec, |
std::vector< Ipv4Address > & | vec2 | ||
) |
Check if the two vectors contain duplicate or not.
vec | the first list of IPv4 addresses |
vec2 | the second list of IPv4 addresses |
Definition at line 260 of file dsr-options.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRreq::Process().
void ns3::dsr::DsrOptions::PrintVector | ( | std::vector< Ipv4Address > & | vec | ) |
Print out the elements in the route vector.
Definition at line 240 of file dsr-options.cc.
References NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), ns3::dsr::DsrOptionSR::Process(), and RemoveDuplicates().
|
pure virtual |
Process method.
Called from DsrRouting::Receive.
packet | the packet |
dsrP | the clean packet with payload |
ipv4Address | the IPv4 address |
source | IPv4 address of the source |
ipv4Header | the IPv4 header of packet received |
protocol | the protocol number of the up layer |
isPromisc | if the packet must be dropped |
promiscSource | IPv4 address |
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.
void ns3::dsr::DsrOptions::RemoveDuplicates | ( | std::vector< Ipv4Address > & | vec | ) |
Remove the duplicates from the route.
vec | List of IPv4 addresses to be clean |
Definition at line 297 of file dsr-options.cc.
References NS_LOG_FUNCTION, and PrintVector().
Referenced by ns3::dsr::DsrOptionRrep::Process().
bool ns3::dsr::DsrOptions::ReverseRoutes | ( | std::vector< Ipv4Address > & | vec | ) |
Reverse the routes.
vec | List of IPv4 addresses |
Definition at line 145 of file dsr-options.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRreq::Process().
Ipv4Address ns3::dsr::DsrOptions::ReverseSearchNextHop | ( | Ipv4Address | ipv4Address, |
std::vector< Ipv4Address > & | vec | ||
) |
Reverse search for the next hop in the route.
ipv4Address | the IPv4 address of the node we are looking for its next hop address |
vec | List of IPv4 addresses |
Definition at line 195 of file dsr-options.cc.
References NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRreq::Process(), and ns3::dsr::DsrOptionRrep::Process().
Ipv4Address ns3::dsr::DsrOptions::ReverseSearchNextTwoHop | ( | Ipv4Address | ipv4Address, |
std::vector< Ipv4Address > & | vec | ||
) |
Reverse search for the next two hop in the route.
ipv4Address | the IPv4 address of the node we are looking for its next two hop address |
vec | List of IPv4 addresses |
Definition at line 221 of file dsr-options.cc.
References NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
void ns3::dsr::DsrOptions::ScheduleReply | ( | Ptr< Packet > & | packet, |
std::vector< Ipv4Address > & | nodeList, | ||
Ipv4Address & | source, | ||
Ipv4Address & | destination | ||
) |
Schedule the intermediate node route request broadcast.
packet | the original packet |
nodeList | The list of IPv4 addresses |
source | address |
destination | address |
Ipv4Address ns3::dsr::DsrOptions::SearchNextHop | ( | Ipv4Address | ipv4Address, |
std::vector< Ipv4Address > & | vec | ||
) |
Search for the next hop in the route.
ipv4Address | the IPv4 address of the node we are looking for its next hop address |
vec | List of IPv4 addresses |
Definition at line 163 of file dsr-options.cc.
References NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrOptionSR::Process().
Set the node.
node | the node to set |
Definition at line 95 of file dsr-options.cc.
References m_node, and NS_LOG_FUNCTION.
|
virtual |
Set the route to use for data packets, used by the option headers when sending data/control packets.
nextHop | IPv4 address of the next hop |
srcAddress | IPv4 address of the source |
Definition at line 135 of file dsr-options.cc.
References m_ipv4Route, NS_LOG_FUNCTION, ns3::Ipv4Route::SetDestination(), ns3::Ipv4Route::SetGateway(), and ns3::Ipv4Route::SetSource().
Referenced by ns3::dsr::DsrOptionRerr::DoSendError(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrOptionSR::Process().
|
protected |
The active route timeout value.
Definition at line 263 of file dsr-options.h.
Referenced by ns3::dsr::DsrOptionRreq::Process(), and ns3::dsr::DsrOptionRrep::Process().
|
protected |
The broadcast IP address.
Definition at line 235 of file dsr-options.h.
|
protected |
Drop trace callback.
Definition at line 231 of file dsr-options.h.
Referenced by ns3::dsr::DsrOptionRerr::DoSendError(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), and ns3::dsr::DsrOptionSR::Process().
|
protected |
The vector of final Ipv4 address.
Definition at line 259 of file dsr-options.h.
Referenced by ns3::dsr::DsrOptionRreq::Process().
The ipv4.
Definition at line 251 of file dsr-options.h.
|
protected |
The vector of Ipv4 address.
Definition at line 255 of file dsr-options.h.
The ipv4 route.
Definition at line 247 of file dsr-options.h.
Referenced by ns3::dsr::DsrOptionRerr::DoSendError(), ns3::dsr::DsrOptionRreq::Process(), ns3::dsr::DsrOptionRrep::Process(), ns3::dsr::DsrOptionSR::Process(), and SetRoute().
Definition at line 270 of file dsr-options.h.
|
protected |
The route cache table.
Definition at line 243 of file dsr-options.h.
|
protected |
The route request table.
Definition at line 239 of file dsr-options.h.
|
protected |
The receive trace back, only triggered when final destination receive data packet.
Definition at line 267 of file dsr-options.h.
Referenced by GetTypeId().