NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::fib::Entry Class Reference

represents a FIB entry More...

#include <fib-entry.hpp>

Inheritance diagram for nfd::fib::Entry:
Collaboration diagram for nfd::fib::Entry:

Public Member Functions

 Entry (const Name &prefix)
 
const NamegetPrefix () const
 
const NextHopListgetNextHops () const
 
bool hasNextHops () const
 
bool hasNextHop (shared_ptr< Face > face) const
 
void addNextHop (shared_ptr< Face > face, uint64_t cost)
 adds a NextHop record More...
 
void removeNextHop (shared_ptr< Face > face)
 removes a NextHop record More...
 

Friends

class nfd::NameTree
 
class nfd::name_tree::Entry
 

Detailed Description

represents a FIB entry

Definition at line 53 of file fib-entry.hpp.

Constructor & Destructor Documentation

nfd::fib::Entry::Entry ( const Name prefix)
explicit

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

Member Function Documentation

const Name & nfd::fib::Entry::getPrefix ( ) const
inline

Definition at line 115 of file fib-entry.hpp.

Referenced by nfd::FibEnumerationPublisher::generate().

const NextHopList & nfd::fib::Entry::getNextHops ( ) const
inline

Definition at line 121 of file fib-entry.hpp.

Referenced by nfd::FibEnumerationPublisher::generate().

bool nfd::fib::Entry::hasNextHops ( ) const
inline
Returns
whether this Entry has any NextHop record

Definition at line 127 of file fib-entry.hpp.

References ndn::Name::empty().

bool nfd::fib::Entry::hasNextHop ( shared_ptr< Face face) const
Returns
whether there is a NextHop record for face
Todo:
change parameter type to Face&

Definition at line 46 of file fib-entry.cpp.

void nfd::fib::Entry::addNextHop ( shared_ptr< Face face,
uint64_t  cost 
)

adds a NextHop record

If a NextHop record for face already exists, its cost is updated.

Note
shared_ptr is passed by value because this function will take shared ownership

Definition at line 52 of file fib-entry.cpp.

void nfd::fib::Entry::removeNextHop ( shared_ptr< Face face)

removes a NextHop record

If no NextHop record for face exists, do nothing.

Todo:
change parameter type to Face&

Definition at line 68 of file fib-entry.cpp.

References nfd::fib::NextHop::getCost().

Friends And Related Function Documentation

friend class nfd::NameTree
friend

Definition at line 109 of file fib-entry.hpp.

friend class nfd::name_tree::Entry
friend

Definition at line 110 of file fib-entry.hpp.


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