26 #ifndef NFD_DAEMON_FACE_LP_RELIABILITY_HPP 27 #define NFD_DAEMON_FACE_LP_RELIABILITY_HPP 136 std::vector<lp::Sequence>
142 std::vector<lp::Sequence>
222 operator<<(std::ostream& os, const FaceLogHelper<LpReliability>& flh);
227 #endif // NFD_DAEMON_FACE_LP_RELIABILITY_HPP size_t maxRetx
maximum number of retransmissions for an LpPacket
ndn::util::RttEstimator m_rttEst
void setOptions(const Options &options)
set options for reliability
void piggyback(lp::Packet &pkt, ssize_t mtu)
called by GenericLinkService to attach Acks onto an outgoing LpPacket
contains a network-layer packet with unacknowledged fragments
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 ...
std::vector< lp::Sequence > onLpPacketLost(lp::Sequence txSeq, bool isTimeout)
resend (or give up on) a lost fragment
UnackedFrags m_unackedFrags
std::vector< UnackedFrags::iterator > unackedFrags
void startIdleAckTimer()
start the idle Ack timer
lp::Sequence m_lastTxSeqNo
std::vector< lp::Sequence > findLostLpPackets(UnackedFrags::iterator ackIt)
find and mark as lost fragments where a configurable number of Acks (m_options.seqNumLossThreshold) h...
provides a lightweight signal / event system
UnackedFrags::iterator m_firstUnackedFrag
An iterator that points to the first unacknowledged fragment in the current window.
bool isEnabled
enables link-layer reliability
uint64_t Sequence
represents a sequence number
std::queue< lp::Sequence > m_ackQueue
static constexpr size_t RESERVED_HEADER_SPACE
TxSequence TLV-TYPE (3 octets) + TLV-LENGTH (1 octet) + lp::Sequence (8 octets)
std::map< lp::Sequence, time::steady_clock::TimePoint > m_recentRecvSeqs
scheduler::ScopedEventId m_idleAckTimer
size_t seqNumLossThreshold
a fragment is considered lost if this number of fragments with greater sequence numbers are acknowled...
constexpr size_t sizeOfVarNumber(uint64_t number) noexcept
Get the number of bytes necessary to hold the value of number encoded as VAR-NUMBER.
Copyright (c) 2011-2015 Regents of the University of California.
#define NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE
const GenericLinkService * getLinkService() const
shared_ptr< NetPkt > netPkt
LpReliability(const Options &options, GenericLinkService *linkService)
void deleteUnackedFrag(UnackedFrags::iterator fragIt)
delete a fragment from UnackedFrags and advance acknowledge window if necessary
scheduler::ScopedEventId rtoTimer
time::steady_clock::TimePoint sendTime
bool processIncomingPacket(const lp::Packet &pkt)
extract and parse all Acks and add Ack for contained Fragment (if any) to AckQueue ...
signal::Signal< LpReliability, Interest > onDroppedInterest
signals on Interest dropped by reliability system for exceeding allowed number of retx ...
GenericLinkService * m_linkService
std::queue< lp::Sequence > m_recentRecvSeqsQueue
time::nanoseconds idleAckTimerPeriod
period between sending pending Acks in an IDLE packet
void onLpPacketAcknowledged(UnackedFrags::iterator fragIt)
remove the fragment with the given sequence number from the map of unacknowledged fragments...
std::map< lp::Sequence, UnackedFrag > UnackedFrags
boost::chrono::nanoseconds nanoseconds
provides for reliable sending and receiving of link-layer packets
size_t nGreaterSeqAcks
number of Acks received for sequences greater than this fragment