88 std::array<FibNexthop, FIB_MAX_NEXTHOPS> nexthops_{};
89 uint8_t numNexthops_ = 0;
199 size_t size()
const {
return size_; }
209 std::array<FibEntry, FIB_MAX_ENTRIES> entries_{};
const FibNexthop & nexthop(size_t index) const
Get the next-hop at a given index.
size_t nexthopCount() const
Get the number of next-hops.
bool removeNexthop(FaceId faceId)
Remove a next-hop.
bool addNexthop(FaceId faceId, uint8_t cost=0)
Add a next-hop.
const Name & prefix() const
Get the Name prefix.
Forwarding Information Base.
const FibEntry * findLongestMatch(const Name &name) const
Look up using Longest Prefix Match.
void removeRoute(const Name &prefix, FaceId faceId)
Remove a specific next-hop.
size_t size() const
Get the current number of entries.
const FibEntry * findExact(const Name &prefix) const
Look up using exact match.
void removeFace(FaceId faceId)
Remove a specified Face from all entries.
Error addRoute(const Name &prefix, FaceId faceId, uint8_t cost=0)
Add a route.
size_t capacity() const
Get the maximum number of entries.
Common definitions for the NDN protocol stack.
constexpr FaceId FACE_ID_INVALID
Invalid Face ID.
uint16_t FaceId
Face identifier.
constexpr size_t FIB_MAX_NEXTHOPS
Maximum number of next-hops per FIB entry.
constexpr size_t FIB_MAX_ENTRIES
Maximum number of FIB entries.
FaceId faceId
Next-hop Face ID.
uint8_t cost
Cost (lower is preferred)