provides automatic prefix propagation feature More...
#include <rib/auto-prefix-propagator.hpp>
Classes | |
class | Error |
Public Member Functions | |
AutoPrefixPropagator (ndn::nfd::Controller &controller, ndn::KeyChain &keyChain, Rib &rib) | |
void | disable () |
disable automatic prefix propagation More... | |
void | enable () |
enable automatic prefix propagation More... | |
void | loadConfig (const ConfigSection &configSection) |
load the "auto_prefix_propagate" section from config file More... | |
provides automatic prefix propagation feature
The AutoPrefixPropagator monitors changes to local RIB, and registers prefixes onto a connected gateway router (HUB), so that Interests under propagated prefixes will be forwarded toward the local host by the HUB.
The route origin of propagated prefix is CLIENT, as shown on the HUB.
Connectivity to a HUB is indicated with a special RIB entry "ndn:/localhop/nfd". Currently, the AutoPrefixPropagator can process the connection to at most one HUB.
For every RIB entry except "ndn:/localhop/nfd" and those starting with "ndn:/localhost", the AutoPrefixPropagator queries the local KeyChain for signing identities that is authorized to sign a prefix registration command of a prefix of the RIB prefix.
If one or more signing identities are found, the identity that can sign a prefix registration command of the shortest prefix is chosen, and the AutoPrefixPropagator will attempt to propagte a prefix to the HUB using the shortest prefix. It's noteworthy that no route flags will be inherited from the local registration. If no signing identity is available, no prefix of the RIB entry is propagated to the HUB.
When a RIB entry is erased, the corresponding propagated entry would be revoked, unless another local RIB entry is causing the propagation of that prefix.
After a successful propagation, the AutoPrefixPropagator will refresh the propagation periodically by resending the registration command.
In case of a failure or timeout in a registration command, the command will be retried with an exponential back-off strategy.
The AutoPrefixPropagator can be configured in NFD configuration file, at the rib.auto_prefix_propagate section.
Definition at line 76 of file auto-prefix-propagator.hpp.
nfd::rib::AutoPrefixPropagator::AutoPrefixPropagator | ( | ndn::nfd::Controller & | controller, |
ndn::KeyChain & | keyChain, | ||
Rib & | rib | ||
) |
Definition at line 53 of file auto-prefix-propagator.cpp.
void nfd::rib::AutoPrefixPropagator::disable | ( | ) |
disable automatic prefix propagation
Definition at line 118 of file auto-prefix-propagator.cpp.
void nfd::rib::AutoPrefixPropagator::enable | ( | ) |
enable automatic prefix propagation
Definition at line 109 of file auto-prefix-propagator.cpp.
void nfd::rib::AutoPrefixPropagator::loadConfig | ( | const ConfigSection & | configSection | ) |
load the "auto_prefix_propagate" section from config file
configSection | the sub section in "rib" section. |
Definition at line 67 of file auto-prefix-propagator.cpp.