33 , m_nameTreeEntry(nullptr)
38 Entry::findNextHop(
const Face& face, uint64_t endpointId)
40 return std::find_if(m_nextHops.begin(), m_nextHops.end(),
41 [&face, endpointId] (
const NextHop& nexthop) {
42 return &nexthop.getFace() == &face && nexthop.getEndpointId() == endpointId;
49 return const_cast<Entry*>(
this)->findNextHop(face, endpointId) != m_nextHops.end();
55 auto it = this->findNextHop(face, endpointId);
56 if (it == m_nextHops.end()) {
57 m_nextHops.emplace_back(face, endpointId);
58 it = std::prev(m_nextHops.end());
67 auto it = this->findNextHop(face, endpointId);
68 if (it != m_nextHops.end()) {
76 auto it = std::remove_if(m_nextHops.begin(), m_nextHops.end(),
77 [&face] (
const NextHop& nexthop) {
78 return &nexthop.getFace() == &face;
80 m_nextHops.erase(it, m_nextHops.end());
86 std::sort(m_nextHops.begin(), m_nextHops.end(),
generalization of a network interface
bool hasNextHop(const Face &face, uint64_t endpointId) const
Entry(const Name &prefix)
Table::const_iterator iterator
Copyright (c) 2011-2015 Regents of the University of California.
void removeNextHop(const Face &face, uint64_t endpointId)
removes the NextHop record for face with the given endpointId
Represents an absolute name.
void addOrUpdateNextHop(Face &face, uint64_t endpointId, uint64_t cost)
adds a NextHop record
void removeNextHopByFace(const Face &face)
removes all NextHop records on face for any endpointId
represents a nexthop record in FIB entry