ns-3
ns3::Ipv6RoutingTableEntry Class Reference

A record of an IPv6 route. More...

#include <ipv6-routing-table-entry.h>

List of all members.

Public Member Functions

 Ipv6RoutingTableEntry ()
 Constructor.
 Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const &route)
 Copy constructor.
 Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const *route)
 Copy constructor.
 ~Ipv6RoutingTableEntry ()
 Destructor.
bool IsHost () const
 Is the route entry correspond to a host ?
Ipv6Address GetDest () const
 Get the destination.
Ipv6Address GetPrefixToUse () const
 Get the prefix to use (for multihomed link).
void SetPrefixToUse (Ipv6Address prefix)
 Set the prefix to use.
bool IsNetwork () const
 Is the route entry correspond to a network ?
Ipv6Address GetDestNetwork () const
 Get the destination network.
Ipv6Prefix GetDestNetworkPrefix () const
 Get the destination prefix.
bool IsDefault () const
 Is it the default route ?
bool IsGateway () const
 Is it the gateway ?
Ipv6Address GetGateway () const
 Get the gateway.
uint32_t GetInterface () const
 Get the interface index.

Static Public Member Functions

static Ipv6RoutingTableEntry CreateHostRouteTo (Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address())
 Create a route to a host.
static Ipv6RoutingTableEntry CreateHostRouteTo (Ipv6Address dest, uint32_t interface)
 Create a route to a host.
static Ipv6RoutingTableEntry CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface)
 Create a route to a network.
static Ipv6RoutingTableEntry CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse)
 Create a route to a network.
static Ipv6RoutingTableEntry CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface)
 Create a route to a network.
static Ipv6RoutingTableEntry CreateDefaultRoute (Ipv6Address nextHop, uint32_t interface)
 Create a default route.

Detailed Description

A record of an IPv6 route.


Constructor & Destructor Documentation

ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry ( Ipv6RoutingTableEntry const &  route)

Copy constructor.

Parameters:
routethe route to copy
ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry ( Ipv6RoutingTableEntry const *  route)

Copy constructor.

Parameters:
routethe route to copy

Member Function Documentation

Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateDefaultRoute ( Ipv6Address  nextHop,
uint32_t  interface 
)
static

Create a default route.

Parameters:
nextHopnext hop address to route the packet
interfaceinterface index
Returns:
IPv6Route object

References ns3::Ipv6Address::GetZero(), and Ipv6RoutingTableEntry().

Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateHostRouteTo ( Ipv6Address  dest,
Ipv6Address  nextHop,
uint32_t  interface,
Ipv6Address  prefixToUse = Ipv6Address () 
)
static

Create a route to a host.

Parameters:
destdestination address
nextHopnext hop address to route the packet
interfaceinterface index
prefixToUseprefix that should be used for source address for this destination
Returns:
IPv6Route object

References ns3::Ipv6Prefix::GetOnes(), and Ipv6RoutingTableEntry().

Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateHostRouteTo ( Ipv6Address  dest,
uint32_t  interface 
)
static

Create a route to a host.

Parameters:
destdestination address
interfaceinterface index
Returns:
IPv6Route object

References Ipv6RoutingTableEntry().

Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateNetworkRouteTo ( Ipv6Address  network,
Ipv6Prefix  networkPrefix,
Ipv6Address  nextHop,
uint32_t  interface 
)
static

Create a route to a network.

Parameters:
networknetwork address
networkPrefixnetwork prefix
nextHopnext hop address to route the packet
interfaceinterface index
Returns:
IPv6Route object

References Ipv6RoutingTableEntry().

Referenced by ns3::Ipv6StaticRouting::AddNetworkRouteTo(), and ns3::Ipv6StaticRouting::SetDefaultMulticastRoute().

Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateNetworkRouteTo ( Ipv6Address  network,
Ipv6Prefix  networkPrefix,
Ipv6Address  nextHop,
uint32_t  interface,
Ipv6Address  prefixToUse 
)
static

Create a route to a network.

Parameters:
networknetwork address
networkPrefixnetwork prefix
nextHopnext hop address to route the packet
interfaceinterface index
prefixToUseprefix that should be used for source address for this destination
Returns:
IPv6Route object

References Ipv6RoutingTableEntry().

Ipv6RoutingTableEntry ns3::Ipv6RoutingTableEntry::CreateNetworkRouteTo ( Ipv6Address  network,
Ipv6Prefix  networkPrefix,
uint32_t  interface 
)
static

Create a route to a network.

Parameters:
networknetwork address
networkPrefixnetwork prefix
interfaceinterface index
Returns:
IPv6Route object

References Ipv6RoutingTableEntry().

Ipv6Address ns3::Ipv6RoutingTableEntry::GetDest ( void  ) const

Get the destination.

Returns:
the IPv6 address of the destination of this route

Referenced by ns3::Ipv6StaticRouting::RemoveRoute().

Ipv6Address ns3::Ipv6RoutingTableEntry::GetDestNetwork ( void  ) const
Ipv6Prefix ns3::Ipv6RoutingTableEntry::GetDestNetworkPrefix ( ) const
Ipv6Address ns3::Ipv6RoutingTableEntry::GetGateway ( void  ) const

Get the gateway.

Returns:
the IPv6 address of the gateway
uint32_t ns3::Ipv6RoutingTableEntry::GetInterface ( void  ) const
Ipv6Address ns3::Ipv6RoutingTableEntry::GetPrefixToUse ( ) const

Get the prefix to use (for multihomed link).

Returns:
prefix address to use

Referenced by ns3::Ipv6StaticRouting::RemoveRoute().

bool ns3::Ipv6RoutingTableEntry::IsDefault ( void  ) const

Is it the default route ?

Returns:
true if this route is a default route, false otherwise

References ns3::Ipv6Address::GetZero(), and ns3::Ipv6Address::IsEqual().

bool ns3::Ipv6RoutingTableEntry::IsGateway ( void  ) const

Is it the gateway ?

Returns:
true if this route is a gateway, false otherwise

References ns3::Ipv6Address::GetZero(), and ns3::Ipv6Address::IsEqual().

bool ns3::Ipv6RoutingTableEntry::IsHost ( void  ) const

Is the route entry correspond to a host ?

Returns:
true if the route is a host, false otherwise

References ns3::Ipv6Prefix::GetOnes(), and ns3::Ipv6Prefix::IsEqual().

Referenced by IsNetwork().

bool ns3::Ipv6RoutingTableEntry::IsNetwork ( void  ) const

Is the route entry correspond to a network ?

Returns:
true if the route is a network, false otherwise

References IsHost().

Referenced by ns3::Ipv6StaticRouting::NotifyRemoveAddress().

void ns3::Ipv6RoutingTableEntry::SetPrefixToUse ( Ipv6Address  prefix)

Set the prefix to use.

Parameters:
prefixprefix to use

The documentation for this class was generated from the following files: