nlsr::HelloProtocol Class Reference

#include <hello-protocol.hpp>

Collaboration diagram for nlsr::HelloProtocol:
[legend]

Public Member Functions

 HelloProtocol (ndn::Face &face, ndn::KeyChain &keyChain, ndn::security::SigningInfo &signingInfo, ConfParameter &confParam, RoutingTable &routingTable, Lsdb &lsdb)
 
void expressInterest (const ndn::Name &interestNamePrefix, uint32_t seconds)
 Sends a Hello Interest packet. More...
 
void sendHelloInterest (const ndn::Name &neighbor)
 Sends Hello Interests to all neighbors. More...
 
void processInterest (const ndn::Name &name, const ndn::Interest &interest)
 Processes a Hello Interest from a neighbor. More...
 

Data Fields

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

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

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

Member Function Documentation

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 50 of file hello-protocol.cpp.

Here is the caller graph for this function:

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 97 of file hello-protocol.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 73 of file hello-protocol.cpp.

Here is the call graph for this function:

Field Documentation

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

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

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

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