A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::olsr::RoutingProtocol Class Reference

OLSR routing protocol for IPv4. More...

#include <olsr-routing-protocol.h>

+ Inheritance diagram for ns3::olsr::RoutingProtocol:

Public Member Functions

void AddHostNetworkAssociation (Ipv4Address networkAddr, Ipv4Mask netmask)
 Inject Association to be sent in HNA message. More...
 
int64_t AssignStreams (int64_t stream)
 
void Dump (void)
 
std::set< uint32_t > GetInterfaceExclusions () const
 
std::vector< RoutingTableEntryGetRoutingTableEntries () const
 
void RemoveHostNetworkAssociation (Ipv4Address networkAddr, Ipv4Mask netmask)
 Removes Association sent in HNA message. More...
 
void SetInterfaceExclusions (std::set< uint32_t > exceptions)
 
void SetMainInterface (uint32_t interface)
 Set the OLSR main address to the first address on the indicated interface. More...
 
void SetRoutingTableAssociation (Ptr< Ipv4StaticRouting > routingTable)
 Inject Associations from an Ipv4StaticRouting instance. More...
 
- Public Member Functions inherited from ns3::Ipv4RoutingProtocol
virtual void SetRepository (Ptr< Repository > repo)
 Set cognitive radio repository. More...
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
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)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 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
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)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Protected Member Functions

virtual void DoInitialize (void)
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Private Member Functions

void AddAssociationTuple (const AssociationTuple &tuple)
 Adds a host network association tuple to the Association Set. More...
 
void AddDuplicateTuple (const DuplicateTuple &tuple)
 Adds a duplicate tuple to the Duplicate Set. More...
 
void AddEntry (const Ipv4Address &dest, const Ipv4Address &next, uint32_t interface, uint32_t distance)
 Adds a new entry into the routing table. More...
 
void AddEntry (const Ipv4Address &dest, const Ipv4Address &next, const Ipv4Address &interfaceAddress, uint32_t distance)
 
void AddIfaceAssocTuple (const IfaceAssocTuple &tuple)
 Adds an interface association tuple to the Interface Association Set. More...
 
void AddMprSelectorTuple (const MprSelectorTuple &tuple)
 Adds an MPR selector tuple to the MPR Selector Set. More...
 
void AddNeighborTuple (const NeighborTuple &tuple)
 Adds a neighbor tuple to the Neighbor Set. More...
 
void AddTopologyTuple (const TopologyTuple &tuple)
 Adds a topology tuple to the Topology Set. More...
 
void AddTwoHopNeighborTuple (const TwoHopNeighborTuple &tuple)
 Adds a 2-hop neighbor tuple to the 2-hop Neighbor Set. More...
 
void AssociationTupleTimerExpire (Ipv4Address gatewayAddr, Ipv4Address networkAddr, Ipv4Mask netmask)
 Removes tuple_ if expired. Else timer is rescheduled to expire at tuple_->time(). More...
 
void Clear ()
 Clears the routing table and frees the memory assigned to each one of its entries.
 
int Degree (NeighborTuple const &tuple)
 This auxiliary function (defined in RFC 3626) is used for calculating the MPR Set. More...
 
void DoDispose ()
 
void DupTupleTimerExpire (Ipv4Address address, uint16_t sequenceNumber)
 Removes tuple if expired. Else timer is rescheduled to expire at tuple.expirationTime. More...
 
bool FindSendEntry (const RoutingTableEntry &entry, RoutingTableEntry &outEntry) const
 Finds the appropiate entry which must be used in order to forward a data packet to a next hop (given a destination). More...
 
void ForwardDefault (olsr::MessageHeader olsrMessage, DuplicateTuple *duplicated, const Ipv4Address &localIface, const Ipv4Address &senderAddress)
 OLSR's default forwarding algorithm. More...
 
Ipv4Address GetMainAddress (Ipv4Address iface_addr) const
 Gets the main address associated with a given interface address. More...
 
uint16_t GetMessageSequenceNumber ()
 Increments message sequence number and returns the new value.
 
uint16_t GetPacketSequenceNumber ()
 Increments packet sequence number and returns the new value.
 
uint32_t GetSize () const
 
void HelloTimerExpire ()
 Sends a HELLO message and reschedules the HELLO timer. More...
 
void HnaTimerExpire ()
 Sends an HNA message (if the node has associated hosts/networks) and reschedules the HNA timer.
 
void IfaceAssocTupleTimerExpire (Ipv4Address ifaceAddr)
 Removes tuple_ if expired. Else timer is rescheduled to expire at tuple_->time(). More...
 
void IncrementAnsn ()
 
bool IsMyOwnAddress (const Ipv4Address &a) const
 Check that address is one of my interfaces.
 
void LinkSensing (const olsr::MessageHeader &msg, const olsr::MessageHeader::Hello &hello, const Ipv4Address &receiverIface, const Ipv4Address &sender_iface)
 Updates Link Set according to a new received HELLO message (following RFC 3626 specification). Neighbor Set is also updated if needed.
 
void LinkTupleAdded (const LinkTuple &tuple, uint8_t willingness)
 
void LinkTupleTimerExpire (Ipv4Address neighborIfaceAddr)
 Removes tuple_ if expired. Else if symmetric time has expired then it is assumed a neighbor loss and agent_->nb_loss() is called. In this case the timer is rescheduled to expire at tuple_->time(). Otherwise the timer is rescheduled to expire at the minimum between tuple_->time() and tuple_->sym_time(). More...
 
void LinkTupleUpdated (const LinkTuple &tuple, uint8_t willingness)
 This function is invoked when a link tuple is updated. Its aim is to also update the corresponding neighbor tuple if it is needed. More...
 
bool Lookup (const Ipv4Address &dest, RoutingTableEntry &outEntry) const
 Looks up an entry for the specified destination address. More...
 
void MidTimerExpire ()
 Sends a MID message (if the node has more than one interface) and resets the MID timer. More...
 
void MprComputation ()
 Computates MPR set of a node following RFC 3626 hints.
 
void MprSelTupleTimerExpire (Ipv4Address mainAddr)
 Removes tuple_ if expired. Else the timer is rescheduled to expire at tuple_->time(). More...
 
void Nb2hopTupleTimerExpire (Ipv4Address neighborMainAddr, Ipv4Address twoHopNeighborAddr)
 Removes tuple_ if expired. Else the timer is rescheduled to expire at tuple_->time(). More...
 
void NeighborLoss (const LinkTuple &tuple)
 Performs all actions needed when a neighbor loss occurs. More...
 
virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address)
 
virtual void NotifyInterfaceDown (uint32_t interface)
 
virtual void NotifyInterfaceUp (uint32_t interface)
 
virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address)
 
void PopulateMprSelectorSet (const olsr::MessageHeader &msg, const olsr::MessageHeader::Hello &hello)
 Updates the MPR Selector Set according to the information contained in a new received HELLO message (following RFC 3626).
 
void PopulateNeighborSet (const olsr::MessageHeader &msg, const olsr::MessageHeader::Hello &hello)
 Updates the Neighbor Set according to the information contained in a new received HELLO message (following RFC 3626).
 
void PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg, const olsr::MessageHeader::Hello &hello)
 Updates the 2-hop Neighbor Set according to the information contained in a new received HELLO message (following RFC 3626).
 
virtual void PrintRoutingTable (Ptr< OutputStreamWrapper > stream) const
 Print the Routing Table entries. More...
 
void ProcessHello (const olsr::MessageHeader &msg, const Ipv4Address &receiverIface, const Ipv4Address &senderIface)
 Processes a HELLO message following RFC 3626 specification. More...
 
void ProcessHna (const olsr::MessageHeader &msg, const Ipv4Address &senderIface)
 Processes a HNA message following RFC 3626 specification. More...
 
void ProcessMid (const olsr::MessageHeader &msg, const Ipv4Address &senderIface)
 Processes a MID message following RFC 3626 specification. More...
 
void ProcessTc (const olsr::MessageHeader &msg, const Ipv4Address &senderIface)
 Processes a TC message following RFC 3626 specification. More...
 
void QueueMessage (const olsr::MessageHeader &message, Time delay)
 Enques an OLSR message which will be sent with a delay of (0, delay]. More...
 
void RecvOlsr (Ptr< Socket > socket)
 
void RemoveAssociationTuple (const AssociationTuple &tuple)
 Removes a host network association tuple from the Association Set. More...
 
void RemoveDuplicateTuple (const DuplicateTuple &tuple)
 Removes a duplicate tuple from the Duplicate Set. More...
 
void RemoveEntry (const Ipv4Address &dest)
 Deletes the entry whose destination address is given. More...
 
void RemoveIfaceAssocTuple (const IfaceAssocTuple &tuple)
 Removes an interface association tuple from the Interface Association Set. More...
 
void RemoveLinkTuple (const LinkTuple &tuple)
 Removes a link tuple from the Link Set. More...
 
void RemoveMprSelectorTuple (const MprSelectorTuple &tuple)
 Removes an MPR selector tuple from the MPR Selector Set. More...
 
void RemoveNeighborTuple (const NeighborTuple &tuple)
 Removes a neighbor tuple from the Neighbor Set. More...
 
void RemoveTopologyTuple (const TopologyTuple &tuple)
 Removes a topology tuple from the Topology Set. More...
 
void RemoveTwoHopNeighborTuple (const TwoHopNeighborTuple &tuple)
 Removes a 2-hop neighbor tuple from the 2-hop Neighbor Set. More...
 
virtual 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 Ptr< Ipv4RouteRouteOutput (Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
 Query routing cache for an existing route, for an outbound packet. More...
 
void RoutingTableComputation ()
 Creates the routing table of the node following RFC 3626 hints.
 
void SendHello ()
 Creates a new OLSR HELLO message which is buffered for being sent later on.
 
void SendHna ()
 Creates a new OLSR HNA message which is buffered for being sent later on.
 
void SendMid ()
 Creates a new OLSR MID message which is buffered for being sent later on.
 
void SendPacket (Ptr< Packet > packet, const MessageList &containedMessages)
 
void SendQueuedMessages ()
 Creates as many OLSR packets as needed in order to send all buffered OLSR messages. More...
 
void SendTc ()
 Creates a new OLSR TC message which is buffered for being sent later on.
 
virtual void SetIpv4 (Ptr< Ipv4 > ipv4)
 
void TcTimerExpire ()
 Sends a TC message (if there exists any MPR selector) and reschedules the TC timer. More...
 
void TopologyTupleTimerExpire (Ipv4Address destAddr, Ipv4Address lastAddr)
 Removes tuple_ if expired. Else the timer is rescheduled to expire at tuple_->time(). More...
 
bool UsesNonOlsrOutgoingInterface (const Ipv4RoutingTableEntry &route)
 Tests whether or not the specified route uses a non-OLSR outgoing interface. Returns true if the outgoing interface of the specified route is a non-OLSR interface. Returns false otherwise.
 

Private Attributes

uint16_t m_ansn
 Advertised Neighbor Set sequence number.
 
EventGarbageCollector m_events
 
Time m_helloInterval
 HELLO messages' emission interval.
 
Timer m_helloTimer
 
Time m_hnaInterval
 HNA messages' emission interval.
 
Ptr< Ipv4StaticRoutingm_hnaRoutingTable
 
Timer m_hnaTimer
 
std::set< uint32_t > m_interfaceExclusions
 
Ptr< Ipv4m_ipv4
 
bool m_linkTupleTimerFirstTime
 
Ipv4Address m_mainAddress
 
uint16_t m_messageSequenceNumber
 Messages sequence number counter.
 
Time m_midInterval
 MID messages' emission interval.
 
Timer m_midTimer
 
uint16_t m_packetSequenceNumber
 Packets sequence number counter.
 
olsr::MessageList m_queuedMessages
 A list of pending messages which are buffered awaiting for being sent.
 
Timer m_queuedMessagesTimer
 
Ptr< Ipv4StaticRoutingm_routingTableAssociation
 
TracedCallback< uint32_t > m_routingTableChanged
 
TracedCallback< const
PacketHeader &, const
MessageList & > 
m_rxPacketTrace
 
std::map< Ptr< Socket >
, Ipv4InterfaceAddress
m_socketAddresses
 
OlsrState m_state
 Internal state with all needed data structs.
 
std::map< Ipv4Address,
RoutingTableEntry
m_table
 Data structure for the routing table.
 
Time m_tcInterval
 TC messages' emission interval.
 
Timer m_tcTimer
 
TracedCallback< const
PacketHeader &, const
MessageList & > 
m_txPacketTrace
 
Ptr< UniformRandomVariablem_uniformRandomVariable
 Provides uniform random variables.
 
uint8_t m_willingness
 Willingness for forwarding packets on behalf of other nodes.
 

Friends

class OlsrMprTestCase
 

Additional Inherited Members

- Public Types inherited from ns3::Ipv4RoutingProtocol
typedef Callback< void, Ptr
< const Packet >, const
Ipv4Header
&, Socket::SocketErrno > 
ErrorCallback
 
typedef Callback< void, Ptr
< const Packet >, const
Ipv4Header &, uint32_t > 
LocalDeliverCallback
 
typedef Callback< void, Ptr
< Ipv4MulticastRoute >, Ptr
< const Packet >, const
Ipv4Header & > 
MulticastForwardCallback
 
typedef Callback< void, Ptr
< Ipv4Route >, Ptr< const
Packet >, const Ipv4Header & > 
UnicastForwardCallback
 

Detailed Description

OLSR routing protocol for IPv4.

Config Paths

ns3::olsr::RoutingProtocol is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/$ns3::olsr::RoutingProtocol

Attributes

  • HelloInterval: HELLO messages emission interval.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +2000000000.0ns
    • Flags: construct write read
  • TcInterval: TC messages emission interval.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +5000000000.0ns
    • Flags: construct write read
  • MidInterval: MID messages emission interval. Normally it is equal to TcInterval.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +5000000000.0ns
    • Flags: construct write read
  • HnaInterval: HNA messages emission interval. Normally it is equal to TcInterval.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +5000000000.0ns
    • Flags: construct write read
  • Willingness: Willingness of a node to carry and forward traffic for other nodes.
    • Set with class: ns3::EnumValue
    • Underlying type: never|low|default|high|always
    • Initial value: default
    • Flags: construct write read

TraceSources

  • Rx: Receive OLSR packet.
  • Tx: Send OLSR packet.
  • RoutingTableChanged: The OLSR routing table has changed.

Definition at line 78 of file olsr-routing-protocol.h.

Member Function Documentation

void ns3::olsr::RoutingProtocol::AddAssociationTuple ( const AssociationTuple tuple)
private

Adds a host network association tuple to the Association Set.

Parameters
tuplethe host network association tuple to be added.

Definition at line 2685 of file olsr-routing-protocol.cc.

References m_state.

Referenced by ProcessHna().

void ns3::olsr::RoutingProtocol::AddDuplicateTuple ( const DuplicateTuple tuple)
private

Adds a duplicate tuple to the Duplicate Set.

Parameters
tuplethe duplicate tuple to be added.

Definition at line 2368 of file olsr-routing-protocol.cc.

References m_state.

Referenced by ForwardDefault().

void ns3::olsr::RoutingProtocol::AddEntry ( const Ipv4Address dest,
const Ipv4Address next,
uint32_t  interface,
uint32_t  distance 
)
private

Adds a new entry into the routing table.

If an entry for the given destination existed, it is deleted and freed.

Parameters
destaddress of the destination node.
nextaddress of the next hop node.
ifaceaddress of the local interface.
distdistance to the destination node.

Definition at line 3246 of file olsr-routing-protocol.cc.

References ns3::olsr::RoutingTableEntry::destAddr, ns3::olsr::RoutingTableEntry::distance, ns3::olsr::RoutingTableEntry::interface, m_table, ns3::olsr::RoutingTableEntry::nextAddr, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by RoutingTableComputation().

void ns3::olsr::RoutingProtocol::AddHostNetworkAssociation ( Ipv4Address  networkAddr,
Ipv4Mask  netmask 
)

Inject Association to be sent in HNA message.

Injects the specified (networkAddr, netmask) tuple in the list of local HNA associations to be sent by the node via HNA messages. If this tuple already exists, nothing is done.

Definition at line 1882 of file olsr-routing-protocol.cc.

References m_state, and NS_LOG_INFO.

Referenced by SetRoutingTableAssociation().

void ns3::olsr::RoutingProtocol::AddIfaceAssocTuple ( const IfaceAssocTuple tuple)
private

Adds an interface association tuple to the Interface Association Set.

Parameters
tuplethe interface association tuple to be added.

Definition at line 2651 of file olsr-routing-protocol.cc.

References m_state.

Referenced by DoInitialize(), and ProcessMid().

void ns3::olsr::RoutingProtocol::AddMprSelectorTuple ( const MprSelectorTuple tuple)
private

Adds an MPR selector tuple to the MPR Selector Set.

Advertised Neighbor Sequence Number (ANSN) is also updated.

Parameters
tuplethe MPR selector tuple to be added.

Definition at line 2579 of file olsr-routing-protocol.cc.

References m_state.

Referenced by PopulateMprSelectorSet().

void ns3::olsr::RoutingProtocol::AddNeighborTuple ( const NeighborTuple tuple)
private

Adds a neighbor tuple to the Neighbor Set.

Parameters
tuplethe neighbor tuple to be added.

Definition at line 2501 of file olsr-routing-protocol.cc.

References m_state.

void ns3::olsr::RoutingProtocol::AddTopologyTuple ( const TopologyTuple tuple)
private

Adds a topology tuple to the Topology Set.

Parameters
tuplethe topology tuple to be added.

Definition at line 2615 of file olsr-routing-protocol.cc.

References m_state.

Referenced by ProcessTc().

void ns3::olsr::RoutingProtocol::AddTwoHopNeighborTuple ( const TwoHopNeighborTuple tuple)
private

Adds a 2-hop neighbor tuple to the 2-hop Neighbor Set.

Parameters
tuplethe 2-hop neighbor tuple to be added.

Definition at line 2537 of file olsr-routing-protocol.cc.

References m_state.

Referenced by PopulateTwoHopNeighborSet().

int64_t ns3::olsr::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.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 3305 of file olsr-routing-protocol.cc.

References m_uniformRandomVariable, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

void ns3::olsr::RoutingProtocol::AssociationTupleTimerExpire ( Ipv4Address  gatewayAddr,
Ipv4Address  networkAddr,
Ipv4Mask  netmask 
)
private

Removes tuple_ if expired. Else timer is rescheduled to expire at tuple_->time().

Parameters
eThe event which has expired.

Definition at line 2957 of file olsr-routing-protocol.cc.

References ns3::olsr::AssociationTuple::expirationTime, m_state, ns3::Simulator::Now(), RemoveAssociationTuple(), ns3::Simulator::Schedule(), and ns3::EventGarbageCollector::Track().

Referenced by ProcessHna().

int ns3::olsr::RoutingProtocol::Degree ( NeighborTuple const &  tuple)
private

This auxiliary function (defined in RFC 3626) is used for calculating the MPR Set.

Parameters
tuplethe neighbor tuple which has the main address of the node we are going to calculate its degree to.
Returns
the degree of the node.

Definition at line 515 of file olsr-routing-protocol.cc.

References m_state, ns3::olsr::NeighborTuple::neighborMainAddr, and ns3::olsr::TwoHopNeighborTuple::neighborMainAddr.

Referenced by MprComputation().

void ns3::olsr::RoutingProtocol::DoDispose ( void  )
privatevirtual

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 233 of file olsr-routing-protocol.cc.

References ns3::Object::DoDispose().

void ns3::olsr::RoutingProtocol::DoInitialize ( void  )
protectedvirtual

This method is called only once by Object::Initialize. If the user calls Object::Initialize multiple times, DoInitialize is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.

Reimplemented from ns3::Object.

Definition at line 276 of file olsr-routing-protocol.cc.

References AddIfaceAssocTuple(), ns3::Socket::Bind(), ns3::Socket::BindToNetDevice(), ns3::Socket::CreateSocket(), GetMainAddress(), HelloTimerExpire(), HnaTimerExpire(), ns3::olsr::IfaceAssocTuple::ifaceAddr, ns3::olsr::IfaceAssocTuple::mainAddr, ns3::MakeCallback(), MidTimerExpire(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, ns3::Socket::SetAllowBroadcast(), ns3::Socket::SetRecvCallback(), and TcTimerExpire().

void ns3::olsr::RoutingProtocol::Dump ( void  )

Dump the neighbor table, two-hop neighbor table, and routing table to logging output (NS_LOG_DEBUG log level). If logging is disabled, this function does nothing.

Definition at line 3328 of file olsr-routing-protocol.cc.

References m_state, m_table, ns3::Simulator::Now(), and NS_LOG_DEBUG.

void ns3::olsr::RoutingProtocol::DupTupleTimerExpire ( Ipv4Address  address,
uint16_t  sequenceNumber 
)
private

Removes tuple if expired. Else timer is rescheduled to expire at tuple.expirationTime.

The task of actually removing the tuple is left to the OLSR agent.

Parameters
tupleThe tuple which has expired.

Definition at line 2782 of file olsr-routing-protocol.cc.

References ns3::olsr::DuplicateTuple::expirationTime, m_state, ns3::Simulator::Now(), RemoveDuplicateTuple(), ns3::Simulator::Schedule(), and ns3::EventGarbageCollector::Track().

Referenced by ForwardDefault().

bool ns3::olsr::RoutingProtocol::FindSendEntry ( const RoutingTableEntry entry,
RoutingTableEntry outEntry 
) const
private

Finds the appropiate entry which must be used in order to forward a data packet to a next hop (given a destination).

Imagine a routing table like this: [A,B] [B,C] [C,C]; being each pair of the form [dest addr,next-hop addr]. In this case, if this function is invoked with [A,B] then pair [C,C] is returned because C is the next hop that must be used to forward a data packet destined to A. That is, C is a neighbor of this node, but B isn't. This function finds the appropiate neighbor for forwarding a packet.

Parameters
entrythe routing table entry which indicates the destination node we are interested in.
Returns
the appropiate routing table entry which indicates the next hop which must be used for forwarding a data packet, or NULL if there is no such entry.

Definition at line 3033 of file olsr-routing-protocol.cc.

References ns3::olsr::RoutingTableEntry::destAddr, Lookup(), and ns3::olsr::RoutingTableEntry::nextAddr.

Referenced by RouteInput(), and RouteOutput().

void ns3::olsr::RoutingProtocol::ForwardDefault ( olsr::MessageHeader  olsrMessage,
DuplicateTuple duplicated,
const Ipv4Address localIface,
const Ipv4Address senderAddress 
)
private

OLSR's default forwarding algorithm.

See RFC 3626 for details.

Parameters
pthe OLSR packet which has been received.
msgthe OLSR message which must be forwarded.
dup_tupleNULL if the message has never been considered for forwarding, or a duplicate tuple in other case.
local_ifacethe address of the interface where the message was received from.

Definition at line 1506 of file olsr-routing-protocol.cc.

References AddDuplicateTuple(), ns3::olsr::DuplicateTuple::address, DupTupleTimerExpire(), ns3::olsr::DuplicateTuple::expirationTime, GetMainAddress(), ns3::olsr::DuplicateTuple::ifaceList, m_state, ns3::Simulator::Now(), NS_LOG_LOGIC, QueueMessage(), ns3::olsr::DuplicateTuple::retransmitted, ns3::Simulator::Schedule(), and ns3::olsr::DuplicateTuple::sequenceNumber.

Ipv4Address ns3::olsr::RoutingProtocol::GetMainAddress ( Ipv4Address  iface_addr) const
private

Gets the main address associated with a given interface address.

Parameters
iface_addrthe interface address.
Returns
the corresponding main address.

Definition at line 861 of file olsr-routing-protocol.cc.

References m_state, and ns3::olsr::IfaceAssocTuple::mainAddr.

Referenced by DoInitialize(), ForwardDefault(), LinkTupleUpdated(), NeighborLoss(), PopulateMprSelectorSet(), PopulateTwoHopNeighborSet(), ProcessMid(), RemoveLinkTuple(), RoutingTableComputation(), and SendHello().

std::vector< RoutingTableEntry > ns3::olsr::RoutingProtocol::GetRoutingTableEntries ( ) const

Return the list of routing table entries discovered by OLSR

Definition at line 3293 of file olsr-routing-protocol.cc.

References m_table.

void ns3::olsr::RoutingProtocol::HelloTimerExpire ( )
private

Sends a HELLO message and reschedules the HELLO timer.

Parameters
eThe event which has expired.

Definition at line 2722 of file olsr-routing-protocol.cc.

References m_helloInterval, ns3::Timer::Schedule(), and SendHello().

Referenced by DoInitialize(), and SetIpv4().

void ns3::olsr::RoutingProtocol::IfaceAssocTupleTimerExpire ( Ipv4Address  ifaceAddr)
private

Removes tuple_ if expired. Else timer is rescheduled to expire at tuple_->time().

Parameters
eThe event which has expired.

Definition at line 2934 of file olsr-routing-protocol.cc.

References m_state, ns3::Simulator::Now(), RemoveIfaceAssocTuple(), ns3::Simulator::Schedule(), ns3::olsr::IfaceAssocTuple::time, and ns3::EventGarbageCollector::Track().

Referenced by ProcessMid().

void ns3::olsr::RoutingProtocol::LinkTupleTimerExpire ( Ipv4Address  neighborIfaceAddr)
private

Removes tuple_ if expired. Else if symmetric time has expired then it is assumed a neighbor loss and agent_->nb_loss() is called. In this case the timer is rescheduled to expire at tuple_->time(). Otherwise the timer is rescheduled to expire at the minimum between tuple_->time() and tuple_->sym_time().

The task of actually removing the tuple is left to the OLSR agent.

Parameters
eThe event which has expired.

Definition at line 2814 of file olsr-routing-protocol.cc.

References m_state, NeighborLoss(), ns3::Simulator::Now(), RemoveLinkTuple(), ns3::Simulator::Schedule(), ns3::olsr::LinkTuple::symTime, ns3::olsr::LinkTuple::time, and ns3::EventGarbageCollector::Track().

Referenced by LinkSensing().

void ns3::olsr::RoutingProtocol::LinkTupleUpdated ( const LinkTuple tuple,
uint8_t  willingness 
)
private

This function is invoked when a link tuple is updated. Its aim is to also update the corresponding neighbor tuple if it is needed.

Parameters
tuplethe link tuple which has been updated.

Definition at line 2438 of file olsr-routing-protocol.cc.

References GetMainAddress(), m_state, ns3::olsr::LinkTuple::neighborIfaceAddr, ns3::olsr::NeighborTuple::neighborMainAddr, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_WARN, and ns3::olsr::LinkTuple::symTime.

Referenced by LinkSensing(), and NeighborLoss().

bool ns3::olsr::RoutingProtocol::Lookup ( const Ipv4Address dest,
RoutingTableEntry outEntry 
) const
private

Looks up an entry for the specified destination address.

Parameters
destdestination address.
outEntryoutput parameter to hold the routing entry result, if fuond
Returns
true if found, false if not found

Definition at line 3003 of file olsr-routing-protocol.cc.

References m_table.

Referenced by FindSendEntry(), RouteInput(), RouteOutput(), and RoutingTableComputation().

void ns3::olsr::RoutingProtocol::MidTimerExpire ( )
private

Sends a MID message (if the node has more than one interface) and resets the MID timer.

Parameters
eThe event which has expired.

Definition at line 2751 of file olsr-routing-protocol.cc.

References m_midInterval, ns3::Timer::Schedule(), and SendMid().

Referenced by DoInitialize(), and SetIpv4().

void ns3::olsr::RoutingProtocol::MprSelTupleTimerExpire ( Ipv4Address  mainAddr)
private

Removes tuple_ if expired. Else the timer is rescheduled to expire at tuple_->time().

The task of actually removing the tuple is left to the OLSR agent.

Parameters
eThe event which has expired.

Definition at line 2883 of file olsr-routing-protocol.cc.

References ns3::olsr::MprSelectorTuple::expirationTime, m_state, ns3::Simulator::Now(), RemoveMprSelectorTuple(), ns3::Simulator::Schedule(), and ns3::EventGarbageCollector::Track().

Referenced by PopulateMprSelectorSet().

void ns3::olsr::RoutingProtocol::Nb2hopTupleTimerExpire ( Ipv4Address  neighborMainAddr,
Ipv4Address  twoHopNeighborAddr 
)
private

Removes tuple_ if expired. Else the timer is rescheduled to expire at tuple_->time().

The task of actually removing the tuple is left to the OLSR agent.

Parameters
eThe event which has expired.

Definition at line 2855 of file olsr-routing-protocol.cc.

References ns3::olsr::TwoHopNeighborTuple::expirationTime, m_state, ns3::Simulator::Now(), RemoveTwoHopNeighborTuple(), ns3::Simulator::Schedule(), and ns3::EventGarbageCollector::Track().

Referenced by PopulateTwoHopNeighborSet().

void ns3::olsr::RoutingProtocol::NeighborLoss ( const LinkTuple tuple)
private

Performs all actions needed when a neighbor loss occurs.

Neighbor Set, 2-hop Neighbor Set, MPR Set and MPR Selector Set are updated.

Parameters
tuplelink tuple with the information of the link to the neighbor which has been lost.

Definition at line 2349 of file olsr-routing-protocol.cc.

References GetMainAddress(), LinkTupleUpdated(), m_state, MprComputation(), ns3::olsr::LinkTuple::neighborIfaceAddr, ns3::Simulator::Now(), NS_LOG_DEBUG, and RoutingTableComputation().

Referenced by LinkTupleTimerExpire().

void ns3::olsr::RoutingProtocol::NotifyAddAddress ( uint32_t  interface,
Ipv4InterfaceAddress  address 
)
privatevirtual
Parameters
interfacethe index of the interface we are being notified about
addressa 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 3228 of file olsr-routing-protocol.cc.

void ns3::olsr::RoutingProtocol::NotifyInterfaceDown ( uint32_t  interface)
privatevirtual
Parameters
interfacethe 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 3225 of file olsr-routing-protocol.cc.

void ns3::olsr::RoutingProtocol::NotifyInterfaceUp ( uint32_t  interface)
privatevirtual
Parameters
interfacethe 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 3222 of file olsr-routing-protocol.cc.

void ns3::olsr::RoutingProtocol::NotifyRemoveAddress ( uint32_t  interface,
Ipv4InterfaceAddress  address 
)
privatevirtual
Parameters
interfacethe index of the interface we are being notified about
addressa 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 3231 of file olsr-routing-protocol.cc.

void ns3::olsr::RoutingProtocol::PrintRoutingTable ( Ptr< OutputStreamWrapper stream) const
privatevirtual

Print the Routing Table entries.

Parameters
streamthe ostream the Routing table is printed to

Implements ns3::Ipv4RoutingProtocol.

Definition at line 250 of file olsr-routing-protocol.cc.

References ns3::Names::FindName(), ns3::OutputStreamWrapper::GetStream(), and m_table.

void ns3::olsr::RoutingProtocol::ProcessHello ( const olsr::MessageHeader msg,
const Ipv4Address receiverIface,
const Ipv4Address senderIface 
)
private

Processes a HELLO message following RFC 3626 specification.

Link sensing and population of the Neighbor Set, 2-hop Neighbor Set and MPR Selector Set are performed.

Parameters
msgthe OLSR message which contains the HELLO message.
receiver_ifacethe address of the interface where the message was received from.
sender_ifacethe address of the interface where the message was sent from.

Definition at line 1201 of file olsr-routing-protocol.cc.

References LinkSensing(), m_state, MprComputation(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, PopulateMprSelectorSet(), PopulateNeighborSet(), and PopulateTwoHopNeighborSet().

void ns3::olsr::RoutingProtocol::ProcessHna ( const olsr::MessageHeader msg,
const Ipv4Address senderIface 
)
private

Processes a HNA message following RFC 3626 specification.

The Host Network Association Set is updated (if needed) with the information of the received HNA message.

Parameters
msgthe OLSR message which contains the HNA message.
sender_ifacethe address of the interface where the message was sent from.

Definition at line 1438 of file olsr-routing-protocol.cc.

References AddAssociationTuple(), AssociationTupleTimerExpire(), ns3::olsr::AssociationTuple::expirationTime, ns3::olsr::AssociationTuple::gatewayAddr, m_state, ns3::olsr::AssociationTuple::netmask, ns3::olsr::AssociationTuple::networkAddr, ns3::Simulator::Now(), and ns3::Simulator::Schedule().

void ns3::olsr::RoutingProtocol::ProcessMid ( const olsr::MessageHeader msg,
const Ipv4Address senderIface 
)
private

Processes a MID message following RFC 3626 specification.

The Interface Association Set is updated (if needed) with the information of the received MID message.

Parameters
msgthe OLSR message which contains the MID message.
sender_ifacethe address of the interface where the message was sent from.

Definition at line 1359 of file olsr-routing-protocol.cc.

References AddIfaceAssocTuple(), GetMainAddress(), ns3::olsr::IfaceAssocTuple::ifaceAddr, IfaceAssocTupleTimerExpire(), m_state, ns3::olsr::IfaceAssocTuple::mainAddr, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_LOGIC, ns3::Simulator::Schedule(), and ns3::olsr::IfaceAssocTuple::time.

void ns3::olsr::RoutingProtocol::ProcessTc ( const olsr::MessageHeader msg,
const Ipv4Address senderIface 
)
private

Processes a TC message following RFC 3626 specification.

The Topology Set is updated (if needed) with the information of the received TC message.

Parameters
msgthe OLSR message which contains the TC message.
sender_ifacethe address of the interface where the message was sent from.

Definition at line 1264 of file olsr-routing-protocol.cc.

References AddTopologyTuple(), ns3::olsr::TopologyTuple::destAddr, ns3::olsr::TopologyTuple::expirationTime, ns3::olsr::TopologyTuple::lastAddr, m_state, ns3::Simulator::Now(), NS_LOG_DEBUG, ns3::Simulator::Schedule(), ns3::olsr::TopologyTuple::sequenceNumber, TopologyTupleTimerExpire(), and ns3::EventGarbageCollector::Track().

void ns3::olsr::RoutingProtocol::QueueMessage ( const olsr::MessageHeader message,
Time  delay 
)
private

Enques an OLSR message which will be sent with a delay of (0, delay].

This buffering system is used in order to piggyback several OLSR messages in a same OLSR packet.

Parameters
msgthe OLSR message which must be sent.
delaymaximum delay the OLSR message is going to be buffered.

Definition at line 1581 of file olsr-routing-protocol.cc.

References ns3::Timer::IsRunning(), m_queuedMessages, ns3::Timer::Schedule(), and ns3::Timer::SetDelay().

Referenced by ForwardDefault(), SendHello(), SendHna(), SendMid(), and SendTc().

void ns3::olsr::RoutingProtocol::RemoveAssociationTuple ( const AssociationTuple tuple)
private

Removes a host network association tuple from the Association Set.

Parameters
tuplethe host network association tuple to be removed.

Definition at line 2696 of file olsr-routing-protocol.cc.

References m_state.

Referenced by AssociationTupleTimerExpire().

void ns3::olsr::RoutingProtocol::RemoveDuplicateTuple ( const DuplicateTuple tuple)
private

Removes a duplicate tuple from the Duplicate Set.

Parameters
tuplethe duplicate tuple to be removed.

Definition at line 2384 of file olsr-routing-protocol.cc.

References m_state.

Referenced by DupTupleTimerExpire().

void ns3::olsr::RoutingProtocol::RemoveEntry ( const Ipv4Address dest)
private

Deletes the entry whose destination address is given.

Parameters
destaddress of the destination node.

Definition at line 2991 of file olsr-routing-protocol.cc.

References m_table.

void ns3::olsr::RoutingProtocol::RemoveHostNetworkAssociation ( Ipv4Address  networkAddr,
Ipv4Mask  netmask 
)

Removes Association sent in HNA message.

Removes the specified (networkAddr, netmask) tuple from the list of local HNA associations to be sent by the node via HNA messages. If this tuple does not exist, nothing is done (see "OlsrState::EraseAssociation()").

Definition at line 1908 of file olsr-routing-protocol.cc.

References m_state, and NS_LOG_INFO.

Referenced by SetRoutingTableAssociation().

void ns3::olsr::RoutingProtocol::RemoveIfaceAssocTuple ( const IfaceAssocTuple tuple)
private

Removes an interface association tuple from the Interface Association Set.

Parameters
tuplethe interface association tuple to be removed.

Definition at line 2668 of file olsr-routing-protocol.cc.

References m_state.

Referenced by IfaceAssocTupleTimerExpire().

void ns3::olsr::RoutingProtocol::RemoveLinkTuple ( const LinkTuple tuple)
private

Removes a link tuple from the Link Set.

Parameters
tuplethe link tuple to be removed.

Definition at line 2420 of file olsr-routing-protocol.cc.

References GetMainAddress(), m_state, ns3::olsr::LinkTuple::neighborIfaceAddr, ns3::Simulator::Now(), and NS_LOG_DEBUG.

Referenced by LinkTupleTimerExpire().

void ns3::olsr::RoutingProtocol::RemoveMprSelectorTuple ( const MprSelectorTuple tuple)
private

Removes an MPR selector tuple from the MPR Selector Set.

Advertised Neighbor Sequence Number (ANSN) is also updated.

Parameters
tuplethe MPR selector tuple to be removed.

Definition at line 2598 of file olsr-routing-protocol.cc.

References m_state.

Referenced by MprSelTupleTimerExpire().

void ns3::olsr::RoutingProtocol::RemoveNeighborTuple ( const NeighborTuple tuple)
private

Removes a neighbor tuple from the Neighbor Set.

Parameters
tuplethe neighbor tuple to be removed.

Definition at line 2519 of file olsr-routing-protocol.cc.

References m_state.

void ns3::olsr::RoutingProtocol::RemoveTopologyTuple ( const TopologyTuple tuple)
private

Removes a topology tuple from the Topology Set.

Parameters
tuplethe topology tuple to be removed.

Definition at line 2633 of file olsr-routing-protocol.cc.

References m_state.

Referenced by TopologyTupleTimerExpire().

void ns3::olsr::RoutingProtocol::RemoveTwoHopNeighborTuple ( const TwoHopNeighborTuple tuple)
private

Removes a 2-hop neighbor tuple from the 2-hop Neighbor Set.

Parameters
tuplethe 2-hop neighbor tuple to be removed.

Definition at line 2554 of file olsr-routing-protocol.cc.

References m_state.

Referenced by Nb2hopTupleTimerExpire().

bool ns3::olsr::RoutingProtocol::RouteInput ( Ptr< const Packet p,
const Ipv4Header header,
Ptr< const NetDevice idev,
UnicastForwardCallback  ucb,
MulticastForwardCallback  mcb,
LocalDeliverCallback  lcb,
ErrorCallback  ecb 
)
privatevirtual

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.

Parameters
preceived packet
headerinput parameter used to form a search key for a route
idevPointer to ingress network device
ucbCallback for the case in which the packet is to be forwarded as unicast
mcbCallback for the case in which the packet is to be forwarded as multicast
lcbCallback for the case in which the packet is to be locally delivered
ecbCallback to call if there is an error in forwarding
Returns
true if the Ipv4RoutingProtocol takes responsibility for forwarding or delivering the packet, false otherwise

Implements ns3::Ipv4RoutingProtocol.

Definition at line 3120 of file olsr-routing-protocol.cc.

References FindSendEntry(), ns3::Ipv4Header::GetDestination(), ns3::Node::GetId(), ns3::Ipv4Header::GetSource(), ns3::olsr::RoutingTableEntry::interface, IsMyOwnAddress(), Lookup(), m_table, ns3::olsr::RoutingTableEntry::nextAddr, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Ipv4Route::SetDestination(), ns3::Ipv4Route::SetGateway(), ns3::Ipv4Route::SetOutputDevice(), and ns3::Ipv4Route::SetSource().

Ptr< Ipv4Route > ns3::olsr::RoutingProtocol::RouteOutput ( Ptr< Packet p,
const Ipv4Header header,
Ptr< NetDevice oif,
Socket::SocketErrno &  sockerr 
)
privatevirtual

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.

Parameters
ppacket to be routed. Note that this method may modify the packet. Callers may also pass in a null pointer.
headerinput parameter (used to form key to search for the route)
oifOutput interface Netdevice. May be zero, or may be bound via socket options to a particular output interface.
sockerrOutput parameter; socket errno
Returns
a code that indicates what happened in the lookup

Implements ns3::Ipv4RoutingProtocol.

Definition at line 3046 of file olsr-routing-protocol.cc.

References FindSendEntry(), ns3::Ipv4Header::GetDestination(), ns3::Node::GetId(), ns3::olsr::RoutingTableEntry::interface, Lookup(), ns3::olsr::RoutingTableEntry::nextAddr, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

void ns3::olsr::RoutingProtocol::SendQueuedMessages ( )
private

Creates as many OLSR packets as needed in order to send all buffered OLSR messages.

Maximum number of messages which can be contained in an OLSR packet is dictated by OLSR_MAX_MSGS constant.

Definition at line 1623 of file olsr-routing-protocol.cc.

References ns3::Packet::AddAtEnd(), ns3::Packet::AddHeader(), ns3::Packet::GetSize(), m_queuedMessages, and NS_LOG_DEBUG.

Referenced by SetIpv4().

void ns3::olsr::RoutingProtocol::SetIpv4 ( Ptr< Ipv4 ipv4)
privatevirtual
Parameters
ipv4the ipv4 object this routing protocol is being associated with

Typically, invoked directly or indirectly from ns3::Ipv4::SetRoutingProtocol

Implements ns3::Ipv4RoutingProtocol.

Definition at line 211 of file olsr-routing-protocol.cc.

References HelloTimerExpire(), HnaTimerExpire(), m_ansn, m_messageSequenceNumber, m_packetSequenceNumber, MidTimerExpire(), NS_ASSERT, NS_LOG_DEBUG, SendQueuedMessages(), ns3::Timer::SetFunction(), and TcTimerExpire().

void ns3::olsr::RoutingProtocol::SetMainInterface ( uint32_t  interface)

Set the OLSR main address to the first address on the indicated interface.

Parameters
interfaceIPv4 interface index

Definition at line 348 of file olsr-routing-protocol.cc.

void ns3::olsr::RoutingProtocol::SetRoutingTableAssociation ( Ptr< Ipv4StaticRouting routingTable)

Inject Associations from an Ipv4StaticRouting instance.

Associates the specified Ipv4StaticRouting routing table to the OLSR routing protocol. Entries from this associated routing table that use non-olsr outgoing interfaces are added to the list of local HNA associations so that they are included in HNA messages sent by the node. If this method is called more than once, entries from the old association are deleted before entries from the new one are added.

Parameters
routingTablethe Ipv4StaticRouting routing table to be associated.

Definition at line 1925 of file olsr-routing-protocol.cc.

References AddHostNetworkAssociation(), ns3::Ipv4RoutingTableEntry::GetDestNetwork(), ns3::Ipv4RoutingTableEntry::GetDestNetworkMask(), m_state, NS_LOG_DEBUG, NS_LOG_INFO, RemoveHostNetworkAssociation(), and UsesNonOlsrOutgoingInterface().

void ns3::olsr::RoutingProtocol::TcTimerExpire ( )
private

Sends a TC message (if there exists any MPR selector) and reschedules the TC timer.

Parameters
eThe event which has expired.

Definition at line 2733 of file olsr-routing-protocol.cc.

References m_state, m_tcInterval, NS_LOG_DEBUG, ns3::Timer::Schedule(), and SendTc().

Referenced by DoInitialize(), and SetIpv4().

void ns3::olsr::RoutingProtocol::TopologyTupleTimerExpire ( Ipv4Address  destAddr,
Ipv4Address  lastAddr 
)
private

Removes tuple_ if expired. Else the timer is rescheduled to expire at tuple_->time().

The task of actually removing the tuple is left to the OLSR agent.

Parameters
eThe event which has expired.

Definition at line 2910 of file olsr-routing-protocol.cc.

References ns3::olsr::TopologyTuple::destAddr, ns3::olsr::TopologyTuple::expirationTime, ns3::olsr::TopologyTuple::lastAddr, m_state, ns3::Simulator::Now(), RemoveTopologyTuple(), ns3::Simulator::Schedule(), and ns3::EventGarbageCollector::Track().

Referenced by ProcessTc().


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