nlsr::HelloProtocol Class Reference

#include <hello-protocol.hpp>

Collaboration diagram for nlsr::HelloProtocol:
[legend]

Public Member Functions

 HelloProtocol (Nlsr &nlsr, ndn::Scheduler &scheduler)
 
void scheduleInterest (uint32_t seconds)
 Schedules a Hello Interest event. More...
 
void expressInterest (const ndn::Name &interestNamePrefix, uint32_t seconds)
 Sends a Hello Interest packet. More...
 
void sendScheduledInterest (uint32_t seconds)
 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
 

Detailed Description

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

Constructor & Destructor Documentation

nlsr::HelloProtocol::HelloProtocol ( Nlsr nlsr,
ndn::Scheduler &  scheduler 
)

Definition at line 35 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 42 of file hello-protocol.cpp.

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::HelloProtocol::scheduleInterest ( uint32_t  seconds)

Schedules a Hello Interest event.

This function serves as the Hello Interest loop, and must be explicitly called to start the Hello cycle. This is done at NLSR's initialization.

See also
Nlsr::initialize
Parameters
secondsThe number of seconds to wait before calling the event.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::HelloProtocol::sendScheduledInterest ( uint32_t  seconds)

Sends Hello Interests to all neighbors.

Parameters
seconds(ignored)

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 each neighbor in Nlsr::m_adjacencyList. If the neighbor has not been contacted before and curerntly has no Face in NFD, this method will call a different pipeline that creates the Face first, then registers prefixes.

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

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

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

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