26 #ifndef NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP 27 #define NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP 109 bool allowLocalFields =
false;
113 bool allowFragmentation =
false;
121 bool allowReassembly =
false;
133 bool allowCongestionMarking =
false;
141 time::nanoseconds baseCongestionMarkingInterval = 100_ms;
149 size_t defaultCongestionThreshold = 65536;
153 bool allowSelfLearning =
true;
171 setOptions(
const Options& options);
180 requestIdlePacket(
const EndpointId& endpointId);
185 sendLpPacket(lp::Packet&& pkt,
const EndpointId& endpointId);
208 encodeLpFields(
const ndn::PacketBase& netPkt, lp::Packet& lpPacket);
216 sendNetPacket(lp::Packet&& pkt,
const EndpointId& endpointId,
bool isInterest);
221 assignSequence(lp::Packet& pkt);
226 assignSequences(std::vector<lp::Packet>& pkts);
233 checkCongestionLevel(lp::Packet& pkt);
250 decodeNetPacket(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
263 decodeInterest(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
276 decodeData(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
289 decodeNack(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
296 lp::Sequence m_lastSeqNo;
300 time::steady_clock::TimePoint m_nextMarkTime;
302 size_t m_nMarkedSinceInMarkingState;
322 #endif // NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP const Counters & getCounters() const final
constexpr Options() noexcept
counters provided by GenericLinkService
provides a counter that observes the size of a table
SizeCounter< LpReassembler > nReassembling
count of network-layer packets currently being reassembled
PacketCounter nInLpInvalid
count of invalid LpPackets dropped before reassembly
PacketCounter nFragmentationErrors
count of failed fragmentations
PacketCounter nAcknowledged
count of network-layer packets that did not require retransmission of a fragment
GenericLinkService is a LinkService that implements the NDNLPv2 protocol.
uint64_t EndpointId
Identifies a remote endpoint on the link.
PacketCounter nInNetInvalid
count of invalid reassembled network-layer packets dropped
LpReassembler::Options reassemblerOptions
options for reassembly
represents a counter of number of packets
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
provides for reliable sending and receiving of link-layer packets
PacketCounter nCongestionMarked
count of outgoing LpPackets that were marked with congestion marks
#define OVERRIDE_WITH_TESTS_ELSE_FINAL
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Options that control the behavior of LpReassembler.
fragments network-layer packets into NDNLPv2 link-layer packets
counters provided by LinkService
reassembles fragmented network-layer packets
PacketCounter nOutOverMtu
count of outgoing LpPackets dropped due to exceeding MTU limit
LpReliability::Options reliabilityOptions
options for reliability
Options that control the behavior of GenericLinkService.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
const Options & getOptions() const
get Options used by GenericLinkService
Options that control the behavior of LpFragmenter.
PacketCounter nRetxExhausted
count of network-layer packets dropped because a fragment reached the maximum number of retransmissio...
#define FINAL_UNLESS_WITH_TESTS
PacketCounter nRetransmitted
count of network-layer packets that had at least one fragment retransmitted, but were eventually rece...
PacketCounter nReassemblyTimeouts
count of dropped partial network-layer packets due to reassembly timeout
LpFragmenter::Options fragmenterOptions
options for fragmentation