20 #ifndef IPV6_ROUTING_PROTOCOL_H
21 #define IPV6_ROUTING_PROTOCOL_H
27 #include "ns3/callback.h"
28 #include "ns3/nstime.h"
29 #include "ns3/object.h"
30 #include "ns3/output-stream-wrapper.h"
31 #include "ns3/packet.h"
32 #include "ns3/socket.h"
37 class Ipv6MulticastRoute;
Describes an IPv6 address.
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address.
IPv6 address associated with an interface.
Describes an IPv6 prefix.
Abstract base class for IPv6 routing protocols.
virtual void NotifyInterfaceUp(uint32_t interface)=0
Notify when specified interface goes UP.
static TypeId GetTypeId()
Get the type ID.
virtual void PrintRoutingTable(Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) const =0
Print the Routing Table entries.
virtual bool RouteInput(Ptr< const Packet > p, const Ipv6Header &header, Ptr< const NetDevice > idev, const UnicastForwardCallback &ucb, const MulticastForwardCallback &mcb, const LocalDeliverCallback &lcb, const ErrorCallback &ecb)=0
Route an input packet (to be forwarded or locally delivered)
Callback< void, Ptr< const Packet >, const Ipv6Header &, Socket::SocketErrno > ErrorCallback
Callback for routing errors (e.g., no route found)
Callback< void, Ptr< const NetDevice >, Ptr< Ipv6MulticastRoute >, Ptr< const Packet >, const Ipv6Header & > MulticastForwardCallback
Callback for multicast packets to be forwarded.
virtual void NotifyRemoveAddress(uint32_t interface, Ipv6InterfaceAddress address)=0
Notify when specified interface add an address.
virtual Ptr< Ipv6Route > RouteOutput(Ptr< Packet > p, const Ipv6Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr)=0
Query routing cache for an existing route, for an outbound packet.
Callback< void, Ptr< const Packet >, const Ipv6Header &, uint32_t > LocalDeliverCallback
Callback for packets to be locally delivered.
virtual void NotifyInterfaceDown(uint32_t interface)=0
Notify when specified interface goes DOWN.
virtual void SetIpv6(Ptr< Ipv6 > ipv6)=0
Typically, invoked directly or indirectly from ns3::Ipv6::SetRoutingProtocol.
Callback< void, Ptr< const NetDevice >, Ptr< Ipv6Route >, Ptr< const Packet >, const Ipv6Header & > UnicastForwardCallback
Callback for unicast packets to be forwarded.
virtual void NotifyAddRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())=0
Notify a new route.
virtual void NotifyAddAddress(uint32_t interface, Ipv6InterfaceAddress address)=0
Notify when specified interface add an address.
virtual void NotifyRemoveRoute(Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address::GetZero())=0
Notify route removing.
A base class which provides memory management and object aggregation.
SocketErrno
Enumeration of the possible errors returned by a socket.
Unit
The unit to use to interpret a number representing time.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.