A record of an IPv6 route. More...
#include "ipv6-routing-table-entry.h"
Public Member Functions | |
Ipv6RoutingTableEntry () | |
Constructor. More... | |
Ipv6RoutingTableEntry (const Ipv6RoutingTableEntry &route) | |
Copy constructor. More... | |
Ipv6RoutingTableEntry (const Ipv6RoutingTableEntry *route) | |
Copy constructor. More... | |
virtual | ~Ipv6RoutingTableEntry () |
Destructor. More... | |
Ipv6Address | GetDest () const |
Get the destination. More... | |
Ipv6Address | GetDestNetwork () const |
Get the destination network. More... | |
Ipv6Prefix | GetDestNetworkPrefix () const |
Get the destination prefix. More... | |
Ipv6Address | GetGateway () const |
Get the gateway. More... | |
uint32_t | GetInterface () const |
Get the interface index. More... | |
Ipv6Address | GetPrefixToUse () const |
Get the prefix to use (for multihomed link). More... | |
bool | IsDefault () const |
Is it the default route ? More... | |
bool | IsGateway () const |
Is it the gateway ? More... | |
bool | IsHost () const |
Is the route entry correspond to a host ? More... | |
bool | IsNetwork () const |
Is the route entry correspond to a network ? More... | |
void | SetPrefixToUse (Ipv6Address prefix) |
Set the prefix to use. More... | |
Static Public Member Functions | |
static Ipv6RoutingTableEntry | CreateDefaultRoute (Ipv6Address nextHop, uint32_t interface) |
Create a default route. More... | |
static Ipv6RoutingTableEntry | CreateHostRouteTo (Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse=Ipv6Address()) |
Create a route to a host. More... | |
static Ipv6RoutingTableEntry | CreateHostRouteTo (Ipv6Address dest, uint32_t interface) |
Create a route to a host. More... | |
static Ipv6RoutingTableEntry | CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface) |
Create a route to a network. More... | |
static Ipv6RoutingTableEntry | CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) |
Create a route to a network. More... | |
static Ipv6RoutingTableEntry | CreateNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface) |
Create a route to a network. More... | |
Private Member Functions | |
Ipv6RoutingTableEntry (Ipv6Address dest, Ipv6Address gateway, uint32_t interface) | |
Constructor. More... | |
Ipv6RoutingTableEntry (Ipv6Address dest, Ipv6Prefix prefix, uint32_t interface) | |
Constructor. More... | |
Ipv6RoutingTableEntry (Ipv6Address dest, uint32_t interface) | |
Constructor. More... | |
Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, Ipv6Address gateway, uint32_t interface) | |
Constructor. More... | |
Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, Ipv6Address gateway, uint32_t interface, Ipv6Address prefixToUse) | |
Constructor. More... | |
Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, uint32_t interface, Ipv6Address prefixToUse) | |
Constructor. More... | |
Private Attributes | |
Ipv6Address | m_dest |
IPv6 address of the destination. More... | |
Ipv6Prefix | m_destNetworkPrefix |
IPv6 prefix of the destination. More... | |
Ipv6Address | m_gateway |
IPv6 address of the gateway. More... | |
uint32_t | m_interface |
The interface index. More... | |
Ipv6Address | m_prefixToUse |
Prefix to use. More... | |
A record of an IPv6 route.
Definition at line 37 of file ipv6-routing-table-entry.h.
ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry | ( | ) |
Constructor.
Definition at line 27 of file ipv6-routing-table-entry.cc.
Referenced by CreateDefaultRoute(), CreateHostRouteTo(), and CreateNetworkRouteTo().
ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry | ( | const Ipv6RoutingTableEntry & | route | ) |
Copy constructor.
route | the route to copy |
Definition at line 31 of file ipv6-routing-table-entry.cc.
ns3::Ipv6RoutingTableEntry::Ipv6RoutingTableEntry | ( | const Ipv6RoutingTableEntry * | route | ) |
Copy constructor.
route | the route to copy |
Definition at line 40 of file ipv6-routing-table-entry.cc.
|
virtual |
Destructor.
Definition at line 117 of file ipv6-routing-table-entry.cc.
|
private |
Constructor.
network | network address |
prefix | network prefix |
gateway | the gateway |
interface | the interface index |
Definition at line 82 of file ipv6-routing-table-entry.cc.
|
private |
Constructor.
network | network address |
prefix | network prefix |
interface | the interface index |
prefixToUse | prefix to use |
Definition at line 94 of file ipv6-routing-table-entry.cc.
|
private |
Constructor.
network | network address |
prefix | network prefix |
gateway | the gateway |
interface | the interface index |
prefixToUse | prefix to use |
Definition at line 69 of file ipv6-routing-table-entry.cc.
|
private |
Constructor.
dest | destination address |
prefix | destination prefix |
interface | interface index |
Definition at line 106 of file ipv6-routing-table-entry.cc.
|
private |
Constructor.
dest | destination address |
gateway | the gateway |
interface | interface index |
Definition at line 49 of file ipv6-routing-table-entry.cc.
|
private |
Constructor.
dest | destination address |
interface | interface index |
Definition at line 60 of file ipv6-routing-table-entry.cc.
|
static |
Create a default route.
nextHop | next hop address to route the packet |
interface | interface index |
Definition at line 224 of file ipv6-routing-table-entry.cc.
References Ipv6RoutingTableEntry(), and ns3::Ipv6Address::GetZero().
|
static |
Create a route to a host.
dest | destination address |
nextHop | next hop address to route the packet |
interface | interface index |
prefixToUse | prefix that should be used for source address for this destination |
Definition at line 182 of file ipv6-routing-table-entry.cc.
References Ipv6RoutingTableEntry(), and ns3::Ipv6Prefix::GetOnes().
|
static |
Create a route to a host.
dest | destination address |
interface | interface index |
Definition at line 191 of file ipv6-routing-table-entry.cc.
References Ipv6RoutingTableEntry().
|
static |
Create a route to a network.
network | network address |
networkPrefix | network prefix |
nextHop | next hop address to route the packet |
interface | interface index |
Definition at line 197 of file ipv6-routing-table-entry.cc.
References Ipv6RoutingTableEntry().
Referenced by ns3::Ipv6StaticRouting::AddNetworkRouteTo(), and ns3::Ipv6StaticRouting::SetDefaultMulticastRoute().
|
static |
Create a route to a network.
network | network address |
networkPrefix | network prefix |
nextHop | next hop address to route the packet |
interface | interface index |
prefixToUse | prefix that should be used for source address for this destination |
Definition at line 206 of file ipv6-routing-table-entry.cc.
References Ipv6RoutingTableEntry().
|
static |
Create a route to a network.
network | network address |
networkPrefix | network prefix |
interface | interface index |
Definition at line 216 of file ipv6-routing-table-entry.cc.
References Ipv6RoutingTableEntry().
Ipv6Address ns3::Ipv6RoutingTableEntry::GetDest | ( | ) | const |
Get the destination.
Definition at line 128 of file ipv6-routing-table-entry.cc.
References m_dest.
Referenced by ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupRoute(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::operator<<(), StackHelper::PrintRoutingTable(), ns3::Ipv6StaticRouting::PrintRoutingTable(), ns3::RipNg::PrintRoutingTable(), and ns3::Ipv6StaticRouting::RemoveRoute().
Ipv6Address ns3::Ipv6RoutingTableEntry::GetDestNetwork | ( | ) | const |
Get the destination network.
Definition at line 158 of file ipv6-routing-table-entry.cc.
References m_dest.
Referenced by ns3::Ipv6StaticRouting::GetDefaultRoute(), ns3::Ipv6StaticRouting::HasNetworkDest(), ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6StaticRouting::NotifyRemoveRoute(), and ns3::operator<<().
Ipv6Prefix ns3::Ipv6RoutingTableEntry::GetDestNetworkPrefix | ( | ) | const |
Get the destination prefix.
Definition at line 164 of file ipv6-routing-table-entry.cc.
References m_destNetworkPrefix.
Referenced by ns3::Ipv6StaticRouting::GetDefaultRoute(), ns3::Ipv6StaticRouting::HasNetworkDest(), ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupRoute(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6StaticRouting::NotifyRemoveRoute(), ns3::operator<<(), ns3::Ipv6StaticRouting::PrintRoutingTable(), and ns3::RipNg::PrintRoutingTable().
Ipv6Address ns3::Ipv6RoutingTableEntry::GetGateway | ( | ) | const |
Get the gateway.
Definition at line 176 of file ipv6-routing-table-entry.cc.
References m_gateway.
Referenced by ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupRoute(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::operator<<(), StackHelper::PrintRoutingTable(), ns3::Ipv6StaticRouting::PrintRoutingTable(), and ns3::RipNg::PrintRoutingTable().
uint32_t ns3::Ipv6RoutingTableEntry::GetInterface | ( | ) | const |
Get the interface index.
Definition at line 230 of file ipv6-routing-table-entry.cc.
References m_interface.
Referenced by ns3::Ipv6StaticRouting::HasNetworkDest(), ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupRoute(), ns3::Ipv6StaticRouting::LookupStatic(), ns3::Ipv6StaticRouting::NotifyRemoveRoute(), ns3::operator<<(), StackHelper::PrintRoutingTable(), ns3::Ipv6StaticRouting::PrintRoutingTable(), ns3::RipNg::PrintRoutingTable(), and ns3::Ipv6StaticRouting::RemoveRoute().
Ipv6Address ns3::Ipv6RoutingTableEntry::GetPrefixToUse | ( | ) | const |
Get the prefix to use (for multihomed link).
Definition at line 134 of file ipv6-routing-table-entry.cc.
References m_prefixToUse.
Referenced by ns3::RipNg::Lookup(), ns3::Ipv6StaticRouting::LookupRoute(), ns3::Ipv6StaticRouting::LookupStatic(), StackHelper::PrintRoutingTable(), and ns3::Ipv6StaticRouting::RemoveRoute().
bool ns3::Ipv6RoutingTableEntry::IsDefault | ( | ) | const |
Is it the default route ?
Definition at line 152 of file ipv6-routing-table-entry.cc.
References ns3::Ipv6Address::GetZero(), and m_dest.
Referenced by ns3::operator<<().
bool ns3::Ipv6RoutingTableEntry::IsGateway | ( | ) | const |
Is it the gateway ?
Definition at line 170 of file ipv6-routing-table-entry.cc.
References ns3::Ipv6Address::GetZero(), and m_gateway.
Referenced by ns3::operator<<(), ns3::Ipv6StaticRouting::PrintRoutingTable(), and ns3::RipNg::PrintRoutingTable().
bool ns3::Ipv6RoutingTableEntry::IsHost | ( | ) | const |
Is the route entry correspond to a host ?
Definition at line 122 of file ipv6-routing-table-entry.cc.
References ns3::Ipv6Prefix::GetOnes(), and m_destNetworkPrefix.
Referenced by IsNetwork(), ns3::operator<<(), ns3::Ipv6StaticRouting::PrintRoutingTable(), and ns3::RipNg::PrintRoutingTable().
bool ns3::Ipv6RoutingTableEntry::IsNetwork | ( | ) | const |
Is the route entry correspond to a network ?
Definition at line 146 of file ipv6-routing-table-entry.cc.
References IsHost().
Referenced by ns3::operator<<().
void ns3::Ipv6RoutingTableEntry::SetPrefixToUse | ( | Ipv6Address | prefix | ) |
Set the prefix to use.
prefix | prefix to use |
Definition at line 140 of file ipv6-routing-table-entry.cc.
References m_prefixToUse.
|
private |
IPv6 address of the destination.
Definition at line 261 of file ipv6-routing-table-entry.h.
Referenced by GetDest(), GetDestNetwork(), and IsDefault().
|
private |
IPv6 prefix of the destination.
Definition at line 266 of file ipv6-routing-table-entry.h.
Referenced by GetDestNetworkPrefix(), and IsHost().
|
private |
IPv6 address of the gateway.
Definition at line 271 of file ipv6-routing-table-entry.h.
Referenced by GetGateway(), and IsGateway().
|
private |
The interface index.
Definition at line 276 of file ipv6-routing-table-entry.h.
Referenced by GetInterface().
|
private |
Prefix to use.
Definition at line 281 of file ipv6-routing-table-entry.h.
Referenced by GetPrefixToUse(), and SetPrefixToUse().