EthernetReassembler.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
14 #ifndef HH_WiBACK_Core_Interfaces_EthernetReassembler_
15 #define HH_WiBACK_Core_Interfaces_EthernetReassembler_ 1
16 
17 // Custom includes
18 #include <senf/PPI/Module.hh>
19 #include <senf/PPI/Connectors.hh>
21 
23 namespace senf {
24 namespace emu {
25 
27  {
28  public:
31 
32  bool processFrame(senf::EthernetPacket const & eth, EthernetFragmentPacket const & fragment);
34 
35  unsigned fragmentsInvalid();
36  unsigned fragmentsProcessed();
37  unsigned packetsUnfragmented();
38  unsigned packetsReassembled();
39 
40  private:
41  std::uint8_t nextFragmentNr_;
42  senf::EthernetPacket reassembledPacket_;
43  senf::PacketData::iterator payloadIter_;
44 
45  unsigned packetsUnfragmented_;
46  unsigned packetsReassembled_;
47  unsigned fragmentsInvalid_;
48  unsigned fragmentsProcessed_;
49  };
50 
53  {
54  public:
56  };
57 
59  : public EthernetReassemblerBase,
61  {
63 
64  public:
67 
69 
70  private:
71  void onRequest();
72  };
73 
74 }}
75 
77 //#include "EthernetFragmenter.cci"
78 //#include "EthernetFragmenter.ct"
79 //#include "EthernetFragmenter.cti"
80 #endif
bool processFrame(senf::EthernetPacket const &eth, EthernetFragmentPacket const &fragment)
senf::detail::packet::iterator iterator
senf::EthernetPacket & reassembledPacket()
#define SENF_PPI_MODULE(name)
senf::ppi::connector::PassiveInput< senf::EthernetPacket > input
ConcretePacket< EthernetPacketType > EthernetPacket
senf::ppi::connector::ActiveOutput< senf::EthernetPacket > output