#include <ipv4-routing-table-entry.h>
Public Member Functions | |
Ipv4RoutingTableEntry () | |
This constructor does nothing. | |
Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const &route) | |
Copy Constructor. More... | |
Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const *route) | |
Copy Constructor. More... | |
Ipv4Address | GetDest (void) const |
Ipv4Address | GetDestNetwork (void) const |
Ipv4Mask | GetDestNetworkMask (void) const |
Ipv4Address | GetGateway (void) const |
uint32_t | GetInterface (void) const |
bool | IsDefault (void) const |
bool | IsGateway (void) const |
bool | IsHost (void) const |
bool | IsNetwork (void) 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 network, Ipv4Mask mask, Ipv4Address gateway, uint32_t interface) | |
Ipv4RoutingTableEntry (Ipv4Address dest, Ipv4Mask mask, uint32_t interface) | |
Ipv4RoutingTableEntry (Ipv4Address dest, Ipv4Address gateway, uint32_t interface) | |
Ipv4RoutingTableEntry (Ipv4Address dest, uint32_t interface) | |
Private Attributes | |
Ipv4Address | m_dest |
Ipv4Mask | m_destNetworkMask |
Ipv4Address | m_gateway |
uint32_t | m_interface |
A record of an IPv4 routing table entry for Ipv4GlobalRouting and Ipv4StaticRouting. This is not a reference counted object.
Definition at line 37 of file ipv4-routing-table-entry.h.
ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry | ( | Ipv4RoutingTableEntry const & | route | ) |
Copy Constructor.
route | The route to copy |
Definition at line 38 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry | ( | Ipv4RoutingTableEntry const * | route | ) |
Copy Constructor.
route | The route to copy |
Definition at line 47 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
|
static |
nextHop | Ipv4Address of the next hop |
interface | Outgoing interface |
Definition at line 206 of file ipv4-routing-table-entry.cc.
References ns3::Ipv4Address::GetZero(), Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION_NOARGS.
|
static |
dest | Ipv4Address of the destination |
nextHop | Ipv4Address of the next hop |
interface | Outgoing interface |
Definition at line 172 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv4GlobalRouting::AddHostRouteTo().
|
static |
dest | Ipv4Address of the destination |
interface | Outgoing interface |
Definition at line 180 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION_NOARGS.
|
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 187 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::Ipv4GlobalRouting::AddASExternalRouteTo(), ns3::Ipv4StaticRouting::AddNetworkRouteTo(), ns3::Ipv4GlobalRouting::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 197 of file ipv4-routing-table-entry.cc.
References Ipv4RoutingTableEntry(), and NS_LOG_FUNCTION_NOARGS.
Ipv4Address ns3::Ipv4RoutingTableEntry::GetDest | ( | void | ) | const |
Definition at line 109 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Ipv4GlobalRouting::PrintRoutingTable().
Ipv4Address ns3::Ipv4RoutingTableEntry::GetDestNetwork | ( | void | ) | const |
Definition at line 134 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv4StaticRouting::NotifyRemoveAddress(), ns3::olsr::RoutingProtocol::RoutingTableComputation(), and ns3::olsr::RoutingProtocol::SetRoutingTableAssociation().
Ipv4Mask ns3::Ipv4RoutingTableEntry::GetDestNetworkMask | ( | void | ) | const |
Definition at line 140 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv4StaticRouting::NotifyRemoveAddress(), ns3::Ipv4StaticRouting::PrintRoutingTable(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::olsr::RoutingProtocol::RoutingTableComputation(), and ns3::olsr::RoutingProtocol::SetRoutingTableAssociation().
Ipv4Address ns3::Ipv4RoutingTableEntry::GetGateway | ( | void | ) | const |
Definition at line 159 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Ipv4GlobalRouting::PrintRoutingTable().
uint32_t ns3::Ipv4RoutingTableEntry::GetInterface | ( | void | ) | const |
Definition at line 165 of file ipv4-routing-table-entry.cc.
References NS_LOG_FUNCTION.
Referenced by ns3::Ipv4StaticRouting::NotifyInterfaceDown(), ns3::Ipv4StaticRouting::NotifyRemoveAddress(), ns3::Ipv4StaticRouting::PrintRoutingTable(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), and ns3::olsr::RoutingProtocol::UsesNonOlsrOutgoingInterface().
bool ns3::Ipv4RoutingTableEntry::IsDefault | ( | void | ) | const |
Definition at line 121 of file ipv4-routing-table-entry.cc.
References ns3::Ipv4Address::GetZero(), ns3::Ipv4Address::IsEqual(), and NS_LOG_FUNCTION.
bool ns3::Ipv4RoutingTableEntry::IsGateway | ( | void | ) | const |
Definition at line 146 of file ipv4-routing-table-entry.cc.
References ns3::Ipv4Address::GetZero(), ns3::Ipv4Address::IsEqual(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Ipv4GlobalRouting::PrintRoutingTable().
bool ns3::Ipv4RoutingTableEntry::IsHost | ( | void | ) | const |
Definition at line 96 of file ipv4-routing-table-entry.cc.
References ns3::Ipv4Mask::GetOnes(), ns3::Ipv4Mask::IsEqual(), and NS_LOG_FUNCTION.
Referenced by IsNetwork(), ns3::Ipv4StaticRouting::PrintRoutingTable(), and ns3::Ipv4GlobalRouting::PrintRoutingTable().
bool ns3::Ipv4RoutingTableEntry::IsNetwork | ( | void | ) | const |
This method is implemented as !IsHost ().
Definition at line 115 of file ipv4-routing-table-entry.cc.
References IsHost(), and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4StaticRouting::NotifyRemoveAddress().