33 #ifndef DSDV_ROUTING_PROTOCOL_H 
   34 #define DSDV_ROUTING_PROTOCOL_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" 
void Start()
Start protocol operation. 
 
static const uint32_t DSDV_PORT
UDP Port for DSDV control traffic. 
 
keep track of time values and allow control of global simulation resolution 
 
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
 
void MergeTriggerPeriodicUpdates()
 
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. 
 
bool GetEnableRAFlag() const 
 
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. 
 
bool RouteInput(Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)
 
virtual void NotifyRemoveAddress(uint32_t interface, Ipv4InterfaceAddress address)
 
static TypeId GetTypeId(void)
 
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. 
 
virtual ~RoutingProtocol()
 
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. 
 
bool GetEnableBufferFlag() const 
 
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)
 
void Send(Ptr< Ipv4Route >, Ptr< const Packet >, const Ipv4Header &)
 
Ipv4 addresses are stored in host order in this class. 
 
a class to store IPv4 address information on an interface 
 
void SetEnableRAFlag(bool f)
 
Ptr< NetDevice > m_lo
Loopback device used to defer route requests until a route is found. 
 
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables. 
 
void SetEnableBufferFlag(bool f)
 
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. 
 
Callback< void, Ptr< Ipv4Route >, Ptr< const Packet >, const Ipv4Header & > UnicastForwardCallback