TunnelHeaderPacket.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_Packets_TunnelHeaderPacket_
15 #define HH_WiBACK_Core_Packets_TunnelHeaderPacket_ 1
16 
17 // Custom includes
18 #include <senf/Packets/Packets.hh>
20 
22 namespace senf {
23 namespace emu {
24 
26  {
27 # include SENF_FIXED_PARSER()
28 
29  SENF_PARSER_BITFIELD( reserved, 15, unsigned );
30  SENF_PARSER_BITFIELD( sequenceNumber, 17, unsigned );
32 
34  reserved() = 0x4711 & 0x7fff;
35  }
36 
37  };
38 
40  : public senf::PacketTypeBase,
41  public senf::PacketTypeMixin<TunnelHeaderPacketType>
42  {
43  static constexpr std::uint32_t reservedMagic = 0x4711 & 0x7fff;
44 
48 
49  using mixin::nextPacketRange;
50  using mixin::initSize;
51  using mixin::init;
52 
53  static factory_t nextPacketType(packet p);
55  static void dump(packet p, std::ostream & os);
56  static void finalize(packet p);
57  };
58 
60 }}
61 
63 
65 #include "TunnelHeaderPacket.cci"
66 //#include "TunnelHeaderPacket.ct"
67 //#include "TunnelHeaderPacket.cti"
68 #endif
senf::UIntFieldParser<?,?+17 > sequenceNumber() const
#define SENF_PARSER_BITFIELD(name, bits, type)
senf::ConcretePacket< TunnelHeaderPacketType > packet
SENF_PACKET_PREVENT_TEMPLATE_INSTANTIATION(AnnotationsPacket)
#define SENF_PARSER_FINALIZE(name)
void dump(std::ostream &os, DirectoryNode &dir=root())
#define SENF_PARSER_INIT()
PacketInterpreterBase::factory_t factory_t
senf::UIntFieldParser<?,?+15 > reserved() const
senf::ConcretePacket< TunnelHeaderPacketType > TunnelHeaderPacket
senf::PacketTypeMixin< TunnelHeaderPacketType > mixin