NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::face::LpReliability Class Reference

provides for reliable sending and receiving of link-layer packets More...

#include <lp-reliability.hpp>

Inheritance diagram for nfd::face::LpReliability:
Collaboration diagram for nfd::face::LpReliability:

Classes

struct  Options
 

Public Member Functions

 LpReliability (const Options &options, GenericLinkService *linkService)
 
void setOptions (const Options &options)
 set options for reliability More...
 
const GenericLinkServicegetLinkService () const
 
void handleOutgoing (std::vector< lp::Packet > &frags)
 observe outgoing fragment(s) of a network packet and store for potential retransmission More...
 
void processIncomingPacket (const lp::Packet &pkt)
 extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue More...
 
void piggyback (lp::Packet &pkt, ssize_t mtu)
 called by GenericLinkService to attach Acks onto an outgoing LpPacket More...
 

Static Public Attributes

static constexpr size_t RESERVED_HEADER_SPACE = 3 + 1 + sizeof(lp::Sequence)
 TxSequence TLV-TYPE (3 octets) + TxSequence TLV-LENGTH (1 octet) + sizeof(lp::Sequence) More...
 

Detailed Description

provides for reliable sending and receiving of link-layer packets

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

Definition at line 45 of file lp-reliability.hpp.

Constructor & Destructor Documentation

nfd::face::LpReliability::LpReliability ( const Options options,
GenericLinkService linkService 
)

Member Function Documentation

void nfd::face::LpReliability::setOptions ( const Options options)
const GenericLinkService * nfd::face::LpReliability::getLinkService ( ) const
Returns
GenericLinkService that owns this instance

This is only used for logging, and may be nullptr.

Definition at line 58 of file lp-reliability.cpp.

void nfd::face::LpReliability::handleOutgoing ( std::vector< lp::Packet > &  frags)

observe outgoing fragment(s) of a network packet and store for potential retransmission

Parameters
fragsfragments of network packet

Definition at line 64 of file lp-reliability.cpp.

References nfd::RttEstimator::computeRto(), nfd::face::LpReliability::Options::isEnabled, ndn::time::steady_clock::now(), and nfd::scheduler::schedule().

Referenced by nfd::face::GenericLinkService::setOptions().

void nfd::face::LpReliability::processIncomingPacket ( const lp::Packet pkt)

extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue

Parameters
pktincoming LpPacket

Definition at line 98 of file lp-reliability.cpp.

References nfd::RttEstimator::addMeasurement(), ndn::lp::Packet::get(), ndn::lp::Packet::has(), nfd::face::LpReliability::Options::isEnabled, ndn::lp::Packet::list(), and ndn::time::steady_clock::now().

Referenced by nfd::face::GenericLinkService::setOptions().

Member Data Documentation

constexpr size_t nfd::face::LpReliability::RESERVED_HEADER_SPACE = 3 + 1 + sizeof(lp::Sequence)
static

TxSequence TLV-TYPE (3 octets) + TxSequence TLV-LENGTH (1 octet) + sizeof(lp::Sequence)

Definition at line 191 of file lp-reliability.hpp.

Referenced by nfd::face::GenericLinkService::setOptions().


The documentation for this class was generated from the following files: