nlsr::HelloProtocol Class Reference

#include <hello-protocol.hpp>

+ Collaboration diagram for nlsr::HelloProtocol:

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::util::signal::Signal< HelloProtocol, Statistics::PacketTypehpIncrementSignal
 
ndn::util::Signal< HelloProtocol, const ndn::Name & > onHelloDataValidated
 

Detailed Description

Definition at line 41 of file hello-protocol.hpp.

Constructor & Destructor Documentation

◆ HelloProtocol()

nlsr::HelloProtocol::HelloProtocol ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
ConfParameter confParam,
RoutingTable routingTable,
Lsdb lsdb 
)

Definition at line 34 of file hello-protocol.cpp.

Member Function Documentation

◆ expressInterest()

void nlsr::HelloProtocol::expressInterest ( const ndn::Name &  interestNamePrefix,
uint32_t  seconds 
)

Sends a Hello Interest packet.

Parameters
interestNamePrefixThe name of the router that has published the update we want. Here that should be: <router name>/NLSR/INFO
secondsThe 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 49 of file hello-protocol.cpp.

+ Here is the caller graph for this function:

◆ processInterest()

void nlsr::HelloProtocol::processInterest ( const ndn::Name &  name,
const ndn::Interest &  interest 
)

Processes a Hello Interest from a neighbor.

Parameters
name(ignored)
interestThe 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 96 of file hello-protocol.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendHelloInterest()

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.

Parameters
neighborthe name of the neighbor

Definition at line 72 of file hello-protocol.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ hpIncrementSignal

ndn::util::signal::Signal<HelloProtocol, Statistics::PacketType> nlsr::HelloProtocol::hpIncrementSignal

Definition at line 89 of file hello-protocol.hpp.

◆ onHelloDataValidated

ndn::util::Signal<HelloProtocol, const ndn::Name&> nlsr::HelloProtocol::onHelloDataValidated

Definition at line 156 of file hello-protocol.hpp.