26 #ifndef NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP 27 #define NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP 112 bool allowLocalFields =
false;
116 bool allowFragmentation =
false;
124 bool allowReassembly =
false;
136 bool allowCongestionMarking =
false;
144 time::nanoseconds baseCongestionMarkingInterval = 100_ms;
152 size_t defaultCongestionThreshold = 65536;
156 bool allowSelfLearning =
true;
166 ssize_t overrideMtu = std::numeric_limits<ssize_t>::max();
184 setOptions(
const Options& options);
197 canOverrideMtuTo(ssize_t mtu)
const;
208 sendLpPacket(lp::Packet&& pkt);
222 assignSequences(std::vector<lp::Packet>& pkts);
230 encodeLpFields(
const ndn::PacketBase& netPkt, lp::Packet& lpPacket);
237 sendNetPacket(lp::Packet&& pkt,
bool isInterest);
244 checkCongestionLevel(lp::Packet& pkt);
259 decodeNetPacket(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
272 decodeInterest(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
285 decodeData(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
298 decodeNack(
const Block& netPkt,
const lp::Packet& firstPkt,
const EndpointId& endpointId);
305 lp::Sequence m_lastSeqNo;
309 time::steady_clock::TimePoint m_nextMarkTime;
311 size_t m_nMarkedSinceInMarkingState;
331 #endif // NFD_DAEMON_FACE_GENERIC_LINK_SERVICE_HPP const Counters & getCounters() const final
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 nDuplicateSequence
count of LpPackets dropped due to duplicate Sequence numbers
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