33 #ifndef DSDV_ROUTING_PROTOCOL_H 
   34 #define DSDV_ROUTING_PROTOCOL_H 
   36 #include "dsdv-rtable.h" 
   37 #include "dsdv-packet-queue.h" 
   38 #include "dsdv-packet.h" 
   40 #include "ns3/random-variable-stream.h" 
   41 #include "ns3/ipv4-routing-protocol.h" 
   42 #include "ns3/ipv4-interface.h" 
   43 #include "ns3/ipv4-l3-protocol.h" 
   44 #include "ns3/output-stream-wrapper.h" 
   81   void SetEnableBufferFlag (
bool f);
 
   82   bool GetEnableBufferFlag () 
const;
 
   83   void SetWSTFlag (
bool f);
 
   84   bool GetWSTFlag () 
const;
 
   85   void SetEnableRAFlag (
bool f);
 
   86   bool GetEnableRAFlag () 
const;
 
  194   MergeTriggerPeriodicUpdates ();
 
void Start()
Start protocol operation. 
static const uint32_t DSDV_PORT
UDP Port for DSDV control traffic. 
int64_t AssignStreams(int64_t stream)
std::map< Ptr< Socket >, Ipv4InterfaceAddress > m_socketAddresses
Raw socket per each IP interface, map socket -> iface address (IP + mask) 
bool EnableRouteAggregation
Time m_periodicUpdateInterval
bool EnableBuffering
Flag that is used to enable or disable buffering. 
ErrorCallback m_ecb
Error callback for own packets. 
virtual void SetIpv4(Ptr< Ipv4 > ipv4)
bool EnableWST
Flag that is used to enable or disable Weighted Settling Time. 
virtual void NotifyInterfaceDown(uint32_t interface)
double m_weightedFactor
This is the wighted factor to determine the weighted settling time. 
void SendPacketFromQueue(Ipv4Address dst, Ptr< Ipv4Route > route)
void SendPeriodicUpdate()
Broadcasts the entire routing table for every PeriodicUpdateInterval. 
Ptr< Socket > FindSocketWithInterfaceAddress(Ipv4InterfaceAddress iface) const 
Find socket with local interface address iface. 
The Routing table used by DSDV protocol. 
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const 
Print the Routing Table entries. 
uint32_t m_maxQueueLen
The maximum number of packets that we allow a routing protocol to buffer. 
Ptr< Ipv4Route > LoopbackRoute(const Ipv4Header &header, Ptr< NetDevice > oif) const 
Create loopback route for given header. 
virtual void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
UnicastForwardCallback m_scb
Unicast callback for own packets. 
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. 
Time GetSettlingTime(Ipv4Address dst)
void DeferredRouteOutput(Ptr< const Packet > p, const Ipv4Header &header, UnicastForwardCallback ucb, ErrorCallback ecb)
Queue packet untill we find a route. 
void LookForQueuedPackets(void)
Look for any queued packets to send them out. 
Time m_routeAggregationTime
Parameter that holds the route aggregation time interval. 
Timer m_triggeredExpireTimer
Timer used by the trigger updates in case of Weighted Settling Time is used. 
PacketQueue m_queue
A "drop front on full" queue used by the routing layer to buffer packets to which it does not have a ...
Time m_maxQueueTime
The maximum period of time that a routing protocol is allowed to buffer a packet for. 
void RecvDsdv(Ptr< Socket > socket)
Receive and process dsdv control packet. 
Ipv4Address m_mainAddress
Nodes IP address. 
void SendTriggeredUpdate()
Sends trigger update from a node. 
uint32_t m_maxQueuedPacketsPerDst
The maximum number of packets that we allow per destination to buffer. 
virtual void NotifyAddAddress(uint32_t interface, Ipv4InterfaceAddress address)
Ipv4 addresses are stored in host order in this class. 
a class to store IPv4 address information on an interface 
Ptr< NetDevice > m_lo
Loopback device used to defer route requests until a route is found. 
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables. 
Abstract base class for IPv4 routing protocols. 
Ptr< Ipv4 > m_ipv4
IP protocol. 
RoutingTable m_advRoutingTable
Advertised Routing table for the node. 
virtual void NotifyInterfaceUp(uint32_t interface)
Timer m_periodicUpdateTimer
Timer to trigger periodic updates from a node. 
RoutingTable m_routingTable
Main Routing table for the node. 
void Drop(Ptr< const Packet >, const Ipv4Header &, Socket::SocketErrno)
Notify that packet is dropped for some reason. 
a unique identifier for an interface.