26 #ifndef NFD_DAEMON_FACE_LP_REASSEMBLER_HPP 27 #define NFD_DAEMON_FACE_LP_REASSEMBLER_HPP 31 #include <ndn-cxx/lp/packet.hpp> 81 std::tuple<bool, Block, lp::Packet>
103 std::vector<lp::Packet> fragments;
105 size_t nReceivedFragments;
106 scheduler::ScopedEventId dropTimer;
117 doReassembly(
const Key& key);
120 timeoutPartialPacket(
const Key& key);
125 std::map<Key, PartialPacket> m_partialPackets;
129 operator<<(std::ostream& os, const FaceLogHelper<LpReassembler>& flh);
140 return m_linkService;
146 return m_partialPackets.size();
152 #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 the buffer
uint64_t EndpointId
Identifies a remote endpoint on the link.
size_t size() const
count of partial packets
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
const LinkService * getLinkService() const
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