LlcSnapPacket.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 
17 #ifndef HH_SENF_Packets_DefaultBundle_LlcSnapPacket_
18 #define HH_SENF_Packets_DefaultBundle_LlcSnapPacket_ 1
19 
20 // Custom includes
21 #include <senf/Packets/Packets.hh>
22 #include "Registries.hh"
23 
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 
26 namespace senf {
27 
34  {
35 # include SENF_FIXED_PARSER()
36 
40 
43 
45 
47  dsap() = 0xaa;
48  ssap() = 0xaa;
49  ctrl() = 0x03;
50  protocolId() = 0x000000;
51  }
52  };
53 
73  : public PacketTypeBase,
74  public PacketTypeMixin<LlcSnapPacketType, EtherTypes>
75  {
79 
80  using mixin::nextPacketRange;
81  using mixin::initSize;
82  using mixin::init;
83 
84  static factory_t nextPacketType(packet p);
86  static void dump(packet p, std::ostream & os);
87  static void finalize(packet p);
88  };
89 
95 }
96 
97 
98 //-/////////////////////////////////////////////////////////////////////////////////////////////////
99 //#include "LlcSnapPacket.cci"
100 //#include "LlcSnapPacket.ct"
101 //#include "LlcSnapPacket.cti"
102 #endif
103 
104 
105 // Local Variables:
106 // mode: c++
107 // fill-column: 100
108 // c-file-style: "senf"
109 // indent-tabs-mode: nil
110 // ispell-local-dictionary: "american"
111 // compile-command: "scons -u test"
112 // comment-column: 40
113 // End:
LLC/SNAP header.
Mixin to provide standard implementations for nextPacketRange and nextPacketType. ...
Definition: PacketType.hh:300
Parse 8bit unsigned byte aligned integer.
Definition: IntParser.hh:91
UInt8Parser dsap() const
Packets public header.
DefaultBundle packet registries public header.
#define SENF_PARSER_FIELD(name, type)
Define normal parser field.
#define SENF_PARSER_FINALIZE(name)
Generate parser control members.
UInt16Parser type_length() const
UInt8Parser ssap() const
void dump(std::ostream &os, DirectoryNode &dir=root())
Protocol specific packet handle.
Definition: Packet.hh:87
Helper base-class implementing the PacketType interface.
Definition: PacketType.hh:100
#define SENF_PARSER_INIT()
Define parser initialization routine.
PacketTypeMixin< LlcSnapPacketType, EtherTypes > mixin
SENF_PACKET_PREVENT_TEMPLATE_INSTANTIATION(RadiotapPacket)
UInt8Parser ctrl() const
Parse a LLC/SNAP header.
ConcretePacket< LlcSnapPacketType > packet
LLC/SNAP packet typedef.
UInt24Parser protocolId() const
Parse 24bit unsigned byte aligned integer.
Definition: IntParser.hh:256
ConcretePacket< LlcSnapPacketType > LlcSnapPacket
LLC/SNAP packet typedef.
Parser Base class.
PacketInterpreterBase::factory_t factory_t
Definition: PacketType.hh:112
Parse 16bit unsigned byte aligned integer.
Definition: IntParser.hh:174
LlcSnapPacketParser parser
typedef to the parser of LLC/SNAP packet