NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::fib::Entry Class Reference

Structure for FIB table entry, holding indexed list of available faces and their respective metrics. More...

#include <ndn-fib-entry.h>

Inheritance diagram for ns3::ndn::fib::Entry:
Collaboration diagram for ns3::ndn::fib::Entry:

Classes

class  NoFaces
 Exception class for the case when FIB entry is not found. More...
 

Public Types

typedef Entry base_type
 

Public Member Functions

 Entry (Ptr< Fib > fib, const Ptr< const Name > &prefix)
 Constructor. More...
 
void UpdateStatus (Ptr< Face > face, FaceMetric::Status status)
 Update status of FIB next hop. More...
 
void AddOrUpdateRoutingMetric (Ptr< Face > face, int32_t metric)
 Add or update routing metric of FIB next hop. More...
 
void SetRealDelayToProducer (Ptr< Face > face, Time delay)
 Set real delay to the producer.
 
void Invalidate ()
 Invalidate face. More...
 
void UpdateFaceRtt (Ptr< Face > face, const Time &sample)
 Update RTT averages for the face.
 
const NameGetPrefix () const
 Get prefix for the FIB entry.
 
const FaceMetricFindBestCandidate (uint32_t skip=0) const
 Find "best route" candidate, skipping `skip' first candidates (modulo # of faces) More...
 
void RemoveFace (const Ptr< Face > &face)
 Remove record associated with face
 
Ptr< FibGetFib ()
 Get pointer to access FIB, to which this entry is added.
 

Public Attributes

Ptr< Fibm_fib
 FIB to which entry is added.
 
Ptr< const Namem_prefix
 Prefix of the FIB entry.
 
FaceMetricContainer::type m_faces
 Indexed list of faces.
 
bool m_needsProbing
 flag indicating that probing should be performed
 

Friends

std::ostream & operator<< (std::ostream &os, const Entry &entry)
 

Detailed Description

Structure for FIB table entry, holding indexed list of available faces and their respective metrics.

Definition at line 261 of file ndn-fib-entry.h.

Constructor & Destructor Documentation

ns3::ndn::fib::Entry::Entry ( Ptr< Fib fib,
const Ptr< const Name > &  prefix 
)
inline

Constructor.

Parameters
prefixsmart pointer to the prefix for the FIB entry

Definition at line 273 of file ndn-fib-entry.h.

Member Function Documentation

void ns3::ndn::fib::Entry::AddOrUpdateRoutingMetric ( Ptr< Face face,
int32_t  metric 
)

Add or update routing metric of FIB next hop.

Initial status of the next hop is set to YELLOW

Definition at line 112 of file ndn-fib-entry.cc.

References m_faces, ns3::ndn::fib::FaceMetric::SetRoutingCost(), and ns3::ndn::fib::FaceMetric::SetStatus().

Referenced by ns3::ndn::fib::FibImpl::Add().

const FaceMetric & ns3::ndn::fib::Entry::FindBestCandidate ( uint32_t  skip = 0) const

Find "best route" candidate, skipping `skip' first candidates (modulo # of faces)

throws Entry::NoFaces if m_faces.size()==0

Definition at line 170 of file ndn-fib-entry.cc.

References m_faces.

void ns3::ndn::fib::Entry::Invalidate ( )

Invalidate face.

Set routing metric on all faces to max and status to RED

Definition at line 155 of file ndn-fib-entry.cc.

References m_faces, ns3::ndn::fib::FaceMetric::SetRoutingCost(), and ns3::ndn::fib::FaceMetric::SetStatus().

Referenced by ns3::ndn::fib::FibImpl::InvalidateAll().

void ns3::ndn::fib::Entry::UpdateStatus ( Ptr< Face face,
FaceMetric::Status  status 
)

Update status of FIB next hop.

Parameters
statusStatus to set on the FIB entry

Definition at line 94 of file ndn-fib-entry.cc.

References m_faces, and ns3::ndn::fib::FaceMetric::SetStatus().


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