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