NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::ndn::FibNextHop Class Reference

#include <fib-nexthop.hpp>

Public Member Functions

 FibNextHop (int cost, int nhId, int costDelta=-1, NextHopType type=NextHopType::DISABLED)
 
int getNexthopId () const
 
int getCost () const
 
int getCostDelta () const
 
NextHopType getType () const
 
void setType (const NextHopType &newType)
 
void setCost (int newCost, int newCostDelta)
 

Static Public Attributes

static constexpr int MAX_COST = 1 * 1000 * 1000
 

Friends

bool operator< (const FibNextHop &own, const FibNextHop &other)
 
bool operator== (const FibNextHop &own, const FibNextHop &other)
 
bool operator!= (const FibNextHop &own, const FibNextHop &other)
 
std::ostream & operator<< (std::ostream &, const FibNextHop &fib)
 

Detailed Description

Definition at line 36 of file fib-nexthop.hpp.

Constructor & Destructor Documentation

◆ FibNextHop()

ns3::ndn::FibNextHop::FibNextHop ( int  cost,
int  nhId,
int  costDelta = -1,
NextHopType  type = NextHopType::DISABLED 
)
Parameters
nhIdThe nexthop id.
costThe link cost of a nexthop. has to be larger than 0!
costDeltaThe cost difference (relative to the shortest path nexthop)
typeThe nexthop type
See also
NextHopType

Definition at line 31 of file fib-nexthop.cpp.

References MAX_COST, and ns3::ndn::NODE_ID_LIMIT.

Member Function Documentation

◆ getNexthopId()

◆ getCost()

int ns3::ndn::FibNextHop::getCost ( ) const
inline

◆ getCostDelta()

int ns3::ndn::FibNextHop::getCostDelta ( ) const
inline

Definition at line 62 of file fib-nexthop.hpp.

◆ getType()

NextHopType ns3::ndn::FibNextHop::getType ( ) const
inline

◆ setType()

void ns3::ndn::FibNextHop::setType ( const NextHopType newType)
inline

Definition at line 75 of file fib-nexthop.hpp.

References ns3::ndn::DISABLED.

◆ setCost()

void ns3::ndn::FibNextHop::setCost ( int  newCost,
int  newCostDelta 
)
inline

Definition at line 83 of file fib-nexthop.hpp.

Friends And Related Function Documentation

◆ operator<

bool operator< ( const FibNextHop own,
const FibNextHop other 
)
friend

Definition at line 93 of file fib-nexthop.hpp.

◆ operator==

bool operator== ( const FibNextHop own,
const FibNextHop other 
)
friend

Definition at line 103 of file fib-nexthop.hpp.

◆ operator!=

bool operator!= ( const FibNextHop own,
const FibNextHop other 
)
friend

Definition at line 117 of file fib-nexthop.hpp.

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const FibNextHop fib 
)
friend

Definition at line 56 of file fib-nexthop.cpp.

Member Data Documentation

◆ MAX_COST

constexpr int ns3::ndn::FibNextHop::MAX_COST = 1 * 1000 * 1000
staticconstexpr

Definition at line 38 of file fib-nexthop.hpp.

Referenced by ns3::ndn::AbstractFib::checkFib(), and FibNextHop().


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