Structure for FIB table entry, holding indexed list of available faces and their respective metrics. More...
#include <ndn-fib-entry.h>
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 Name & | GetPrefix () const |
Get prefix for the FIB entry. | |
const FaceMetric & | FindBestCandidate (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< Fib > | GetFib () |
Get pointer to access FIB, to which this entry is added. | |
Public Attributes | |
Ptr< Fib > | m_fib |
FIB to which entry is added. | |
Ptr< const Name > | m_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) |
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.
prefix | smart pointer to the prefix for the FIB entry |
Definition at line 273 of file ndn-fib-entry.h.
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.
status | Status 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().