A record of an IPv4 routing table entry for Ipv4GlobalRouting and Ipv4StaticRouting. More...
#include "ipv4-routing-table-entry.h"
Public Member Functions | |
Ipv4RoutingTableEntry () | |
This constructor does nothing. | |
Ipv4RoutingTableEntry (const Ipv4RoutingTableEntry &route) | |
Copy Constructor. | |
Ipv4RoutingTableEntry (const Ipv4RoutingTableEntry *route) | |
Copy Constructor. | |
Ipv4Address | GetDest () const |
Ipv4Address | GetDestNetwork () const |
Ipv4Mask | GetDestNetworkMask () const |
Ipv4Address | GetGateway () const |
uint32_t | GetInterface () const |
bool | IsDefault () const |
bool | IsGateway () const |
bool | IsHost () const |
bool | IsNetwork () const |
Static Public Member Functions | |
static Ipv4RoutingTableEntry | CreateDefaultRoute (Ipv4Address nextHop, uint32_t interface) |
static Ipv4RoutingTableEntry | CreateHostRouteTo (Ipv4Address dest, Ipv4Address nextHop, uint32_t interface) |
static Ipv4RoutingTableEntry | CreateHostRouteTo (Ipv4Address dest, uint32_t interface) |
static Ipv4RoutingTableEntry | CreateNetworkRouteTo (Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface) |
static Ipv4RoutingTableEntry | CreateNetworkRouteTo (Ipv4Address network, Ipv4Mask networkMask, uint32_t interface) |
Private Member Functions | |
Ipv4RoutingTableEntry (Ipv4Address dest, Ipv4Address gateway, uint32_t interface) | |
Constructor. | |
Ipv4RoutingTableEntry (Ipv4Address dest, Ipv4Mask mask, uint32_t interface) | |
Constructor. | |
Ipv4RoutingTableEntry (Ipv4Address dest, uint32_t interface) | |
Constructor. | |
Ipv4RoutingTableEntry (Ipv4Address network, Ipv4Mask mask, Ipv4Address gateway, uint32_t interface) | |
Constructor. | |
Private Attributes | |
Ipv4Address | m_dest |
destination address | |
Ipv4Mask | m_destNetworkMask |
destination network mask | |
Ipv4Address | m_gateway |
gateway | |
uint32_t | m_interface |
output interface | |
A record of an IPv4 routing table entry for Ipv4GlobalRouting and Ipv4StaticRouting.
This is not a reference counted object.
Definition at line 26 of file ipv4-routing-table-entry.h.
ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry | ( | ) |
This constructor does nothing.
Definition at line 23 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
Referenced by CreateDefaultRoute(), CreateHostRouteTo(), CreateHostRouteTo(), CreateNetworkRouteTo(), and CreateNetworkRouteTo().
ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry | ( | const Ipv4RoutingTableEntry & | route | ) |
Copy Constructor.
route | The route to copy |
Definition at line 28 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry | ( | const Ipv4RoutingTableEntry * | route | ) |
Copy Constructor.
route | The route to copy |
Definition at line 37 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
|
private |
Constructor.
network | network address |
mask | network mask |
gateway | the gateway |
interface | the interface index |
Definition at line 64 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
|
private |
Constructor.
dest | destination address |
mask | network mask |
interface | the interface index |
Definition at line 76 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
|
private |
Constructor.
dest | destination address |
gateway | the gateway |
interface | the interface index |
Definition at line 46 of file ipv4-routing-table-entry.cc.
|
private |
Constructor.
dest | destination address |
interface | the interface index |
Definition at line 56 of file ipv4-routing-table-entry.cc.
|
static |
nextHop | Ipv4Address of the next hop |
interface | Outgoing interface |
Definition at line 184 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), ns3::Ipv4Address::GetZero(), ns3::Ipv4Mask::GetZero(), and NS_LOG_FUNCTION.
|
static |
dest | Ipv4Address of the destination |
nextHop | Ipv4Address of the next hop |
interface | Outgoing interface |
Definition at line 151 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4GlobalRouting::AddHostRouteTo(), and ns3::Ipv4GlobalRouting::AddHostRouteTo().
|
static |
dest | Ipv4Address of the destination |
interface | Outgoing interface |
Definition at line 158 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION.
|
static |
network | Ipv4Address of the destination network |
networkMask | Ipv4Mask of the destination network mask |
nextHop | Ipv4Address of the next hop |
interface | Outgoing interface |
Definition at line 165 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4GlobalRouting::AddASExternalRouteTo(), ns3::Ipv4GlobalRouting::AddNetworkRouteTo(), ns3::Ipv4GlobalRouting::AddNetworkRouteTo(), ns3::Ipv4StaticRouting::AddNetworkRouteTo(), ns3::Ipv4StaticRouting::AddNetworkRouteTo(), ns3::GlobalRouter::InjectRoute(), and ns3::Ipv4StaticRouting::SetDefaultMulticastRoute().
|
static |
network | Ipv4Address of the destination network |
networkMask | Ipv4Mask of the destination network mask |
interface | Outgoing interface |
Definition at line 175 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION.
Ipv4Address ns3::Ipv4RoutingTableEntry::GetDest | ( | ) | const |
Definition at line 95 of file ipv4-routing-table-entry.cc.
References m_dest, and NS_LOG_FUNCTION.
Referenced by BridgeTest::DoRun(), LanTest::DoRun(), LinkTest::DoRun(), TwoBridgeTest::DoRun(), TwoLanTest::DoRun(), TwoLinkTest::DoRun(), ns3::Rip::Lookup(), ns3::Ipv4GlobalRouting::LookupGlobal(), ns3::Ipv4StaticRouting::LookupRoute(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::operator<<(), ns3::operator==(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Rip::PrintRoutingTable().
Ipv4Address ns3::Ipv4RoutingTableEntry::GetDestNetwork | ( | ) | const |
Definition at line 116 of file ipv4-routing-table-entry.cc.
References m_dest, and NS_LOG_FUNCTION.
Referenced by ns3::Rip::Lookup(), ns3::operator<<(), ns3::olsr::RoutingProtocol::RoutingTableComputation(), and ns3::olsr::RoutingProtocol::SetRoutingTableAssociation().
Ipv4Mask ns3::Ipv4RoutingTableEntry::GetDestNetworkMask | ( | ) | const |
Definition at line 123 of file ipv4-routing-table-entry.cc.
References m_destNetworkMask, and NS_LOG_FUNCTION.
Referenced by ns3::Rip::Lookup(), ns3::Ipv4StaticRouting::LookupRoute(), ns3::operator<<(), ns3::operator==(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), ns3::Rip::PrintRoutingTable(), ns3::olsr::RoutingProtocol::RoutingTableComputation(), and ns3::olsr::RoutingProtocol::SetRoutingTableAssociation().
Ipv4Address ns3::Ipv4RoutingTableEntry::GetGateway | ( | ) | const |
Definition at line 137 of file ipv4-routing-table-entry.cc.
References m_gateway, and NS_LOG_FUNCTION.
Referenced by BridgeTest::DoRun(), LanTest::DoRun(), LinkTest::DoRun(), TwoBridgeTest::DoRun(), TwoLanTest::DoRun(), TwoLinkTest::DoRun(), ns3::Rip::Lookup(), ns3::Ipv4GlobalRouting::LookupGlobal(), ns3::Ipv4StaticRouting::LookupRoute(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::operator<<(), ns3::operator==(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Rip::PrintRoutingTable().
uint32_t ns3::Ipv4RoutingTableEntry::GetInterface | ( | ) | const |
Definition at line 144 of file ipv4-routing-table-entry.cc.
References m_interface, and NS_LOG_FUNCTION.
Referenced by ns3::Rip::Lookup(), ns3::Ipv4GlobalRouting::LookupGlobal(), ns3::Ipv4StaticRouting::LookupRoute(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::operator<<(), ns3::operator==(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), ns3::Rip::PrintRoutingTable(), and ns3::olsr::RoutingProtocol::UsesNonOlsrOutgoingInterface().
bool ns3::Ipv4RoutingTableEntry::IsDefault | ( | ) | const |
Definition at line 109 of file ipv4-routing-table-entry.cc.
References ns3::Ipv4Address::GetZero(), m_dest, and NS_LOG_FUNCTION.
Referenced by ns3::operator<<().
bool ns3::Ipv4RoutingTableEntry::IsGateway | ( | ) | const |
Definition at line 130 of file ipv4-routing-table-entry.cc.
References ns3::Ipv4Address::GetZero(), m_gateway, and NS_LOG_FUNCTION.
Referenced by ns3::operator<<(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Rip::PrintRoutingTable().
bool ns3::Ipv4RoutingTableEntry::IsHost | ( | ) | const |
Definition at line 88 of file ipv4-routing-table-entry.cc.
References ns3::Ipv4Mask::GetOnes(), m_destNetworkMask, and NS_LOG_FUNCTION.
Referenced by IsNetwork(), ns3::operator<<(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Rip::PrintRoutingTable().
bool ns3::Ipv4RoutingTableEntry::IsNetwork | ( | ) | const |
This method is implemented as !IsHost ().
Definition at line 102 of file ipv4-routing-table-entry.cc.
References IsHost(), and NS_LOG_FUNCTION.
Referenced by ns3::operator<<().
|
private |
destination address
Definition at line 158 of file ipv4-routing-table-entry.h.
Referenced by GetDest(), GetDestNetwork(), and IsDefault().
|
private |
destination network mask
Definition at line 159 of file ipv4-routing-table-entry.h.
Referenced by GetDestNetworkMask(), and IsHost().
|
private |
gateway
Definition at line 160 of file ipv4-routing-table-entry.h.
Referenced by GetGateway(), and IsGateway().
|
private |
output interface
Definition at line 161 of file ipv4-routing-table-entry.h.
Referenced by GetInterface().