Maps names to lists of next hops, and exports this information to NFD.
More...
#include <fib.hpp>
|
| Fib (ndn::Face &face, ndn::Scheduler &scheduler, AdjacencyList &adjacencyList, ConfParameter &conf, ndn::security::KeyChain &keyChain) |
|
void | clean () |
| Remove all entries from the FIB. More...
|
|
void | registerPrefix (const ndn::Name &namePrefix, const ndn::FaceUri &faceUri, uint64_t faceCost, const ndn::time::milliseconds &timeout, uint64_t flags, uint8_t times) |
| Inform NFD of a next-hop. More...
|
|
void | remove (const ndn::Name &name) |
| Completely remove a name prefix from the FIB. More...
|
|
void | setEntryRefreshTime (int32_t fert) |
|
void | setStrategy (const ndn::Name &name, const ndn::Name &strategy, uint32_t count) |
|
void | update (const ndn::Name &name, const NexthopList &allHops) |
| Set the nexthop list of a name. More...
|
|
void | writeLog () |
|
Maps names to lists of next hops, and exports this information to NFD.
The FIB (Forwarding Information Base) is the "authoritative" source of how to route Interests on this router to other nodes running NLSR. In essence, the FIB is a map that takes name prefixes to a list of next-hops out of this router. This class also contains methods to inform NFD about these relationships. The FIB has its entries populated by the NamePrefixTable
- See also
- nlsr::NamePrefixTable
-
nlsr::NamePrefixTable::addEntry
-
nlsr::NamePrefixTable::updateWithNewRoute
Definition at line 62 of file fib.hpp.
◆ Fib()
nlsr::Fib::Fib |
( |
ndn::Face & |
face, |
|
|
ndn::Scheduler & |
scheduler, |
|
|
AdjacencyList & |
adjacencyList, |
|
|
ConfParameter & |
conf, |
|
|
ndn::security::KeyChain & |
keyChain |
|
) |
| |
◆ clean()
void nlsr::Fib::clean |
( |
| ) |
|
Remove all entries from the FIB.
This method is called before terminating NLSR to minimize the time NFD spends routing on now-invalid information. This is not strictly necessary, because eventually those prefix registrations will expire, but cleaning up after ourselves improves performance.
Definition at line 155 of file fib.cpp.
◆ registerPrefix()
void nlsr::Fib::registerPrefix |
( |
const ndn::Name & |
namePrefix, |
|
|
const ndn::FaceUri & |
faceUri, |
|
|
uint64_t |
faceCost, |
|
|
const ndn::time::milliseconds & |
timeout, |
|
|
uint64_t |
flags, |
|
|
uint8_t |
times |
|
) |
| |
Inform NFD of a next-hop.
This method informs NFD of a next-hop for some name prefix. This method actually submits the information to NFD's RIB, which then aggregates its own best hops and updates NFD's (the actual) FIB. Typically, NLSR's FIB and NFD's FIB will be almost the same. However, this is not necessarily the case and there may be cases when other sources of information provide better next-hops to NFD that NLSR doesn't know about. For example, an operator could set up a direct link to a node that isn't running NLSR.
- Parameters
-
namePrefix | The name prefix to register a next-hop for |
faceUri | The faceUri of the adjacent that this prefix can be reached through |
faceCost | The cost to reach namePrefix through faceUri |
timeout | How long this registration should last |
flags | Route inheritance flags (CAPTURE, CHILD_INHERIT) |
times | How many times we have failed to register this prefix since the last success. |
- See also
- Fib::registerPrefixInNfd
Definition at line 182 of file fib.cpp.
◆ remove()
void nlsr::Fib::remove |
( |
const ndn::Name & |
name | ) |
|
Completely remove a name prefix from the FIB.
If a name prefix is found to no longer be reachable from this router, it will be removed from the FIB and all of its next-hops will be unregistered from NFD.
- See also
- nlsr::NamePrefixTable::removeEntry
Definition at line 46 of file fib.cpp.
◆ setEntryRefreshTime()
void nlsr::Fib::setEntryRefreshTime |
( |
int32_t |
fert | ) |
|
|
inline |
◆ setStrategy()
void nlsr::Fib::setStrategy |
( |
const ndn::Name & |
name, |
|
|
const ndn::Name & |
strategy, |
|
|
uint32_t |
count |
|
) |
| |
◆ update()
void nlsr::Fib::update |
( |
const ndn::Name & |
name, |
|
|
const NexthopList & |
allHops |
|
) |
| |
Set the nexthop list of a name.
This method is the entry for others to add next-hop information to the FIB. Formally put, this method registers in NFD all next-hops in allHops, and unregisters the set difference of newHops - oldHops. This method also schedules the regular refresh of those next hops.
- Parameters
-
name | The name prefix that the next-hops apply to |
allHops | A complete list of next-hops to associate with name. |
Definition at line 84 of file fib.cpp.
◆ writeLog()
void nlsr::Fib::writeLog |
( |
| ) |
|
◆ BEST_ROUTE_STRATEGY
const ndn::Name nlsr::Fib::BEST_ROUTE_STRATEGY {"/localhost/nfd/strategy/best-route"} |
|
inlinestatic |
◆ MULTICAST_STRATEGY
const ndn::Name nlsr::Fib::MULTICAST_STRATEGY {"/localhost/nfd/strategy/multicast"} |
|
inlinestatic |
◆ onPrefixRegistrationSuccess
ndn::signal::Signal<Fib, ndn::Name> nlsr::Fib::onPrefixRegistrationSuccess |