Provides for reliable sending and receiving of link-layer packets. More...
#include <daemon/face/lp-reliability.hpp>
Classes | |
struct | Options |
Public Member Functions | |
LpReliability (const Options &options, GenericLinkService *linkService) | |
const GenericLinkService * | getLinkService () const noexcept |
Returns the GenericLinkService that owns this instance. More... | |
void | handleOutgoing (std::vector< lp::Packet > &frags, lp::Packet &&pkt, bool isInterest) |
Observe outgoing fragment(s) of a network packet and store for potential retransmission. More... | |
void | piggyback (lp::Packet &pkt, ssize_t mtu) |
Called by GenericLinkService to attach Acks onto an outgoing LpPacket. More... | |
bool | processIncomingPacket (const lp::Packet &pkt) |
Extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue. More... | |
void | setOptions (const Options &options) |
Set options for reliability. More... | |
Public Attributes | |
signal::Signal< LpReliability, Interest > | onDroppedInterest |
Called when an Interest is dropped for exceeding the allowed number of retransmissions. More... | |
Static Public Attributes | |
static constexpr size_t | RESERVED_HEADER_SPACE |
TxSequence TLV-TYPE (3 octets) + TLV-LENGTH (1 octet) + lp::Sequence (8 octets) More... | |
Provides for reliable sending and receiving of link-layer packets.
Definition at line 47 of file lp-reliability.hpp.
nfd::face::LpReliability::LpReliability | ( | const Options & | options, |
GenericLinkService * | linkService | ||
) |
Definition at line 39 of file lp-reliability.cpp.
|
inlinenoexcept |
Returns the GenericLinkService that owns this instance.
This is only used for logging, and may be nullptr.
Definition at line 94 of file lp-reliability.hpp.
void nfd::face::LpReliability::handleOutgoing | ( | std::vector< lp::Packet > & | frags, |
lp::Packet && | pkt, | ||
bool | isInterest | ||
) |
Observe outgoing fragment(s) of a network packet and store for potential retransmission.
frags | fragments of network packet |
pkt | encapsulated network packet |
isInterest | whether the network packet is an Interest |
Definition at line 62 of file lp-reliability.cpp.
void nfd::face::LpReliability::piggyback | ( | lp::Packet & | pkt, |
ssize_t | mtu | ||
) |
Called by GenericLinkService to attach Acks onto an outgoing LpPacket.
pkt | outgoing LpPacket to attach Acks to |
mtu | MTU of the transport |
Definition at line 187 of file lp-reliability.cpp.
bool nfd::face::LpReliability::processIncomingPacket | ( | const lp::Packet & | pkt | ) |
Extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue.
pkt | incoming LpPacket |
Definition at line 101 of file lp-reliability.cpp.
void nfd::face::LpReliability::setOptions | ( | const Options & | options | ) |
Set options for reliability.
Definition at line 50 of file lp-reliability.cpp.
signal::Signal<LpReliability, Interest> nfd::face::LpReliability::onDroppedInterest |
Called when an Interest is dropped for exceeding the allowed number of retransmissions.
Definition at line 80 of file lp-reliability.hpp.
|
staticconstexpr |
TxSequence TLV-TYPE (3 octets) + TLV-LENGTH (1 octet) + lp::Sequence (8 octets)
Definition at line 51 of file lp-reliability.hpp.