37 #include <sys/types.h>
39 #include "ns3/ipv4-route.h"
40 #include "ns3/timer.h"
41 #include "ns3/net-device.h"
42 #include "ns3/output-stream-wrapper.h"
66 GetDestination ()
const
96 GetOutputDevice ()
const
101 GetInterface ()
const
111 SetSeqNo (uint32_t sequenceNumber)
121 SetHop (uint32_t hopCount)
131 SetLifeTime (
Time lifeTime)
141 SetSettlingTime (
Time settlingTime)
146 GetSettlingTime ()
const
151 SetFlag (RouteFlags flag)
161 SetEntriesChanged (
bool entriesChanged)
166 GetEntriesChanged ()
const
279 Purge (std::map<Ipv4Address, RoutingTableEntry> & removedAddresses);
326 Time Getholddowntime ()
const
328 return m_holddownTime;
330 void Setholddowntime (
Time t)
uint32_t m_hops
Hop Count (number of hops needed to reach destination)
smart pointer class similar to boost::intrusive_ptr
bool operator==(Ipv4Address const destination) const
Compare destination address.
bool AnyRunningEvent(Ipv4Address address)
EventId GetEventId(Ipv4Address address)
void GetListOfAllRoutes(std::map< Ipv4Address, RoutingTableEntry > &allRoutes)
bool Update(RoutingTableEntry &rt)
Ptr< NetDevice > GetOutputDevice(void) const
bool ForceDeleteIpv4Event(Ipv4Address address)
The Routing table used by DSDV protocol.
void SetGateway(Ipv4Address gw)
uint32_t m_seqNo
Destination Sequence Number.
void Purge(std::map< Ipv4Address, RoutingTableEntry > &removedAddresses)
Delete all outdated entries if Lifetime is expired.
Ipv4Address GetGateway(void) const
Ipv4InterfaceAddress m_iface
Output interface address.
std::map< Ipv4Address, EventId > m_ipv4Events
an entry in the event table.
void DeleteAllRoutesFromInterface(Ipv4InterfaceAddress iface)
Delete all route from interface with address iface.
bool AddRoute(RoutingTableEntry &r)
uint32_t RoutingTableSize()
Provides the number of routes present in that nodes routing table.
RoutingTableEntry(Ptr< NetDevice > dev=0, Ipv4Address dst=Ipv4Address(), u_int32_t m_seqNo=0, Ipv4InterfaceAddress iface=Ipv4InterfaceAddress(), u_int32_t hops=0, Ipv4Address nextHop=Ipv4Address(), Time lifetime=Simulator::Now(), Time SettlingTime=Simulator::Now(), bool changedEntries=false)
c-tor
void SetOutputDevice(Ptr< NetDevice > outputDevice)
std::map< Ipv4Address, RoutingTableEntry > m_ipv4AddressEntry
an entry in the routing table.
void GetListOfDestinationWithNextHop(Ipv4Address nxtHp, std::map< Ipv4Address, RoutingTableEntry > &dstList)
bool DeleteIpv4Event(Ipv4Address address)
Ipv4Address GetDestination(void) const
Ipv4 addresses are stored in host order in this class.
bool DeleteRoute(Ipv4Address dst)
a class to store IPv4 address information on an interface
an identifier for simulation events.
uint32_t m_entriesChanged
Flag to show if any of the routing table entries were changed with the routing update.
void Clear()
Delete all entries from routing table.
Time m_lifeTime
Expiration or deletion time of the route Lifetime field in the routing table plays dual role – for an...
bool AddIpv4Event(Ipv4Address address, EventId id)
void Print(Ptr< OutputStreamWrapper > stream) const
Print routing table.
bool LookupRoute(Ipv4Address dst, RoutingTableEntry &rt)
RouteFlags m_flag
Routing flags: valid, invalid or in search.
Ptr< Ipv4Route > m_ipv4Route
RouteFlags
Route record states.