26 #ifndef NFD_DAEMON_FACE_LP_REASSEMBLER_HPP 27 #define NFD_DAEMON_FACE_LP_REASSEMBLER_HPP 32 #include <ndn-cxx/lp/packet.hpp> 84 std::tuple<bool, Block, lp::Packet>
106 std::vector<lp::Packet> fragments;
108 size_t nReceivedFragments;
109 scheduler::ScopedEventId dropTimer;
120 doReassembly(
const Key& key);
123 timeoutPartialPacket(
const Key& key);
128 std::map<Key, PartialPacket> m_partialPackets;
132 operator<<(std::ostream& os, const FaceLogHelper<LpReassembler>& flh);
143 return m_linkService;
149 return m_partialPackets.size();
155 #endif // NFD_DAEMON_FACE_LP_REASSEMBLER_HPP LpReassembler(const Options &options, const LinkService *linkService=nullptr)
std::tuple< bool, Block, lp::Packet > receiveFragment(EndpointId remoteEndpoint, const lp::Packet &packet)
adds received fragment to buffer
const LinkService * getLinkService() const
size_t size() const
count of partial packets
uint64_t EndpointId
identifies an endpoint on the link
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Options that control the behavior of LpReassembler.
signal::Signal< LpReassembler, EndpointId, size_t > beforeTimeout
signals before a partial packet is dropped due to timeout
reassembles fragmented network-layer packets
size_t nMaxFragments
maximum number of fragments in a packet
time::nanoseconds reassemblyTimeout
timeout before a partially reassembled packet is dropped
void setOptions(const Options &options)
set options for reassembler