#include <hello-protocol.hpp>
Public Member Functions | |
HelloProtocol (ndn::Face &face, ndn::KeyChain &keyChain, ConfParameter &confParam, RoutingTable &routingTable, Lsdb &lsdb) | |
void | expressInterest (const ndn::Name &interestNamePrefix, uint32_t seconds) |
Sends a Hello Interest packet. More... | |
void | processInterest (const ndn::Name &name, const ndn::Interest &interest) |
Processes a Hello Interest from a neighbor. More... | |
void | sendHelloInterest (const ndn::Name &neighbor) |
Sends Hello Interests to all neighbors. More... | |
Public Attributes | |
ndn::signal::Signal< HelloProtocol, Statistics::PacketType > | hpIncrementSignal |
ndn::signal::Signal< HelloProtocol, const ndn::Name & > | onInitialHelloDataValidated |
Static Public Attributes | |
static const std::string | INFO_COMPONENT {"INFO"} |
static const std::string | NLSR_COMPONENT {"nlsr"} |
Definition at line 38 of file hello-protocol.hpp.
nlsr::HelloProtocol::HelloProtocol | ( | ndn::Face & | face, |
ndn::KeyChain & | keyChain, | ||
ConfParameter & | confParam, | ||
RoutingTable & | routingTable, | ||
Lsdb & | lsdb | ||
) |
Definition at line 33 of file hello-protocol.cpp.
void nlsr::HelloProtocol::expressInterest | ( | const ndn::Name & | interestNamePrefix, |
uint32_t | seconds | ||
) |
Sends a Hello Interest packet.
interestNamePrefix | The name of the router that has published the update we want. Here that should be: <router name>/NLSR/INFO |
seconds | The lifetime of the Interest we construct, in seconds |
This function attempts to contact neighboring routers to determine their status (which currently is one of: ACTIVE, INACTIVE, or UNKNOWN)
Definition at line 66 of file hello-protocol.cpp.
void nlsr::HelloProtocol::processInterest | ( | const ndn::Name & | name, |
const ndn::Interest & | interest | ||
) |
Processes a Hello Interest from a neighbor.
name | (ignored) |
interest | The Interest object that we have received and need to process. |
Processes a Hello Interest that this router receives from one of its neighbors. If the neighbor that sent the Interest does not have a Face, NLSR will attempt to create one. Also, if the neighbor that sent the Interest was previously marked as INACTIVE, NLSR will attempt to contact it with its own Hello Interest.
Definition at line 111 of file hello-protocol.cpp.
void nlsr::HelloProtocol::sendHelloInterest | ( | const ndn::Name & | neighbor | ) |
Sends Hello Interests to all neighbors.
This function is called as part of a schedule to regularly determine the adjacency status of neighbors. This function creates and sends a Hello Interest to the given adjacent.
neighbor | the name of the neighbor |
Definition at line 88 of file hello-protocol.cpp.
ndn::signal::Signal<HelloProtocol, Statistics::PacketType> nlsr::HelloProtocol::hpIncrementSignal |
Definition at line 86 of file hello-protocol.hpp.
|
inlinestatic |
Definition at line 126 of file hello-protocol.hpp.
|
inlinestatic |
Definition at line 127 of file hello-protocol.hpp.
ndn::signal::Signal<HelloProtocol, const ndn::Name&> nlsr::HelloProtocol::onInitialHelloDataValidated |
Definition at line 129 of file hello-protocol.hpp.