26 #ifndef NFD_DAEMON_FACE_LP_RELIABILITY_HPP 27 #define NFD_DAEMON_FACE_LP_RELIABILITY_HPP 31 #include <ndn-cxx/lp/packet.hpp> 32 #include <ndn-cxx/lp/sequence.hpp> 39 class GenericLinkService;
91 handleOutgoing(std::vector<lp::Packet>& frags, lp::Packet&& pkt,
bool isInterest);
109 using UnackedFrags = std::map<lp::Sequence, UnackedFrag>;
118 assignTxSequence(lp::Packet& frag);
139 std::vector<lp::Sequence>
145 std::vector<lp::Sequence>
146 onLpPacketLost(lp::Sequence txSeq);
175 UnackedFrag(lp::Packet pkt);
179 scheduler::ScopedEventId rtoTimer;
180 time::steady_clock::TimePoint sendTime;
182 size_t nGreaterSeqAcks;
183 shared_ptr<NetPkt> netPkt;
191 NetPkt(lp::Packet&& pkt,
bool isInterest);
194 std::vector<UnackedFrags::iterator> unackedFrags;
207 UnackedFrags m_unackedFrags;
214 std::queue<lp::Sequence> m_ackQueue;
215 lp::Sequence m_lastTxSeqNo;
216 scheduler::ScopedEventId m_idleAckTimer;
217 bool m_isIdleAckTimerRunning;
224 #endif // NFD_DAEMON_FACE_LP_RELIABILITY_HPP void processIncomingPacket(const lp::Packet &pkt)
extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue ...
const GenericLinkService * getLinkService() const
void piggyback(lp::Packet &pkt, ssize_t mtu)
called by GenericLinkService to attach Acks onto an outgoing LpPacket
bool isEnabled
enables link-layer reliability
implements the Mean-Deviation RTT estimator
GenericLinkService is a LinkService that implements the NDNLPv2 protocol.
size_t maxRetx
maximum number of retransmissions for an LpPacket
Table::const_iterator iterator
static constexpr size_t RESERVED_HEADER_SPACE
TxSequence TLV-TYPE (3 octets) + TxSequence TLV-LENGTH (1 octet) + sizeof(lp::Sequence) ...
size_t seqNumLossThreshold
a fragment is considered lost if this number of fragments with greater sequence numbers are acknowled...
provides for reliable sending and receiving of link-layer packets
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
LpReliability(const Options &options, GenericLinkService *linkService)
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 ...
time::nanoseconds idleAckTimerPeriod
period between sending pending Acks in an IDLE packet
void setOptions(const Options &options)
set options for reliability
signal::Signal< LpReliability, Interest > onDroppedInterest
signals on Interest dropped by reliability system for exceeding allowed number of retx ...
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE