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;
139 time::nanoseconds baseCongestionMarkingInterval = 100_ms;
145 size_t defaultCongestionThreshold = 65536;
149 bool allowSelfLearning =
true;
167 setOptions(
const Options& options);
170 getCounters()
const override;
182 sendLpPacket(lp::Packet&& pkt);
187 doSendInterest(
const Interest& interest)
override;
192 doSendData(
const Data& data)
override;
197 doSendNack(
const ndn::lp::Nack& nack)
override;
205 encodeLpFields(
const ndn::PacketBase& netPkt, lp::Packet& lpPacket);
212 sendNetPacket(lp::Packet&& pkt,
bool isInterest);
217 assignSequence(lp::Packet& pkt);
222 assignSequences(std::vector<lp::Packet>& pkts);
229 checkCongestionLevel(lp::Packet& pkt);
245 decodeNetPacket(
const Block& netPkt,
const lp::Packet& firstPkt);
257 decodeInterest(
const Block& netPkt,
const lp::Packet& firstPkt);
269 decodeData(
const Block& netPkt,
const lp::Packet& firstPkt);
281 decodeNack(
const Block& netPkt,
const lp::Packet& firstPkt);
288 lp::Sequence m_lastSeqNo;
292 static constexpr
size_t CONGESTION_MARK_SIZE = 3 + 1 +
sizeof(uint64_t);
295 time::steady_clock::TimePoint m_nextMarkTime;
297 time::steady_clock::TimePoint m_lastMarkTime;
299 size_t m_nMarkedSinceInMarkingState;
319 #endif // NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP 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
const Options & getOptions() const
get Options used by GenericLinkService
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.
PacketCounter nInNetInvalid
count of invalid reassembled network-layer packets dropped
stores a packet along with the remote endpoint
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
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 Counters & getCounters() const override
Options that control the behavior of LpFragmenter.
PacketCounter nRetxExhausted
count of network-layer packets dropped because a fragment reached the maximum number of retransmissio...
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