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();
reassembles fragmented network-layer packets
const LinkService * getLinkService() const
signal::Signal< LpReassembler, EndpointId, size_t > beforeTimeout
signals before a partial packet is dropped due to timeout
LpReassembler(const Options &options, const LinkService *linkService=nullptr)
void setOptions(const Options &options)
set options for reassembler
std::tuple< bool, Block, lp::Packet > receiveFragment(EndpointId remoteEndpoint, const lp::Packet &packet)
adds received fragment to the buffer
size_t size() const
count of partial packets
std::ostream & operator<<(std::ostream &os, const FaceLogHelper< Face > &flh)
uint64_t EndpointId
Identifies a remote 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.
time::nanoseconds reassemblyTimeout
timeout before a partially reassembled packet is dropped
size_t nMaxFragments
maximum number of fragments in a packet