26 #ifndef NFD_DAEMON_FACE_LP_RELIABILITY_HPP 27 #define NFD_DAEMON_FACE_LP_RELIABILITY_HPP 32 #include <ndn-cxx/lp/packet.hpp> 33 #include <ndn-cxx/lp/sequence.hpp> 104 using UnackedFrags = std::map<lp::Sequence, UnackedFrag>;
134 std::vector<UnackedFrags::iterator>
176 size_t nGreaterSeqAcks;
177 shared_ptr<NetPkt> netPkt;
185 std::vector<UnackedFrags::iterator> unackedFrags;
186 bool didRetx =
false;
196 UnackedFrags m_unackedFrags;
203 std::queue<lp::Sequence> m_ackQueue;
206 bool m_isIdleAckTimerRunning;
213 #endif // NFD_DAEMON_FACE_LP_RELIABILITY_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
size_t maxRetx
maximum number of retransmissions for an LpPacket
void setOptions(const Options &options)
set options for reliability
GenericLinkService is a LinkService that implements the NDNLPv2 protocol.
void processIncomingPacket(const lp::Packet &pkt)
extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue ...
void piggyback(lp::Packet &pkt, ssize_t mtu)
called by GenericLinkService to attach Acks onto an outgoing LpPacket
boost::posix_time::time_duration milliseconds(long duration)
bool isEnabled
enables link-layer reliability
uint64_t Sequence
represents a sequence number
static constexpr size_t RESERVED_HEADER_SPACE
TxSequence TLV-TYPE (3 octets) + TxSequence TLV-LENGTH (1 octet) + sizeof(lp::Sequence) ...
Table::const_iterator iterator
size_t seqNumLossThreshold
a fragment is considered lost if this number of fragments with greater sequence numbers are acknowled...
Copyright (c) 2011-2015 Regents of the University of California.
void handleOutgoing(std::vector< lp::Packet > &frags)
observe outgoing fragment(s) of a network packet and store for potential retransmission ...
cancels an event automatically upon destruction
LpReliability(const Options &options, GenericLinkService *linkService)
const GenericLinkService * getLinkService() const
implements the Mean-Deviation RTT estimator
time::nanoseconds idleAckTimerPeriod
period between sending pending Acks in an IDLE packet
provides for reliable sending and receiving of link-layer packets