|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef IPV6_STATIC_ROUTING_H
22 #define IPV6_STATIC_ROUTING_H
29 #include "ns3/ipv6-address.h"
31 #include "ns3/ipv6-header.h"
32 #include "ns3/ipv6-routing-protocol.h"
41 class Ipv6RoutingTableEntry;
42 class Ipv6MulticastRoutingTableEntry;
158 uint32_t
GetMetric (uint32_t index)
const;
250 typedef std::list<std::pair <Ipv6RoutingTableEntry *, uint32_t> >
NetworkRoutes;
253 typedef std::list<std::pair <Ipv6RoutingTableEntry *, uint32_t> >::const_iterator
NetworkRoutesCI;
256 typedef std::list<std::pair <Ipv6RoutingTableEntry *, uint32_t> >::iterator
NetworkRoutesI;
A record of an IPv6 multicast route.
a unique identifier for an interface.
virtual 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.
IPv6 address associated with an interface.
bool HasNetworkDest(Ipv6Address dest, uint32_t interfaceIndex)
If the destination is already present in network destination list.
uint32_t GetNRoutes() const
Get the number or entries in the routing table.
static TypeId GetTypeId()
The interface Id associated with this class.
SocketErrno
Enumeration of the possible errors returned by a socket.
virtual 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)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void NotifyInterfaceUp(uint32_t interface)
Notify when specified interface goes UP.
Ipv6RoutingTableEntry GetDefaultRoute()
Get the default route.
virtual void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify route removing.
Ptr< Ipv6Route > LookupStatic(Ipv6Address dest, Ptr< NetDevice >=0)
Lookup in the forwarding table for destination.
uint32_t GetNMulticastRoutes() const
Get the number of entries in the multicast routing table.
Describes an IPv6 address.
virtual void SetIpv6(Ptr< Ipv6 > ipv6)
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.
A record of an IPv6 route.
std::list< Ipv6MulticastRoutingTableEntry * > MulticastRoutes
Container for the multicast routes.
uint32_t GetMetric(uint32_t index) const
Get a metric for route from the static unicast routing table.
void AddMulticastRoute(Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector< uint32_t > outputInterfaces)
Add a multicast route for a given multicast source and group.
std::list< Ipv6MulticastRoutingTableEntry * >::iterator MulticastRoutesI
Iterator for container for the multicast routes.
std::list< std::pair< Ipv6RoutingTableEntry *, uint32_t > >::const_iterator NetworkRoutesCI
Const Iterator for container for the network routes.
Smart pointer class similar to boost::intrusive_ptr.
void SetDefaultRoute(Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address("::"), uint32_t metric=0)
Set the default route.
Ipv6MulticastRoutingTableEntry GetMulticastRoute(uint32_t i) const
Get the specified multicast route.
MulticastRoutes m_multicastRoutes
the forwarding table for multicast.
virtual void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
Abstract base class for IPv6 routing protocols.
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address.
virtual void DoDispose()
Dispose this object.
void AddHostRouteTo(Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address("::"), uint32_t metric=0)
Add route to host.
Ipv6RoutingTableEntry GetRoute(uint32_t i) const
Get a specified route.
virtual ~Ipv6StaticRouting()
void AddNetworkRouteTo(Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, uint32_t metric=0)
Add route to network.
std::list< std::pair< Ipv6RoutingTableEntry *, uint32_t > > NetworkRoutes
Container for the network routes.
Static routing protocol for IP version 6 stacks.
bool RemoveMulticastRoute(Ipv6Address origin, Ipv6Address group, uint32_t inputInterface)
Remove a static multicast route.
NetworkRoutes m_networkRoutes
the forwarding table for network.
virtual void NotifyInterfaceDown(uint32_t interface)
Notify when specified interface goes DOWN.
virtual void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())
Notify a new route.
bool LookupRoute(const Ipv6RoutingTableEntry &route, uint32_t metric)
Checks if a route is already present in the forwarding table.
std::list< Ipv6MulticastRoutingTableEntry * >::const_iterator MulticastRoutesCI
Const Iterator for container for the multicast routes.
void SetDefaultMulticastRoute(uint32_t outputInterface)
Set the default multicast route.
Describes an IPv6 prefix.
void RemoveRoute(uint32_t i)
Remove a route from the routing table.
std::list< std::pair< Ipv6RoutingTableEntry *, uint32_t > >::iterator NetworkRoutesI
Iterator for container for the network routes.
Ptr< Ipv6 > m_ipv6
Ipv6 reference.
Unit
The unit to use to interpret a number representing time.
virtual void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)
Notify when specified interface add an address.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) const
Print the Routing Table entries.