nfd::face::GenericLinkService Class Referencefinal

GenericLinkService is a LinkService that implements the NDNLPv2 protocol. More...

#include <daemon/face/generic-link-service.hpp>

+ Inheritance diagram for nfd::face::GenericLinkService:
+ Collaboration diagram for nfd::face::GenericLinkService:

Public Types

using Counters = GenericLinkServiceCounters
 Counters provided by GenericLinkService. More...
 
using Options = GenericLinkServiceOptions
 Options for GenericLinkService. More...
 

Public Member Functions

 GenericLinkService (const Options &options={})
 
bool canOverrideMtuTo (ssize_t mtu) const
 Whether MTU can be overridden to the specified value. More...
 
const CountersgetCounters () const final
 
ssize_t getEffectiveMtu () const final
 
const FacegetFace () const noexcept
 Returns the Face to which this LinkService is attached. More...
 
const OptionsgetOptions () const
 Get the options used by GenericLinkService. More...
 
const TransportgetTransport () const noexcept
 Returns the Transport to which this LinkService is attached. More...
 
TransportgetTransport () noexcept
 Returns the Transport to which this LinkService is attached. More...
 
void receivePacket (const Block &packet, const EndpointId &endpoint)
 Performs LinkService-specific operations to receive a lower-layer packet. More...
 
void sendData (const Data &data)
 Send Data. More...
 
void sendInterest (const Interest &interest)
 Send Interest. More...
 
void sendNack (const ndn::lp::Nack &nack)
 Send Nack. More...
 
void setFaceAndTransport (Face &face, Transport &transport) noexcept
 Set Face and Transport for this LinkService. More...
 
void setOptions (const Options &options)
 Sets the options used by GenericLinkService. More...
 

Public Attributes

signal::Signal< LinkService, Data, EndpointIdafterReceiveData
 Called when a Data packet is received. More...
 
signal::Signal< LinkService, Interest, EndpointIdafterReceiveInterest
 Called when an Interest packet is received. More...
 
signal::Signal< LinkService, lp::Nack, EndpointIdafterReceiveNack
 Called when a Nack packet is received. More...
 
signal::Signal< LinkService, Interest > onDroppedInterest
 Called when an Interest is dropped by the reliability system for exceeding the allowed number of retransmissions. More...
 

Protected Member Functions

void notifyDroppedInterest (const Interest &packet)
 
void receiveData (const Data &data, const EndpointId &endpoint)
 Delivers received Data to forwarding. More...
 
void receiveInterest (const Interest &interest, const EndpointId &endpoint)
 Delivers received Interest to forwarding. More...
 
void receiveNack (const lp::Nack &nack, const EndpointId &endpoint)
 Delivers received Nack to forwarding. More...
 
void sendPacket (const Block &packet)
 Send a lower-layer packet via Transport. More...
 

Protected Attributes

PacketCounter nAcknowledged
 Count of network-layer packets that did not require retransmission of a fragment. More...
 
PacketCounter nCongestionMarked
 Count of outgoing LpPackets that were marked with congestion marks. More...
 
PacketCounter nDuplicateSequence
 Count of LpPackets dropped due to duplicate Sequence numbers. More...
 
PacketCounter nFragmentationErrors
 Count of failed fragmentations. More...
 
PacketCounter nInData
 Count of incoming Data packets. More...
 
PacketCounter nInInterests
 Count of incoming Interest packets. More...
 
PacketCounter nInLpInvalid
 Count of invalid LpPackets dropped before reassembly. More...
 
PacketCounter nInNacks
 Count of incoming Nack packets. More...
 
PacketCounter nInNetInvalid
 Count of invalid reassembled network-layer packets dropped. More...
 
PacketCounter nInterestsExceededRetx
 Count of Interests dropped by reliability system for exceeding allowed number of retx. More...
 
PacketCounter nOutData
 Count of outgoing Data packets. More...
 
PacketCounter nOutInterests
 Count of outgoing Interest packets. More...
 
PacketCounter nOutNacks
 Count of outgoing Nack packets. More...
 
PacketCounter nOutOverMtu
 Count of outgoing LpPackets dropped due to exceeding MTU limit. More...
 
SizeCounter< LpReassemblernReassembling
 Count of network-layer packets currently being reassembled. More...
 
PacketCounter nReassemblyTimeouts
 Count of dropped partial network-layer packets due to reassembly timeout. More...
 
PacketCounter nRetransmitted
 Count of network-layer packets that had at least one fragment retransmitted, but were eventually received in full. More...
 
PacketCounter nRetxExhausted
 Count of network-layer packets dropped because a fragment reached the maximum number of retransmissions. More...
 

Detailed Description

GenericLinkService is a LinkService that implements the NDNLPv2 protocol.

See also
https://redmine.named-data.net/projects/nfd/wiki/NDNLPv2

Definition at line 160 of file generic-link-service.hpp.

Member Typedef Documentation

◆ Counters

◆ Options

Constructor & Destructor Documentation

◆ GenericLinkService()

nfd::face::GenericLinkService::GenericLinkService ( const Options options = {})
explicit

Definition at line 42 of file generic-link-service.cpp.

Member Function Documentation

◆ canOverrideMtuTo()

bool nfd::face::GenericLinkService::canOverrideMtuTo ( ssize_t  mtu) const

Whether MTU can be overridden to the specified value.

If the transport MTU is unlimited, then this will always return false.

Definition at line 70 of file generic-link-service.cpp.

◆ getCounters()

const Counters& nfd::face::GenericLinkService::getCounters ( ) const
inlinefinalvirtual

Reimplemented from nfd::face::LinkService.

Definition at line 193 of file generic-link-service.hpp.

◆ getEffectiveMtu()

ssize_t nfd::face::GenericLinkService::getEffectiveMtu ( ) const
finalvirtual

Reimplemented from nfd::face::LinkService.

Definition at line 63 of file generic-link-service.cpp.

◆ getFace()

const Face* nfd::face::LinkService::getFace ( ) const
inlinenoexceptinherited

Returns the Face to which this LinkService is attached.

Definition at line 86 of file link-service.hpp.

◆ getOptions()

const Options& nfd::face::GenericLinkService::getOptions ( ) const
inline

Get the options used by GenericLinkService.

Definition at line 181 of file generic-link-service.hpp.

◆ getTransport() [1/2]

const Transport* nfd::face::LinkService::getTransport ( ) const
inlinenoexceptinherited

Returns the Transport to which this LinkService is attached.

Definition at line 95 of file link-service.hpp.

◆ getTransport() [2/2]

Transport* nfd::face::LinkService::getTransport ( )
inlinenoexceptinherited

Returns the Transport to which this LinkService is attached.

Definition at line 104 of file link-service.hpp.

◆ notifyDroppedInterest()

void nfd::face::LinkService::notifyDroppedInterest ( const Interest &  packet)
protectedinherited

Definition at line 109 of file link-service.cpp.

◆ receiveData()

void nfd::face::LinkService::receiveData ( const Data &  data,
const EndpointId endpoint 
)
protectedinherited

Delivers received Data to forwarding.

Definition at line 89 of file link-service.cpp.

◆ receiveInterest()

void nfd::face::LinkService::receiveInterest ( const Interest &  interest,
const EndpointId endpoint 
)
protectedinherited

Delivers received Interest to forwarding.

Definition at line 79 of file link-service.cpp.

◆ receiveNack()

void nfd::face::LinkService::receiveNack ( const lp::Nack &  nack,
const EndpointId endpoint 
)
protectedinherited

Delivers received Nack to forwarding.

Definition at line 99 of file link-service.cpp.

◆ receivePacket()

void nfd::face::LinkService::receivePacket ( const Block &  packet,
const EndpointId endpoint 
)
inlineinherited

Performs LinkService-specific operations to receive a lower-layer packet.

Definition at line 169 of file link-service.hpp.

◆ sendData()

void nfd::face::LinkService::sendData ( const Data &  data)
inherited

Send Data.

Precondition
setFaceAndTransport() has been called.

Definition at line 57 of file link-service.cpp.

◆ sendInterest()

void nfd::face::LinkService::sendInterest ( const Interest &  interest)
inherited

Send Interest.

Precondition
setFaceAndTransport() has been called.

Definition at line 46 of file link-service.cpp.

◆ sendNack()

void nfd::face::LinkService::sendNack ( const ndn::lp::Nack &  nack)
inherited

Send Nack.

Precondition
setFaceAndTransport() has been called.

Definition at line 68 of file link-service.cpp.

◆ sendPacket()

void nfd::face::LinkService::sendPacket ( const Block &  packet)
inlineprotectedinherited

Send a lower-layer packet via Transport.

Definition at line 198 of file link-service.hpp.

◆ setFaceAndTransport()

void nfd::face::LinkService::setFaceAndTransport ( Face face,
Transport transport 
)
noexceptinherited

Set Face and Transport for this LinkService.

Precondition
setFaceAndTransport() has not been called.

Definition at line 36 of file link-service.cpp.

◆ setOptions()

void nfd::face::GenericLinkService::setOptions ( const Options options)

Sets the options used by GenericLinkService.

Definition at line 54 of file generic-link-service.cpp.

Member Data Documentation

◆ afterReceiveData

signal::Signal<LinkService, Data, EndpointId> nfd::face::LinkService::afterReceiveData
inherited

Called when a Data packet is received.

Definition at line 151 of file link-service.hpp.

◆ afterReceiveInterest

signal::Signal<LinkService, Interest, EndpointId> nfd::face::LinkService::afterReceiveInterest
inherited

Called when an Interest packet is received.

Definition at line 146 of file link-service.hpp.

◆ afterReceiveNack

signal::Signal<LinkService, lp::Nack, EndpointId> nfd::face::LinkService::afterReceiveNack
inherited

Called when a Nack packet is received.

Definition at line 156 of file link-service.hpp.

◆ nAcknowledged

PacketCounter nfd::face::GenericLinkServiceCounters::nAcknowledged
inherited

Count of network-layer packets that did not require retransmission of a fragment.

Definition at line 69 of file generic-link-service.hpp.

◆ nCongestionMarked

PacketCounter nfd::face::GenericLinkServiceCounters::nCongestionMarked
inherited

Count of outgoing LpPackets that were marked with congestion marks.

Definition at line 87 of file generic-link-service.hpp.

◆ nDuplicateSequence

PacketCounter nfd::face::GenericLinkServiceCounters::nDuplicateSequence
inherited

Count of LpPackets dropped due to duplicate Sequence numbers.

Definition at line 84 of file generic-link-service.hpp.

◆ nFragmentationErrors

PacketCounter nfd::face::GenericLinkServiceCounters::nFragmentationErrors
inherited

Count of failed fragmentations.

Definition at line 47 of file generic-link-service.hpp.

◆ nInData

PacketCounter nfd::face::LinkServiceCounters::nInData
inherited

Count of incoming Data packets.

Definition at line 50 of file link-service.hpp.

◆ nInInterests

PacketCounter nfd::face::LinkServiceCounters::nInInterests
inherited

Count of incoming Interest packets.

Definition at line 44 of file link-service.hpp.

◆ nInLpInvalid

PacketCounter nfd::face::GenericLinkServiceCounters::nInLpInvalid
inherited

Count of invalid LpPackets dropped before reassembly.

Definition at line 57 of file generic-link-service.hpp.

◆ nInNacks

PacketCounter nfd::face::LinkServiceCounters::nInNacks
inherited

Count of incoming Nack packets.

Definition at line 54 of file link-service.hpp.

◆ nInNetInvalid

PacketCounter nfd::face::GenericLinkServiceCounters::nInNetInvalid
inherited

Count of invalid reassembled network-layer packets dropped.

Definition at line 66 of file generic-link-service.hpp.

◆ nInterestsExceededRetx

PacketCounter nfd::face::LinkServiceCounters::nInterestsExceededRetx
inherited

Count of Interests dropped by reliability system for exceeding allowed number of retx.

Definition at line 48 of file link-service.hpp.

◆ nOutData

PacketCounter nfd::face::LinkServiceCounters::nOutData
inherited

Count of outgoing Data packets.

Definition at line 52 of file link-service.hpp.

◆ nOutInterests

PacketCounter nfd::face::LinkServiceCounters::nOutInterests
inherited

Count of outgoing Interest packets.

Definition at line 46 of file link-service.hpp.

◆ nOutNacks

PacketCounter nfd::face::LinkServiceCounters::nOutNacks
inherited

Count of outgoing Nack packets.

Definition at line 56 of file link-service.hpp.

◆ nOutOverMtu

PacketCounter nfd::face::GenericLinkServiceCounters::nOutOverMtu
inherited

Count of outgoing LpPackets dropped due to exceeding MTU limit.

If this counter is non-zero, the operator should enable fragmentation.

Definition at line 54 of file generic-link-service.hpp.

◆ nReassembling

SizeCounter<LpReassembler> nfd::face::GenericLinkServiceCounters::nReassembling
inherited

Count of network-layer packets currently being reassembled.

Definition at line 60 of file generic-link-service.hpp.

◆ nReassemblyTimeouts

PacketCounter nfd::face::GenericLinkServiceCounters::nReassemblyTimeouts
inherited

Count of dropped partial network-layer packets due to reassembly timeout.

Definition at line 63 of file generic-link-service.hpp.

◆ nRetransmitted

PacketCounter nfd::face::GenericLinkServiceCounters::nRetransmitted
inherited

Count of network-layer packets that had at least one fragment retransmitted, but were eventually received in full.

Definition at line 75 of file generic-link-service.hpp.

◆ nRetxExhausted

PacketCounter nfd::face::GenericLinkServiceCounters::nRetxExhausted
inherited

Count of network-layer packets dropped because a fragment reached the maximum number of retransmissions.

Definition at line 81 of file generic-link-service.hpp.

◆ onDroppedInterest

signal::Signal<LinkService, Interest> nfd::face::LinkService::onDroppedInterest
inherited

Called when an Interest is dropped by the reliability system for exceeding the allowed number of retransmissions.

Definition at line 162 of file link-service.hpp.