26 #include "ns3/ipv6-routing-protocol.h" 27 #include "ns3/ipv6-interface.h" 28 #include "ns3/inet6-socket-address.h" 29 #include "ns3/ipv6-l3-protocol.h" 30 #include "ns3/ipv6-routing-table-entry.h" 31 #include "ns3/random-variable-stream.h" 32 #include "ns3/ripng-header.h" 273 typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >
Routes;
276 typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >::const_iterator
RoutesCI;
279 typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >::iterator
RoutesI;
Status_e GetRouteStatus(void) const
Get the route status.
SplitHorizonType_e m_splitHorizonStrategy
Split Horizon strategy.
std::map< Ptr< Socket >, uint32_t >::iterator SocketListI
Socket list type iterator.
bool IsRouteChanged(void) const
Get the route changed status.
Simulation virtual time values and global simulation resolution.
virtual void NotifyInterfaceDown(uint32_t interface)
Notify when specified interface goes DOWN.
Smart pointer class similar to boost::intrusive_ptr.
void SetRouteTag(uint16_t routeTag)
Set the route tag.
void AddNetworkRouteTo(Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
Add route to network.
void SetInterfaceExclusions(std::set< uint32_t > exceptions)
Set the set of interface excluded from the protocol.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) const
Print the Routing Table entries.
EventId m_nextTriggeredUpdate
Next Triggered Update event.
IPv6 address associated with an interface.
uint8_t m_metric
route metric
void SetInterfaceMetric(uint32_t interface, uint8_t metric)
Set the metric for an interface.
void SendUnsolicitedRouteUpdate(void)
Send Unsolicited Routing Updates on all interfaces.
EventId m_nextUnsolicitedUpdate
Next Unsolicited Update event.
void Receive(Ptr< Socket > socket)
Receive RIPng packets.
virtual void DoDispose()
Dispose this object.
uint8_t m_linkDown
Link down value.
SocketErrno
Enumeration of the possible errors returned by a socket.
void AddDefaultRouteTo(Ipv6Address nextHop, uint32_t interface)
Add a default route to the router through the nextHop located on interface.
void RecvUnicastRipng(Ptr< Socket > socket)
Receive and process unicast packet.
SocketList m_sendSocketList
list of sockets for sending (socket, interface index)
void InvalidateRoute(RipNgRoutingTableEntry *route)
Invalidate a route.
RIPng Routing Protocol, defined in RFC 2080.
void SendTriggeredRouteUpdate()
Send Triggered Routing Updates on all interfaces.
std::set< uint32_t > m_interfaceExclusions
Set of excluded interfaces.
uint8_t GetInterfaceMetric(uint32_t interface) const
Get the metric for an interface.
void DoInitialize()
Start protocol operation.
A record of an IPv6 route.
virtual void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route.
void SetRouteMetric(uint8_t routeMetric)
Set the route metric.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Ptr< Ipv6 > m_ipv6
IPv6 reference.
Poison Reverse Split Horizon.
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address.
std::list< std::pair< RipNgRoutingTableEntry *, EventId > > Routes
Container for the network routes - pair RipNgRoutingTableEntry *, EventId (update event) ...
Unit
The unit to use to interpret a number representing time.
Time m_timeoutDelay
Delay before invalidating a route.
uint8_t GetRouteMetric(void) const
Get the route metric.
std::map< Ptr< Socket >, uint32_t >::const_iterator SocketListCI
Socket list type const iterator.
void DoSendRouteUpdate(bool periodic)
Send Routing Updates on all interfaces.
void SetRouteChanged(bool changed)
Set the route as changed.
Ptr< Socket > m_recvSocket
receive socket
virtual void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void DeleteRoute(RipNgRoutingTableEntry *route)
Delete a route.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Ptr< Ipv6Route > RouteOutput(Ptr< Packet > p, const Ipv6Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)
Query routing cache for an existing route, for an outbound packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool RouteInput(Ptr< const Packet > p, const Ipv6Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb)
Route an input packet (to be forwarded or locally delivered)
Time m_unsolicitedUpdate
time between two Unsolicited Routing Updates
virtual ~RipNgRoutingTableEntry()
virtual void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
void HandleResponses(RipNgHeader hdr, Ipv6Address senderAddress, uint32_t incomingInterface, uint8_t hopLimit)
Handle RIPng responses.
void HandleRequests(RipNgHeader hdr, Ipv6Address senderAddress, uint16_t senderPort, uint32_t incomingInterface, uint8_t hopLimit)
Handle RIPng requests.
virtual void SetIpv6(Ptr< Ipv6 > ipv6)
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.
void RecvMulticastRipng(Ptr< Socket > socket)
Receive and process multicast packet.
Ptr< UniformRandomVariable > m_rng
Rng stream.
void SetRouteStatus(Status_e status)
Set the route status.
virtual void NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP.
std::set< uint32_t > GetInterfaceExclusions() const
Get the set of interface excluded from the protocol.
Describes an IPv6 address.
void SendRouteRequest()
Send Routing Request on all interfaces.
static TypeId GetTypeId(void)
Get the type ID.
An identifier for simulation events.
std::map< uint32_t, uint8_t > m_interfaceMetrics
Map of interface metrics.
std::list< std::pair< RipNgRoutingTableEntry *, EventId > >::const_iterator RoutesCI
Const Iterator for container for the network routes.
RipNg Routing Table Entry.
Routes m_routes
the forwarding table for network.
std::list< std::pair< RipNgRoutingTableEntry *, EventId > >::iterator RoutesI
Iterator for container for the network routes.
std::map< Ptr< Socket >, uint32_t > SocketList
Socket list type.
Ptr< Ipv6Route > Lookup(Ipv6Address dest, Ptr< NetDevice >=0)
Lookup in the forwarding table for destination.
Describes an IPv6 prefix.
bool m_changed
route has been updated
bool m_initialized
flag to allow socket's late-creation.
RipNgRoutingTableEntry(void)
SplitHorizonType_e
Split Horizon strategy type.
Time m_maxTriggeredUpdateDelay
Max cooldown delay after a Triggered Update.
Time m_garbageCollectionDelay
Delay before deleting an INVALID route.
uint16_t GetRouteTag(void) const
Get the route tag.
Abstract base class for IPv6 routing protocols.
virtual void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify route removing.
Status_e m_status
route status
a unique identifier for an interface.
Time m_startupDelay
Random delay before protocol startup.
Time m_minTriggeredUpdateDelay
Min cooldown delay after a Triggered Update.