An abstract, lightweight representation of the FIB. More...
#include <abstract-fib.hpp>
Public Types | |
using | AllNodeFib = std::unordered_map< int, AbstractFib > |
Public Member Functions | |
AbstractFib (const Ptr< GlobalRouter > own, int numNodes) | |
const std::set< FibNextHop > & | getNexthops (int dstId) const |
const std::set< FibNextHop > & | getUpwardNexthops (int dstId) const |
void | checkFib () const |
Make sure that FIB is consistent (each destination has at least one downward nexthop) More... | |
int | numEnabledNhPerDst (int dstId) const |
int | getNodeId () const |
Ptr< GlobalRouter > | getGR () const |
std::string | getName () const |
int | getDegree () const |
int | getNumDsts () const |
bool | contains (int dstId) const |
auto | begin () const |
auto | end () const |
void | insert (int dstId, const FibNextHop &nh) |
size_t | erase (int dstId, int nhId) |
Friends | |
std::ostream & | operator<< (std::ostream &, const AbstractFib &fib) |
An abstract, lightweight representation of the FIB.
Definition at line 39 of file abstract-fib.hpp.
using ns3::ndn::AbstractFib::AllNodeFib = std::unordered_map<int, AbstractFib> |
Definition at line 41 of file abstract-fib.hpp.
ns3::ndn::AbstractFib::AbstractFib | ( | const Ptr< GlobalRouter > | own, |
int | numNodes | ||
) |
own | The GlobalRouter object representing the current router |
numNodes | The total number of nodes in the network |
Definition at line 36 of file abstract-fib.cpp.
const set< FibNextHop > & ns3::ndn::AbstractFib::getNexthops | ( | int | dstId | ) | const |
Definition at line 130 of file abstract-fib.cpp.
Referenced by numEnabledNhPerDst(), and ns3::ndn::removeDeadEnds().
const set< FibNextHop > & ns3::ndn::AbstractFib::getUpwardNexthops | ( | int | dstId | ) | const |
Definition at line 140 of file abstract-fib.cpp.
Referenced by ns3::ndn::removeLoops().
void ns3::ndn::AbstractFib::checkFib | ( | ) | const |
Make sure that FIB is consistent (each destination has at least one downward nexthop)
Definition at line 149 of file abstract-fib.cpp.
References ns3::ndn::DOWNWARD, ns3::ndn::FibNextHop::getCost(), ns3::ndn::FibNextHop::getNexthopId(), ns3::ndn::FibNextHop::getType(), and ns3::ndn::FibNextHop::MAX_COST.
|
inline |
Definition at line 74 of file abstract-fib.hpp.
References getNexthops().
Referenced by ns3::ndn::removeDeadEnds().
|
inline |
Definition at line 81 of file abstract-fib.hpp.
Ptr< GlobalRouter > ns3::ndn::AbstractFib::getGR | ( | ) | const |
Definition at line 78 of file abstract-fib.cpp.
|
inline |
Definition at line 90 of file abstract-fib.hpp.
|
inline |
Definition at line 96 of file abstract-fib.hpp.
|
inline |
Definition at line 102 of file abstract-fib.hpp.
|
inline |
Definition at line 108 of file abstract-fib.hpp.
|
inline |
Definition at line 115 of file abstract-fib.hpp.
|
inline |
Definition at line 121 of file abstract-fib.hpp.
void ns3::ndn::AbstractFib::insert | ( | int | dstId, |
const FibNextHop & | nh | ||
) |
Definition at line 85 of file abstract-fib.cpp.
References ns3::ndn::DOWNWARD, ns3::ndn::FibNextHop::getNexthopId(), ns3::ndn::FibNextHop::getType(), and ns3::ndn::UPWARD.
size_t ns3::ndn::AbstractFib::erase | ( | int | dstId, |
int | nhId | ||
) |
Definition at line 102 of file abstract-fib.cpp.
References ns3::ndn::UPWARD.
Referenced by ns3::ndn::removeDeadEnds().
|
friend |
Definition at line 174 of file abstract-fib.cpp.