AODV routing protocol. More...
#include <aodv-routing-protocol.h>
Public Member Functions | |
RoutingProtocol () | |
c-tor More... | |
virtual | ~RoutingProtocol () |
int64_t | AssignStreams (int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
virtual void | DoDispose () |
This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
From Ipv4RoutingProtocol | |
Ptr< Ipv4Route > | RouteOutput (Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr) |
Query routing cache for an existing route, for an outbound packet. More... | |
bool | RouteInput (Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) |
Route an input packet (to be forwarded or locally delivered) More... | |
virtual void | NotifyInterfaceUp (uint32_t interface) |
virtual void | NotifyInterfaceDown (uint32_t interface) |
virtual void | NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) |
virtual void | NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) |
virtual void | SetIpv4 (Ptr< Ipv4 > ipv4) |
virtual void | PrintRoutingTable (Ptr< OutputStreamWrapper > stream) const |
Print the Routing Table entries. More... | |
Handle protocol parameters | |
Time | GetMaxQueueTime () const |
void | SetMaxQueueTime (Time t) |
uint32_t | GetMaxQueueLen () const |
void | SetMaxQueueLen (uint32_t len) |
bool | GetDesinationOnlyFlag () const |
void | SetDesinationOnlyFlag (bool f) |
bool | GetGratuitousReplyFlag () const |
void | SetGratuitousReplyFlag (bool f) |
void | SetHelloEnable (bool f) |
bool | GetHelloEnable () const |
void | SetBroadcastEnable (bool f) |
bool | GetBroadcastEnable () const |
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) |
Static Public Member Functions inherited from ns3::Ipv4RoutingProtocol | |
static TypeId | GetTypeId (void) |
Get the type ID. 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 uint32_t | AODV_PORT = 654 |
UDP Port for AODV control traffic. More... | |
Private Member Functions | |
void | AckTimerExpire (Ipv4Address neighbor, Time blacklistTimeout) |
Mark link to neighbor node as unidirectional for blacklistTimeout. More... | |
void | DeferredRouteOutput (Ptr< const Packet > p, const Ipv4Header &header, UnicastForwardCallback ucb, ErrorCallback ecb) |
Queue packet and send route request. More... | |
Ptr< Socket > | FindSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const |
Find socket with local interface address iface. More... | |
bool | Forwarding (Ptr< const Packet > p, const Ipv4Header &header, UnicastForwardCallback ucb, ErrorCallback ecb) |
If route exists and valid, forward packet. More... | |
void | HelloTimerExpire () |
Schedule next send of hello message. More... | |
bool | IsMyOwnAddress (Ipv4Address src) |
Check that packet is send from own interface. More... | |
Ptr< Ipv4Route > | LoopbackRoute (const Ipv4Header &header, Ptr< NetDevice > oif) const |
Create loopback route for given header. More... | |
void | ProcessHello (RrepHeader const &rrepHeader, Ipv4Address receiverIfaceAddr) |
Process hello message. More... | |
void | RerrRateLimitTimerExpire () |
Reset RERR count and schedule RERR rate limit timer with delay 1 sec. More... | |
void | RouteRequestTimerExpire (Ipv4Address dst) |
Handle route discovery process. More... | |
void | RreqRateLimitTimerExpire () |
Reset RREQ count and schedule RREQ rate limit timer with delay 1 sec. More... | |
void | ScheduleRreqRetry (Ipv4Address dst) |
To reduce congestion in a network, repeated attempts by a source node at route discovery for a single destination MUST utilize a binary exponential backoff. More... | |
void | SendTo (Ptr< Socket > socket, Ptr< Packet > packet, Ipv4Address destination) |
void | Start () |
Start protocol operation. More... | |
bool | UpdateRouteLifeTime (Ipv4Address addr, Time lt) |
Set lifetime field in routing table entry to the maximum of existing lifetime and lt, if the entry exists. More... | |
void | UpdateRouteToNeighbor (Ipv4Address sender, Ipv4Address receiver) |
Update neighbor record. More... | |
Receive control packets | |
void | RecvAodv (Ptr< Socket > socket) |
Receive and process control packet. More... | |
void | RecvRequest (Ptr< Packet > p, Ipv4Address receiver, Ipv4Address src) |
Receive RREQ. More... | |
void | RecvReply (Ptr< Packet > p, Ipv4Address my, Ipv4Address src) |
Receive RREP. More... | |
void | RecvReplyAck (Ipv4Address neighbor) |
Receive RREP_ACK. More... | |
void | RecvError (Ptr< Packet > p, Ipv4Address src) |
Receive RERR from node with address src. More... | |
Send | |
void | SendPacketFromQueue (Ipv4Address dst, Ptr< Ipv4Route > route) |
Forward packet from route request queue. More... | |
void | SendHello () |
Send hello. More... | |
void | SendRequest (Ipv4Address dst) |
Send RREQ. More... | |
void | SendReply (RreqHeader const &rreqHeader, RoutingTableEntry const &toOrigin) |
Send RREP. More... | |
void | SendReplyByIntermediateNode (RoutingTableEntry &toDst, RoutingTableEntry &toOrigin, bool gratRep) |
Send RREP by intermediate node. More... | |
void | SendReplyAck (Ipv4Address neighbor) |
Send RREP_ACK. More... | |
void | SendRerrWhenBreaksLinkToNextHop (Ipv4Address nextHop) |
Initiate RERR. More... | |
void | SendRerrMessage (Ptr< Packet > packet, std::vector< Ipv4Address > precursors) |
Forward RERR. More... | |
void | SendRerrWhenNoRouteToForward (Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin) |
Send RERR message when no route to forward input packet. More... | |
Private Attributes | |
std::map< Ipv4Address, Timer > | m_addressReqTimer |
Map IP address + RREQ timer. More... | |
DuplicatePacketDetection | m_dpd |
Handle duplicated broadcast/multicast packets. More... | |
Timer | m_htimer |
Hello timer. More... | |
Ptr< Ipv4 > | m_ipv4 |
IP protocol. More... | |
Time | m_lastBcastTime |
Keep track of the last bcast time. More... | |
Ptr< NetDevice > | m_lo |
Loopback device used to defer RREQ until packet will be fully formed. More... | |
Neighbors | m_nb |
Handle neighbors. More... | |
RequestQueue | m_queue |
A "drop-front" queue used by the routing layer to buffer packets to which it does not have a route. More... | |
uint32_t | m_requestId |
Broadcast ID. More... | |
uint16_t | m_rerrCount |
Number of RERRs used for RERR rate control. More... | |
Timer | m_rerrRateLimitTimer |
RERR rate limit timer. More... | |
RoutingTable | m_routingTable |
Routing table. More... | |
uint16_t | m_rreqCount |
Number of RREQs used for RREQ rate control. More... | |
IdCache | m_rreqIdCache |
Handle duplicated RREQ. More... | |
Timer | m_rreqRateLimitTimer |
RREQ rate limit timer. More... | |
uint32_t | m_seqNo |
Request sequence number. More... | |
std::map< Ptr< Socket > , Ipv4InterfaceAddress > | m_socketAddresses |
Raw socket per each IP interface, map socket -> iface address (IP + mask) More... | |
Ptr< UniformRandomVariable > | m_uniformRandomVariable |
Provides uniform random variables. More... | |
Protocol parameters. | |
uint32_t | RreqRetries |
Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route. More... | |
uint16_t | RreqRateLimit |
Maximum number of RREQ per second. More... | |
uint16_t | RerrRateLimit |
Maximum number of REER per second. More... | |
Time | ActiveRouteTimeout |
Period of time during which the route is considered to be valid. More... | |
uint32_t | NetDiameter |
Net diameter measures the maximum possible number of hops between two nodes in the network. More... | |
Time | NodeTraversalTime |
NodeTraversalTime is a conservative estimate of the average one hop traversal time for packets and should include queuing delays, interrupt processing times and transfer times. More... | |
Time | NetTraversalTime |
Estimate of the average net traversal time. More... | |
Time | PathDiscoveryTime |
Estimate of maximum time needed to find route in network. More... | |
Time | MyRouteTimeout |
Value of lifetime field in RREP generating by this node. More... | |
Time | HelloInterval |
Every HelloInterval the node checks whether it has sent a broadcast within the last HelloInterval. More... | |
uint32_t | AllowedHelloLoss |
Number of hello messages which may be loss for valid link. More... | |
Time | DeletePeriod |
DeletePeriod is intended to provide an upper bound on the time for which an upstream node A can have a neighbor B as an active next hop for destination D, while B has invalidated the route to D. More... | |
Time | NextHopWait |
Period of our waiting for the neighbour's RREP_ACK. More... | |
Time | BlackListTimeout |
Time for which the node is put into the blacklist. More... | |
uint32_t | MaxQueueLen |
The maximum number of packets that we allow a routing protocol to buffer. More... | |
Time | MaxQueueTime |
The maximum period of time that a routing protocol is allowed to buffer a packet for. More... | |
bool | DestinationOnly |
Indicates only the destination may respond to this RREQ. More... | |
bool | GratuitousReply |
Indicates whether a gratuitous RREP should be unicast to the node originated route discovery. More... | |
bool | EnableHello |
Indicates whether a hello messages enable. More... | |
bool | EnableBroadcast |
Indicates whether a a broadcast data packets forwarding enable. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::Ipv4RoutingProtocol | |
typedef Callback< void, Ptr < const Packet >, const Ipv4Header &, Socket::SocketErrno > | ErrorCallback |
Callback for routing errors (e.g., no route found) More... | |
typedef Callback< void, Ptr < const Packet >, const Ipv4Header &, uint32_t > | LocalDeliverCallback |
Callback for packets to be locally delivered. More... | |
typedef Callback< void, Ptr < Ipv4MulticastRoute >, Ptr < const Packet >, const Ipv4Header & > | MulticastForwardCallback |
Callback for multicast packets to be forwarded. More... | |
typedef Callback< void, Ptr < Ipv4Route >, Ptr< const Packet >, const Ipv4Header & > | UnicastForwardCallback |
Callback for unicast packets to be forwarded. More... | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
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... | |
AODV routing protocol.
Doxygen introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Definition at line 53 of file aodv-routing-protocol.h.
ns3::aodv::RoutingProtocol::RoutingProtocol | ( | ) |
c-tor
Definition at line 120 of file aodv-routing-protocol.cc.
References m_nb, ns3::MakeCallback(), SendRerrWhenBreaksLinkToNextHop(), and ns3::aodv::Neighbors::SetCallback().
|
virtual |
Definition at line 274 of file aodv-routing-protocol.cc.
|
private |
Mark link to neighbor node as unidirectional for blacklistTimeout.
Definition at line 1588 of file aodv-routing-protocol.cc.
References m_routingTable, ns3::aodv::RoutingTable::MarkLinkAsUnidirectional(), and NS_LOG_FUNCTION.
Referenced by SendReplyByIntermediateNode().
int64_t ns3::aodv::RoutingProtocol::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned.
stream | first stream index to use |
Definition at line 299 of file aodv-routing-protocol.cc.
References m_uniformRandomVariable, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
|
private |
Queue packet and send route request.
Definition at line 375 of file aodv-routing-protocol.cc.
References ns3::aodv::RequestQueue::Enqueue(), ns3::Ipv4Header::GetDestination(), ns3::Ipv4Header::GetProtocol(), ns3::Packet::GetUid(), ns3::aodv::IN_SEARCH, ns3::aodv::RoutingTable::LookupRoute(), m_queue, m_routingTable, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, and SendRequest().
Referenced by RouteInput().
|
virtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
Definition at line 279 of file aodv-routing-protocol.cc.
References ns3::Object::DoDispose(), m_ipv4, and m_socketAddresses.
|
private |
Find socket with local interface address iface.
Definition at line 1822 of file aodv-routing-protocol.cc.
References m_socketAddresses, and NS_LOG_FUNCTION.
Referenced by NotifyAddAddress(), NotifyInterfaceDown(), NotifyRemoveAddress(), RecvReply(), SendReply(), SendReplyAck(), SendReplyByIntermediateNode(), SendRerrMessage(), and SendRerrWhenNoRouteToForward().
|
private |
If route exists and valid, forward packet.
Definition at line 517 of file aodv-routing-protocol.cc.
References ActiveRouteTimeout, ns3::Ipv4Header::GetDestination(), ns3::aodv::RoutingTableEntry::GetFlag(), ns3::Ipv4Route::GetGateway(), ns3::aodv::RoutingTableEntry::GetRoute(), ns3::aodv::RoutingTableEntry::GetSeqNo(), ns3::Ipv4Route::GetSource(), ns3::Ipv4Header::GetSource(), ns3::Packet::GetUid(), ns3::aodv::RoutingTableEntry::GetValidSeqNo(), ns3::aodv::RoutingTable::LookupRoute(), m_nb, m_routingTable, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::aodv::RoutingTable::Purge(), SendRerrWhenNoRouteToForward(), ns3::aodv::Neighbors::Update(), UpdateRouteLifeTime(), and ns3::aodv::VALID.
Referenced by RouteInput().
|
inline |
Definition at line 91 of file aodv-routing-protocol.h.
References EnableBroadcast.
Referenced by GetTypeId().
|
inline |
Definition at line 84 of file aodv-routing-protocol.h.
References DestinationOnly.
Referenced by GetTypeId().
|
inline |
Definition at line 86 of file aodv-routing-protocol.h.
References GratuitousReply.
Referenced by GetTypeId().
|
inline |
Definition at line 89 of file aodv-routing-protocol.h.
References EnableHello.
Referenced by GetTypeId().
|
inline |
Definition at line 82 of file aodv-routing-protocol.h.
References MaxQueueLen.
Referenced by GetTypeId().
|
inline |
Definition at line 80 of file aodv-routing-protocol.h.
References MaxQueueTime.
Referenced by GetTypeId().
|
static |
Definition at line 158 of file aodv-routing-protocol.cc.
References ActiveRouteTimeout, AllowedHelloLoss, BlackListTimeout, DeletePeriod, GetBroadcastEnable(), GetDesinationOnlyFlag(), GetGratuitousReplyFlag(), GetHelloEnable(), GetMaxQueueLen(), GetMaxQueueTime(), HelloInterval, m_uniformRandomVariable, ns3::MakeTimeChecker(), MyRouteTimeout, NetDiameter, NetTraversalTime, NextHopWait, NodeTraversalTime, PathDiscoveryTime, RerrRateLimit, RreqRateLimit, RreqRetries, SetBroadcastEnable(), SetDesinationOnlyFlag(), SetGratuitousReplyFlag(), SetHelloEnable(), SetMaxQueueLen(), SetMaxQueueTime(), and ns3::TypeId::SetParent().
|
private |
Schedule next send of hello message.
Definition at line 1552 of file aodv-routing-protocol.cc.
References ns3::Timer::Cancel(), HelloInterval, m_htimer, m_lastBcastTime, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Timer::Schedule(), and SendHello().
Referenced by SetIpv4().
|
private |
Check that packet is send from own interface.
Definition at line 764 of file aodv-routing-protocol.cc.
References ns3::Ipv4InterfaceAddress::GetLocal(), m_socketAddresses, and NS_LOG_FUNCTION.
Referenced by RecvReply(), RecvRequest(), and RouteInput().
|
private |
Create loopback route for given header.
Definition at line 780 of file aodv-routing-protocol.cc.
References ns3::Ipv4Header::GetDestination(), ns3::Ipv4Route::GetSource(), m_ipv4, m_lo, m_socketAddresses, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::Ipv4Route::SetDestination(), ns3::Ipv4Route::SetGateway(), ns3::Ipv4Route::SetOutputDevice(), and ns3::Ipv4Route::SetSource().
Referenced by RouteOutput().
|
virtual |
interface | the index of the interface we are being notified about |
address | a new address being added to an interface |
Protocols are expected to implement this method to be notified whenever a new address is added to an interface. Typically used to add a 'network route' on an interface. Can be invoked on an up or down interface.
Implements ns3::Ipv4RoutingProtocol.
Definition at line 679 of file aodv-routing-protocol.cc.
References ns3::aodv::RoutingTable::AddRoute(), AODV_PORT, ns3::Socket::Bind(), ns3::Socket::BindToNetDevice(), ns3::Socket::CreateSocket(), FindSocketWithInterfaceAddress(), ns3::Ipv4Address::GetAny(), ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Simulator::GetMaximumSimulationTime(), ns3::UdpSocketFactory::GetTypeId(), m_ipv4, m_routingTable, m_socketAddresses, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, RecvAodv(), ns3::Socket::SetAllowBroadcast(), and ns3::Socket::SetRecvCallback().
|
virtual |
interface | the index of the interface we are being notified about |
Protocols are expected to implement this method to be notified of the state change of an interface in a node.
Implements ns3::Ipv4RoutingProtocol.
Definition at line 643 of file aodv-routing-protocol.cc.
References ns3::Timer::Cancel(), ns3::aodv::Neighbors::Clear(), ns3::aodv::RoutingTable::Clear(), ns3::Socket::Close(), ns3::aodv::Neighbors::DelArpCache(), ns3::aodv::RoutingTable::DeleteAllRoutesFromInterface(), FindSocketWithInterfaceAddress(), ns3::aodv::Neighbors::GetTxErrorCallback(), m_htimer, m_ipv4, m_nb, m_routingTable, m_socketAddresses, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
virtual |
interface | the index of the interface we are being notified about |
Protocols are expected to implement this method to be notified of the state change of an interface in a node.
Implements ns3::Ipv4RoutingProtocol.
Definition at line 601 of file aodv-routing-protocol.cc.
References ns3::aodv::Neighbors::AddArpCache(), ns3::aodv::RoutingTable::AddRoute(), AODV_PORT, ns3::Socket::Bind(), ns3::Socket::BindToNetDevice(), ns3::Socket::CreateSocket(), ns3::Ipv4Address::GetAny(), ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Simulator::GetMaximumSimulationTime(), ns3::aodv::Neighbors::GetTxErrorCallback(), ns3::UdpSocketFactory::GetTypeId(), m_ipv4, m_nb, m_routingTable, m_socketAddresses, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_WARN, RecvAodv(), ns3::Socket::SetAllowBroadcast(), ns3::ObjectBase::SetAttribute(), and ns3::Socket::SetRecvCallback().
|
virtual |
interface | the index of the interface we are being notified about |
address | a new address being added to an interface |
Protocols are expected to implement this method to be notified whenever a new address is removed from an interface. Typically used to remove the 'network route' of an interface. Can be invoked on an up or down interface.
Implements ns3::Ipv4RoutingProtocol.
Definition at line 720 of file aodv-routing-protocol.cc.
References ns3::aodv::RoutingTable::AddRoute(), AODV_PORT, ns3::Socket::Bind(), ns3::Timer::Cancel(), ns3::aodv::Neighbors::Clear(), ns3::aodv::RoutingTable::Clear(), ns3::Socket::CreateSocket(), ns3::aodv::RoutingTable::DeleteAllRoutesFromInterface(), FindSocketWithInterfaceAddress(), ns3::Ipv4Address::GetAny(), ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Simulator::GetMaximumSimulationTime(), ns3::UdpSocketFactory::GetTypeId(), m_htimer, m_ipv4, m_nb, m_routingTable, m_socketAddresses, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, RecvAodv(), ns3::Socket::SetAllowBroadcast(), and ns3::Socket::SetRecvCallback().
|
virtual |
Print the Routing Table entries.
stream | the ostream the Routing table is printed to |
Implements ns3::Ipv4RoutingProtocol.
Definition at line 292 of file aodv-routing-protocol.cc.
References ns3::Time::GetSeconds(), ns3::OutputStreamWrapper::GetStream(), m_ipv4, m_routingTable, ns3::Simulator::Now(), and ns3::aodv::RoutingTable::Print().
|
private |
Process hello message.
Definition at line 1424 of file aodv-routing-protocol.cc.
References ns3::aodv::RoutingTable::AddRoute(), AllowedHelloLoss, EnableHello, ns3::aodv::RrepHeader::GetDst(), ns3::aodv::RrepHeader::GetDstSeqno(), ns3::aodv::RrepHeader::GetLifeTime(), HelloInterval, ns3::aodv::RoutingTable::LookupRoute(), m_ipv4, m_nb, m_routingTable, NS_LOG_FUNCTION, ns3::aodv::Neighbors::Update(), ns3::aodv::RoutingTable::Update(), and ns3::aodv::VALID.
Referenced by RecvReply().
Receive and process control packet.
Definition at line 935 of file aodv-routing-protocol.cc.
References ns3::aodv::AODVTYPE_RERR, ns3::aodv::AODVTYPE_RREP, ns3::aodv::AODVTYPE_RREP_ACK, ns3::aodv::AODVTYPE_RREQ, ns3::InetSocketAddress::ConvertFrom(), ns3::aodv::TypeHeader::Get(), ns3::InetSocketAddress::GetIpv4(), ns3::Packet::GetUid(), ns3::aodv::TypeHeader::IsValid(), m_socketAddresses, NS_LOG_DEBUG, NS_LOG_FUNCTION, RecvError(), ns3::Socket::RecvFrom(), RecvReply(), RecvReplyAck(), RecvRequest(), ns3::Packet::RemoveHeader(), and UpdateRouteToNeighbor().
Referenced by NotifyAddAddress(), NotifyInterfaceUp(), and NotifyRemoveAddress().
|
private |
Receive RERR from node with address src.
Definition at line 1458 of file aodv-routing-protocol.cc.
References ns3::Packet::AddHeader(), ns3::aodv::RerrHeader::AddUnDestination(), ns3::aodv::AODVTYPE_RERR, ns3::aodv::RerrHeader::Clear(), ns3::aodv::RerrHeader::GetDestCount(), ns3::aodv::RoutingTable::GetListOfDestinationWithNextHop(), ns3::aodv::RoutingTableEntry::GetPrecursors(), ns3::aodv::RoutingTable::InvalidateRoutesWithDst(), ns3::aodv::RoutingTable::LookupRoute(), m_routingTable, NS_LOG_FUNCTION, ns3::Packet::RemoveHeader(), ns3::aodv::RerrHeader::RemoveUnDestination(), and SendRerrMessage().
Referenced by RecvAodv().
|
private |
Receive RREP.
Definition at line 1285 of file aodv-routing-protocol.cc.
References ActiveRouteTimeout, ns3::Packet::AddHeader(), ns3::aodv::RoutingTable::AddRoute(), AODV_PORT, ns3::aodv::AODVTYPE_RREP, FindSocketWithInterfaceAddress(), ns3::aodv::RrepHeader::GetAckRequired(), ns3::aodv::RrepHeader::GetDst(), ns3::aodv::RrepHeader::GetDstSeqno(), ns3::aodv::RoutingTableEntry::GetFlag(), ns3::aodv::RrepHeader::GetHopCount(), ns3::aodv::RoutingTableEntry::GetInterface(), ns3::aodv::RoutingTableEntry::GetLifeTime(), ns3::aodv::RrepHeader::GetLifeTime(), ns3::aodv::RoutingTableEntry::GetNextHop(), ns3::aodv::RrepHeader::GetOrigin(), ns3::aodv::IN_SEARCH, ns3::aodv::RoutingTableEntry::InsertPrecursor(), IsMyOwnAddress(), ns3::aodv::RoutingTable::LookupRoute(), ns3::aodv::RoutingTable::LookupValidRoute(), m_addressReqTimer, m_ipv4, m_routingTable, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, ProcessHello(), ns3::Packet::RemoveHeader(), SendPacketFromQueue(), SendReplyAck(), ns3::Socket::SendTo(), ns3::aodv::RrepHeader::SetAckRequired(), ns3::aodv::RrepHeader::SetHopCount(), ns3::aodv::RoutingTableEntry::SetLifeTime(), ns3::aodv::RoutingTable::Update(), and ns3::aodv::VALID.
Referenced by RecvAodv().
|
private |
Receive RREP_ACK.
Definition at line 1411 of file aodv-routing-protocol.cc.
References ns3::Timer::Cancel(), ns3::aodv::RoutingTable::LookupRoute(), ns3::aodv::RoutingTableEntry::m_ackTimer, m_routingTable, NS_LOG_FUNCTION, ns3::aodv::RoutingTableEntry::SetFlag(), ns3::aodv::RoutingTable::Update(), and ns3::aodv::VALID.
Referenced by RecvAodv().
|
private |
Receive RREQ.
Definition at line 1029 of file aodv-routing-protocol.cc.
References ActiveRouteTimeout, ns3::Packet::AddHeader(), ns3::aodv::RoutingTable::AddRoute(), AllowedHelloLoss, ns3::aodv::AODVTYPE_RREQ, ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::aodv::RreqHeader::GetDestinationOnly(), ns3::aodv::RreqHeader::GetDst(), ns3::aodv::RreqHeader::GetDstSeqno(), ns3::aodv::RoutingTableEntry::GetFlag(), ns3::aodv::RreqHeader::GetGratiousRrep(), ns3::aodv::RreqHeader::GetHopCount(), ns3::aodv::RreqHeader::GetId(), ns3::UniformRandomVariable::GetInteger(), ns3::aodv::RoutingTableEntry::GetLifeTime(), ns3::Ipv4InterfaceAddress::GetMask(), ns3::aodv::RoutingTableEntry::GetNextHop(), ns3::Ipv4Mask::GetOnes(), ns3::aodv::RreqHeader::GetOrigin(), ns3::aodv::RreqHeader::GetOriginSeqno(), ns3::aodv::RoutingTableEntry::GetSeqNo(), ns3::aodv::RreqHeader::GetUnknownSeqno(), ns3::aodv::RoutingTableEntry::GetValidSeqNo(), HelloInterval, ns3::aodv::IdCache::IsDuplicate(), IsMyOwnAddress(), ns3::aodv::RoutingTableEntry::IsUnidirectional(), ns3::aodv::RoutingTable::LookupRoute(), m_ipv4, m_lastBcastTime, m_nb, m_routingTable, m_rreqIdCache, m_socketAddresses, m_uniformRandomVariable, NetTraversalTime, NodeTraversalTime, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Packet::RemoveHeader(), ns3::Simulator::Schedule(), SendReply(), SendReplyByIntermediateNode(), SendTo(), ns3::aodv::RreqHeader::SetDstSeqno(), ns3::aodv::RoutingTableEntry::SetFlag(), ns3::aodv::RoutingTableEntry::SetHop(), ns3::aodv::RreqHeader::SetHopCount(), ns3::aodv::RoutingTableEntry::SetInterface(), ns3::aodv::RoutingTableEntry::SetLifeTime(), ns3::aodv::RoutingTableEntry::SetNextHop(), ns3::aodv::RoutingTableEntry::SetOutputDevice(), ns3::aodv::RoutingTableEntry::SetSeqNo(), ns3::aodv::RreqHeader::SetUnknownSeqno(), ns3::aodv::RoutingTableEntry::SetValidSeqNo(), ns3::aodv::Neighbors::Update(), ns3::aodv::RoutingTable::Update(), and ns3::aodv::VALID.
Referenced by RecvAodv().
|
private |
Reset RERR count and schedule RERR rate limit timer with delay 1 sec.
Definition at line 1580 of file aodv-routing-protocol.cc.
References m_rerrCount, m_rerrRateLimitTimer, NS_LOG_FUNCTION, and ns3::Timer::Schedule().
Referenced by Start().
|
virtual |
Route an input packet (to be forwarded or locally delivered)
This lookup is used in the forwarding process. The packet is handed over to the Ipv4RoutingProtocol, and will get forwarded onward by one of the callbacks. The Linux equivalent is ip_route_input(). There are four valid outcomes, and a matching callbacks to handle each.
p | received packet |
header | input parameter used to form a search key for a route |
idev | Pointer to ingress network device |
ucb | Callback for the case in which the packet is to be forwarded as unicast |
mcb | Callback for the case in which the packet is to be forwarded as multicast |
lcb | Callback for the case in which the packet is to be locally delivered |
ecb | Callback to call if there is an error in forwarding |
Implements ns3::Ipv4RoutingProtocol.
Definition at line 397 of file aodv-routing-protocol.cc.
References ActiveRouteTimeout, ns3::Packet::Copy(), DeferredRouteOutput(), EnableBroadcast, ns3::Socket::ERROR_NOROUTETOHOST, Forwarding(), ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::Ipv4Header::GetDestination(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::aodv::RoutingTableEntry::GetNextHop(), ns3::Ipv4Header::GetSource(), ns3::Ipv4Header::GetTtl(), ns3::Packet::GetUid(), ns3::Ipv4Address::IsBroadcast(), ns3::aodv::DuplicatePacketDetection::IsDuplicate(), ns3::Ipv4Address::IsMulticast(), IsMyOwnAddress(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), ns3::aodv::RoutingTable::LookupRoute(), ns3::aodv::RoutingTable::LookupValidRoute(), m_dpd, m_ipv4, m_lo, m_nb, m_routingTable, m_socketAddresses, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Packet::PeekPacketTag(), ns3::aodv::Neighbors::Update(), and UpdateRouteLifeTime().
|
virtual |
Query routing cache for an existing route, for an outbound packet.
This lookup is used by transport protocols. It does not cause any packet to be forwarded, and is synchronous. Can be used for multicast or unicast. The Linux equivalent is ip_route_output()
The header input parameter may have an uninitialized value for the source address, but the destination address should always be properly set by the caller.
p | packet to be routed. Note that this method may modify the packet. Callers may also pass in a null pointer. |
header | input parameter (used to form key to search for the route) |
oif | Output interface Netdevice. May be zero, or may be bound via socket options to a particular output interface. |
sockerr | Output parameter; socket errno |
Implements ns3::Ipv4RoutingProtocol.
Definition at line 325 of file aodv-routing-protocol.cc.
References ActiveRouteTimeout, ns3::Packet::AddPacketTag(), ns3::Socket::ERROR_NOROUTETOHOST, ns3::Socket::ERROR_NOTERROR, ns3::Ipv4Route::GetDestination(), ns3::Ipv4Header::GetDestination(), ns3::Ipv4Route::GetGateway(), ns3::Ipv4Route::GetOutputDevice(), ns3::aodv::RoutingTableEntry::GetRoute(), ns3::Ipv4Route::GetSource(), ns3::aodv::RoutingTable::LookupValidRoute(), LoopbackRoute(), m_ipv4, m_routingTable, m_socketAddresses, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Packet::PeekPacketTag(), and UpdateRouteLifeTime().
|
private |
Handle route discovery process.
Definition at line 1512 of file aodv-routing-protocol.cc.
References ns3::aodv::RoutingTable::DeleteRoute(), ns3::aodv::RequestQueue::DropPacketWithDst(), ns3::aodv::RoutingTableEntry::GetFlag(), ns3::aodv::RoutingTableEntry::GetRoute(), ns3::aodv::RoutingTableEntry::GetRreqCnt(), ns3::aodv::IN_SEARCH, ns3::aodv::RoutingTable::LookupValidRoute(), m_addressReqTimer, m_queue, m_routingTable, NetDiameter, NS_LOG_DEBUG, NS_LOG_LOGIC, RreqRetries, SendPacketFromQueue(), and SendRequest().
Referenced by ScheduleRreqRetry().
|
private |
Reset RREQ count and schedule RREQ rate limit timer with delay 1 sec.
Definition at line 1572 of file aodv-routing-protocol.cc.
References m_rreqCount, m_rreqRateLimitTimer, NS_LOG_FUNCTION, and ns3::Timer::Schedule().
Referenced by Start().
|
private |
To reduce congestion in a network, repeated attempts by a source node at route discovery for a single destination MUST utilize a binary exponential backoff.
Definition at line 915 of file aodv-routing-protocol.cc.
References ns3::Timer::CANCEL_ON_DESTROY, ns3::aodv::RoutingTableEntry::GetRreqCnt(), ns3::aodv::RoutingTableEntry::IncrementRreqCnt(), ns3::aodv::RoutingTable::LookupRoute(), m_addressReqTimer, m_routingTable, NetTraversalTime, NS_LOG_FUNCTION, NS_LOG_LOGIC, RouteRequestTimerExpire(), and ns3::aodv::RoutingTable::Update().
Referenced by SendRequest().
|
private |
Send hello.
Definition at line 1595 of file aodv-routing-protocol.cc.
References ns3::Packet::AddHeader(), AllowedHelloLoss, ns3::aodv::AODVTYPE_RREP, ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::UniformRandomVariable::GetInteger(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4InterfaceAddress::GetMask(), ns3::Ipv4Mask::GetOnes(), HelloInterval, m_seqNo, m_socketAddresses, m_uniformRandomVariable, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and SendTo().
Referenced by HelloTimerExpire().
|
private |
Forward packet from route request queue.
Definition at line 1630 of file aodv-routing-protocol.cc.
References ns3::aodv::RequestQueue::Dequeue(), ns3::aodv::DeferredRouteOutputTag::GetInterface(), ns3::aodv::QueueEntry::GetIpv4Header(), ns3::Ipv4Route::GetOutputDevice(), ns3::aodv::QueueEntry::GetPacket(), ns3::Ipv4Route::GetSource(), ns3::Ipv4Header::GetTtl(), ns3::aodv::QueueEntry::GetUnicastForwardCallback(), m_ipv4, m_queue, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::RemovePacketTag(), ns3::Ipv4Header::SetSource(), and ns3::Ipv4Header::SetTtl().
Referenced by RecvReply(), and RouteRequestTimerExpire().
|
private |
Send RREP.
Definition at line 1200 of file aodv-routing-protocol.cc.
References ns3::Packet::AddHeader(), AODV_PORT, ns3::aodv::AODVTYPE_RREP, FindSocketWithInterfaceAddress(), ns3::aodv::RoutingTableEntry::GetDestination(), ns3::aodv::RreqHeader::GetDst(), ns3::aodv::RreqHeader::GetDstSeqno(), ns3::aodv::RoutingTableEntry::GetInterface(), ns3::aodv::RoutingTableEntry::GetNextHop(), ns3::aodv::RreqHeader::GetUnknownSeqno(), m_seqNo, MyRouteTimeout, NS_ASSERT, NS_LOG_FUNCTION, and ns3::Socket::SendTo().
Referenced by RecvRequest().
|
private |
Send RREP_ACK.
Definition at line 1269 of file aodv-routing-protocol.cc.
References ns3::Packet::AddHeader(), AODV_PORT, ns3::aodv::AODVTYPE_RREP_ACK, FindSocketWithInterfaceAddress(), ns3::aodv::RoutingTableEntry::GetInterface(), ns3::aodv::RoutingTable::LookupRoute(), m_routingTable, NS_ASSERT, NS_LOG_FUNCTION, and ns3::Socket::SendTo().
Referenced by RecvReply().
|
private |
Send RREP by intermediate node.
toDst | routing table entry to destination |
toOrigin | routing table entry to originator |
gratRep | indicates whether a gratuitous RREP should be unicast to destination |
Definition at line 1221 of file aodv-routing-protocol.cc.
References AckTimerExpire(), ns3::Packet::AddHeader(), AODV_PORT, ns3::aodv::AODVTYPE_RREP, BlackListTimeout, FindSocketWithInterfaceAddress(), ns3::aodv::RoutingTableEntry::GetDestination(), ns3::aodv::RoutingTableEntry::GetHop(), ns3::aodv::RoutingTableEntry::GetInterface(), ns3::aodv::RoutingTableEntry::GetLifeTime(), ns3::aodv::RoutingTableEntry::GetNextHop(), ns3::aodv::RoutingTableEntry::GetSeqNo(), ns3::Packet::GetUid(), ns3::aodv::RoutingTableEntry::InsertPrecursor(), ns3::aodv::RoutingTable::LookupRoute(), ns3::aodv::RoutingTableEntry::m_ackTimer, m_routingTable, NextHopWait, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Socket::SendTo(), ns3::aodv::RrepHeader::SetAckRequired(), ns3::Timer::SetArguments(), ns3::Timer::SetDelay(), ns3::Timer::SetFunction(), and ns3::aodv::RoutingTable::Update().
Referenced by RecvRequest().
|
private |
Send RREQ.
Definition at line 828 of file aodv-routing-protocol.cc.
References ns3::Packet::AddHeader(), ns3::aodv::RoutingTable::AddRoute(), ns3::aodv::AODVTYPE_RREQ, DestinationOnly, ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::Timer::GetDelayLeft(), ns3::aodv::RoutingTableEntry::GetHop(), ns3::aodv::RreqHeader::GetId(), ns3::UniformRandomVariable::GetInteger(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4InterfaceAddress::GetMask(), ns3::Ipv4Mask::GetOnes(), ns3::aodv::RoutingTableEntry::GetSeqNo(), ns3::aodv::RoutingTableEntry::GetValidSeqNo(), GratuitousReply, ns3::aodv::IN_SEARCH, ns3::aodv::IdCache::IsDuplicate(), ns3::aodv::RoutingTable::LookupRoute(), m_lastBcastTime, m_requestId, m_routingTable, m_rreqCount, m_rreqIdCache, m_rreqRateLimitTimer, m_seqNo, m_socketAddresses, m_uniformRandomVariable, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, RreqRateLimit, ns3::Simulator::Schedule(), ScheduleRreqRetry(), SendTo(), ns3::aodv::RreqHeader::SetDestinationOnly(), ns3::aodv::RreqHeader::SetDst(), ns3::aodv::RreqHeader::SetDstSeqno(), ns3::aodv::RoutingTableEntry::SetFlag(), ns3::aodv::RreqHeader::SetGratiousRrep(), ns3::aodv::RreqHeader::SetHopCount(), ns3::aodv::RreqHeader::SetId(), ns3::aodv::RreqHeader::SetOrigin(), ns3::aodv::RreqHeader::SetOriginSeqno(), ns3::aodv::RreqHeader::SetUnknownSeqno(), and ns3::aodv::RoutingTable::Update().
Referenced by DeferredRouteOutput(), and RouteRequestTimerExpire().
|
private |
Forward RERR.
Definition at line 1755 of file aodv-routing-protocol.cc.
References FindSocketWithInterfaceAddress(), ns3::Timer::GetDelayLeft(), ns3::aodv::RoutingTableEntry::GetDestination(), ns3::UniformRandomVariable::GetInteger(), ns3::aodv::RoutingTableEntry::GetInterface(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4Mask::GetOnes(), ns3::Time::GetSeconds(), ns3::Timer::IsRunning(), ns3::aodv::RoutingTable::LookupValidRoute(), m_rerrCount, m_rerrRateLimitTimer, m_routingTable, m_uniformRandomVariable, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, RerrRateLimit, ns3::Simulator::Schedule(), and SendTo().
Referenced by RecvError(), and SendRerrWhenBreaksLinkToNextHop().
|
private |
Initiate RERR.
Definition at line 1654 of file aodv-routing-protocol.cc.
References ns3::Packet::AddHeader(), ns3::aodv::RerrHeader::AddUnDestination(), ns3::aodv::AODVTYPE_RERR, ns3::aodv::RerrHeader::Clear(), ns3::aodv::RerrHeader::GetDestCount(), ns3::aodv::RoutingTable::GetListOfDestinationWithNextHop(), ns3::aodv::RoutingTableEntry::GetPrecursors(), ns3::aodv::RoutingTableEntry::GetSeqNo(), ns3::aodv::RoutingTable::InvalidateRoutesWithDst(), ns3::aodv::RoutingTable::LookupRoute(), m_routingTable, NS_LOG_FUNCTION, NS_LOG_LOGIC, and SendRerrMessage().
Referenced by RoutingProtocol().
|
private |
Send RERR message when no route to forward input packet.
Unicast if there is reverse route to originating node, broadcast otherwise.
dst | - destination node IP address |
dstSeqNo | - destination node sequence number |
origin | - originating node IP address |
Definition at line 1701 of file aodv-routing-protocol.cc.
References ns3::Packet::AddHeader(), ns3::aodv::RerrHeader::AddUnDestination(), AODV_PORT, ns3::aodv::AODVTYPE_RERR, FindSocketWithInterfaceAddress(), ns3::Ipv4InterfaceAddress::GetBroadcast(), ns3::Timer::GetDelayLeft(), ns3::aodv::RoutingTableEntry::GetInterface(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4InterfaceAddress::GetMask(), ns3::aodv::RoutingTableEntry::GetNextHop(), ns3::Ipv4Mask::GetOnes(), ns3::Time::GetSeconds(), ns3::Timer::IsRunning(), ns3::aodv::RoutingTable::LookupValidRoute(), m_rerrCount, m_rerrRateLimitTimer, m_routingTable, m_socketAddresses, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, RerrRateLimit, and ns3::Socket::SendTo().
Referenced by Forwarding().
|
private |
Definition at line 909 of file aodv-routing-protocol.cc.
References AODV_PORT, and ns3::Socket::SendTo().
Referenced by RecvRequest(), SendHello(), SendRequest(), and SendRerrMessage().
|
inline |
Definition at line 90 of file aodv-routing-protocol.h.
References EnableBroadcast.
Referenced by GetTypeId().
|
inline |
Definition at line 85 of file aodv-routing-protocol.h.
References DestinationOnly.
Referenced by GetTypeId().
|
inline |
Definition at line 87 of file aodv-routing-protocol.h.
References GratuitousReply.
Referenced by GetTypeId().
|
inline |
Definition at line 88 of file aodv-routing-protocol.h.
References EnableHello.
Referenced by GetTypeId().
ipv4 | the ipv4 object this routing protocol is being associated with |
Typically, invoked directly or indirectly from ns3::Ipv4::SetRoutingProtocol
Implements ns3::Ipv4RoutingProtocol.
Definition at line 573 of file aodv-routing-protocol.cc.
References ns3::aodv::RoutingTable::AddRoute(), EnableHello, ns3::UniformRandomVariable::GetInteger(), ns3::Ipv4Address::GetLoopback(), ns3::Simulator::GetMaximumSimulationTime(), HelloTimerExpire(), m_htimer, m_ipv4, m_lo, m_routingTable, m_uniformRandomVariable, NS_ASSERT, ns3::Timer::Schedule(), ns3::Simulator::ScheduleNow(), ns3::Timer::SetFunction(), and Start().
void ns3::aodv::RoutingProtocol::SetMaxQueueLen | ( | uint32_t | len | ) |
Definition at line 262 of file aodv-routing-protocol.cc.
References m_queue, MaxQueueLen, and ns3::aodv::RequestQueue::SetMaxQueueLen().
Referenced by GetTypeId().
void ns3::aodv::RoutingProtocol::SetMaxQueueTime | ( | Time | t | ) |
Definition at line 268 of file aodv-routing-protocol.cc.
References m_queue, MaxQueueTime, and ns3::aodv::RequestQueue::SetQueueTimeout().
Referenced by GetTypeId().
|
private |
Start protocol operation.
Definition at line 307 of file aodv-routing-protocol.cc.
References EnableHello, m_nb, m_rerrRateLimitTimer, m_rreqRateLimitTimer, NS_LOG_FUNCTION, RerrRateLimitTimerExpire(), RreqRateLimitTimerExpire(), ns3::Timer::Schedule(), ns3::aodv::Neighbors::ScheduleTimer(), and ns3::Timer::SetFunction().
Referenced by SetIpv4().
|
private |
Set lifetime field in routing table entry to the maximum of existing lifetime and lt, if the entry exists.
addr | - destination address |
lt | - proposed time for lifetime field in routing table entry for destination with address addr. |
Definition at line 979 of file aodv-routing-protocol.cc.
References ns3::aodv::RoutingTableEntry::GetFlag(), ns3::aodv::RoutingTableEntry::GetLifeTime(), ns3::aodv::RoutingTable::LookupRoute(), m_routingTable, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::aodv::RoutingTableEntry::SetLifeTime(), ns3::aodv::RoutingTableEntry::SetRreqCnt(), ns3::aodv::RoutingTable::Update(), and ns3::aodv::VALID.
Referenced by Forwarding(), RouteInput(), and RouteOutput().
|
private |
Update neighbor record.
receiver | is supposed to be my interface |
sender | is supposed to be IP address of my neighbor. |
Definition at line 998 of file aodv-routing-protocol.cc.
References ActiveRouteTimeout, ns3::aodv::RoutingTable::AddRoute(), ns3::aodv::RoutingTableEntry::GetHop(), ns3::aodv::RoutingTableEntry::GetLifeTime(), ns3::aodv::RoutingTableEntry::GetOutputDevice(), ns3::aodv::RoutingTableEntry::GetValidSeqNo(), ns3::aodv::RoutingTable::LookupRoute(), m_ipv4, m_routingTable, NS_LOG_FUNCTION, ns3::aodv::RoutingTableEntry::SetLifeTime(), and ns3::aodv::RoutingTable::Update().
Referenced by RecvAodv().
|
private |
Period of time during which the route is considered to be valid.
Definition at line 110 of file aodv-routing-protocol.h.
Referenced by Forwarding(), GetTypeId(), RecvReply(), RecvRequest(), RouteInput(), RouteOutput(), and UpdateRouteToNeighbor().
|
private |
Number of hello messages which may be loss for valid link.
Definition at line 125 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), ProcessHello(), RecvRequest(), and SendHello().
|
static |
UDP Port for AODV control traffic.
Definition at line 57 of file aodv-routing-protocol.h.
Referenced by NotifyAddAddress(), NotifyInterfaceUp(), NotifyRemoveAddress(), RecvReply(), SendReply(), SendReplyAck(), SendReplyByIntermediateNode(), SendRerrWhenNoRouteToForward(), and SendTo().
|
private |
Time for which the node is put into the blacklist.
Definition at line 132 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), and SendReplyByIntermediateNode().
|
private |
DeletePeriod is intended to provide an upper bound on the time for which an upstream node A can have a neighbor B as an active next hop for destination D, while B has invalidated the route to D.
Definition at line 130 of file aodv-routing-protocol.h.
Referenced by GetTypeId().
|
private |
Indicates only the destination may respond to this RREQ.
Definition at line 135 of file aodv-routing-protocol.h.
Referenced by GetDesinationOnlyFlag(), SendRequest(), and SetDesinationOnlyFlag().
|
private |
Indicates whether a a broadcast data packets forwarding enable.
Definition at line 138 of file aodv-routing-protocol.h.
Referenced by GetBroadcastEnable(), RouteInput(), and SetBroadcastEnable().
|
private |
Indicates whether a hello messages enable.
Definition at line 137 of file aodv-routing-protocol.h.
Referenced by GetHelloEnable(), ProcessHello(), SetHelloEnable(), SetIpv4(), and Start().
|
private |
Indicates whether a gratuitous RREP should be unicast to the node originated route discovery.
Definition at line 136 of file aodv-routing-protocol.h.
Referenced by GetGratuitousReplyFlag(), SendRequest(), and SetGratuitousReplyFlag().
|
private |
Every HelloInterval the node checks whether it has sent a broadcast within the last HelloInterval.
If it has not, it MAY broadcast a Hello message
Definition at line 124 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), HelloTimerExpire(), ProcessHello(), RecvRequest(), and SendHello().
|
private |
Map IP address + RREQ timer.
Definition at line 261 of file aodv-routing-protocol.h.
Referenced by RecvReply(), RouteRequestTimerExpire(), and ScheduleRreqRetry().
|
private |
Handle duplicated broadcast/multicast packets.
Definition at line 159 of file aodv-routing-protocol.h.
Referenced by RouteInput().
|
private |
Hello timer.
Definition at line 249 of file aodv-routing-protocol.h.
Referenced by HelloTimerExpire(), NotifyInterfaceDown(), NotifyRemoveAddress(), and SetIpv4().
IP protocol.
Definition at line 142 of file aodv-routing-protocol.h.
Referenced by DoDispose(), LoopbackRoute(), NotifyAddAddress(), NotifyInterfaceDown(), NotifyInterfaceUp(), NotifyRemoveAddress(), PrintRoutingTable(), ProcessHello(), RecvReply(), RecvRequest(), RouteInput(), RouteOutput(), SendPacketFromQueue(), SetIpv4(), and UpdateRouteToNeighbor().
|
private |
Keep track of the last bcast time.
Definition at line 270 of file aodv-routing-protocol.h.
Referenced by HelloTimerExpire(), RecvRequest(), and SendRequest().
Loopback device used to defer RREQ until packet will be fully formed.
Definition at line 146 of file aodv-routing-protocol.h.
Referenced by LoopbackRoute(), RouteInput(), and SetIpv4().
|
private |
Handle neighbors.
Definition at line 161 of file aodv-routing-protocol.h.
Referenced by Forwarding(), NotifyInterfaceDown(), NotifyInterfaceUp(), NotifyRemoveAddress(), ProcessHello(), RecvRequest(), RouteInput(), RoutingProtocol(), and Start().
|
private |
A "drop-front" queue used by the routing layer to buffer packets to which it does not have a route.
Definition at line 151 of file aodv-routing-protocol.h.
Referenced by DeferredRouteOutput(), RouteRequestTimerExpire(), SendPacketFromQueue(), SetMaxQueueLen(), and SetMaxQueueTime().
|
private |
|
private |
Number of RERRs used for RERR rate control.
Definition at line 165 of file aodv-routing-protocol.h.
Referenced by RerrRateLimitTimerExpire(), SendRerrMessage(), and SendRerrWhenNoRouteToForward().
|
private |
RERR rate limit timer.
Definition at line 257 of file aodv-routing-protocol.h.
Referenced by RerrRateLimitTimerExpire(), SendRerrMessage(), SendRerrWhenNoRouteToForward(), and Start().
|
private |
Routing table.
Definition at line 149 of file aodv-routing-protocol.h.
Referenced by AckTimerExpire(), DeferredRouteOutput(), Forwarding(), NotifyAddAddress(), NotifyInterfaceDown(), NotifyInterfaceUp(), NotifyRemoveAddress(), PrintRoutingTable(), ProcessHello(), RecvError(), RecvReply(), RecvReplyAck(), RecvRequest(), RouteInput(), RouteOutput(), RouteRequestTimerExpire(), ScheduleRreqRetry(), SendReplyAck(), SendReplyByIntermediateNode(), SendRequest(), SendRerrMessage(), SendRerrWhenBreaksLinkToNextHop(), SendRerrWhenNoRouteToForward(), SetIpv4(), UpdateRouteLifeTime(), and UpdateRouteToNeighbor().
|
private |
Number of RREQs used for RREQ rate control.
Definition at line 163 of file aodv-routing-protocol.h.
Referenced by RreqRateLimitTimerExpire(), and SendRequest().
|
private |
Handle duplicated RREQ.
Definition at line 157 of file aodv-routing-protocol.h.
Referenced by RecvRequest(), and SendRequest().
|
private |
RREQ rate limit timer.
Definition at line 253 of file aodv-routing-protocol.h.
Referenced by RreqRateLimitTimerExpire(), SendRequest(), and Start().
|
private |
Request sequence number.
Definition at line 155 of file aodv-routing-protocol.h.
Referenced by SendHello(), SendReply(), and SendRequest().
|
private |
Raw socket per each IP interface, map socket -> iface address (IP + mask)
Definition at line 144 of file aodv-routing-protocol.h.
Referenced by DoDispose(), FindSocketWithInterfaceAddress(), IsMyOwnAddress(), LoopbackRoute(), NotifyAddAddress(), NotifyInterfaceDown(), NotifyInterfaceUp(), NotifyRemoveAddress(), RecvAodv(), RecvRequest(), RouteInput(), RouteOutput(), SendHello(), SendRequest(), and SendRerrWhenNoRouteToForward().
|
private |
Provides uniform random variables.
Definition at line 268 of file aodv-routing-protocol.h.
Referenced by AssignStreams(), GetTypeId(), RecvRequest(), SendHello(), SendRequest(), SendRerrMessage(), and SetIpv4().
|
private |
The maximum number of packets that we allow a routing protocol to buffer.
Definition at line 133 of file aodv-routing-protocol.h.
Referenced by GetMaxQueueLen(), and SetMaxQueueLen().
|
private |
The maximum period of time that a routing protocol is allowed to buffer a packet for.
Definition at line 134 of file aodv-routing-protocol.h.
Referenced by GetMaxQueueTime(), and SetMaxQueueTime().
|
private |
Value of lifetime field in RREP generating by this node.
Definition at line 119 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), and SendReply().
|
private |
Net diameter measures the maximum possible number of hops between two nodes in the network.
Definition at line 111 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), and RouteRequestTimerExpire().
|
private |
Estimate of the average net traversal time.
Definition at line 117 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), RecvRequest(), and ScheduleRreqRetry().
|
private |
Period of our waiting for the neighbour's RREP_ACK.
Definition at line 131 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), and SendReplyByIntermediateNode().
|
private |
NodeTraversalTime is a conservative estimate of the average one hop traversal time for packets and should include queuing delays, interrupt processing times and transfer times.
Definition at line 116 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), and RecvRequest().
|
private |
Estimate of maximum time needed to find route in network.
Definition at line 118 of file aodv-routing-protocol.h.
Referenced by GetTypeId().
|
private |
Maximum number of REER per second.
Definition at line 109 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), SendRerrMessage(), and SendRerrWhenNoRouteToForward().
|
private |
Maximum number of RREQ per second.
Definition at line 108 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), and SendRequest().
|
private |
Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route.
Definition at line 107 of file aodv-routing-protocol.h.
Referenced by GetTypeId(), and RouteRequestTimerExpire().