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"
267 typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >
Routes;
270 typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >::const_iterator
RoutesCI;
273 typedef std::list<std::pair <RipNgRoutingTableEntry *, EventId> >::iterator
RoutesI;
SplitHorizonType_e m_splitHorizonStrategy
std::map< Ptr< Socket >, uint32_t >::iterator SocketListI
Socket list type iterator.
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.
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.
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 {2080}.
void SendTriggeredRouteUpdate()
Send Triggered Routing Updates on all interfaces.
std::set< uint32_t > m_interfaceExclusions
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.
uint8_t GetInterfaceMetric(uint32_t interface) const
Get the metric for an interface.
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.
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address.
std::list< std::pair< RipNgRoutingTableEntry *, EventId > > Routes
Container for the network routes - pair RipNgRoutingTableEntry *, EventId (update event) ...
Time m_timeoutDelay
Delay before invalidating a route.
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
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.
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)
Status_e GetRouteStatus(void) const
Get the route status.
Time m_unsolicitedUpdate
time between two Unsolicited Routing Updates
virtual ~RipNgRoutingTableEntry()
uint8_t GetRouteMetric(void) const
Get the route metric.
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.
std::set< uint32_t > GetInterfaceExclusions() const
Get the set of interface excluded from the protocol.
void SetRouteStatus(Status_e status)
Set the route status.
virtual void NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP.
uint16_t GetRouteTag(void) const
Get the route tag.
Describes an IPv6 address.
void SendRouteRequest()
Send Routing Request on all interfaces.
static TypeId GetTypeId(void)
an identifier for simulation events.
std::map< uint32_t, uint8_t > m_interfaceMetrics
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream) const
Print the Routing Table entries.
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
RipNgRoutingTableEntry(void)
Time m_maxTriggeredUpdateDelay
Max cooldown delay after a Triggered Update.
Time m_garbageCollectionDelay
Delay before deleting an INVALID route.
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.
bool IsRouteChanged(void) const
Get the route changed status.