Packets.cci
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 /** \file
15  \brief Packets inline non-template implementation */
16 
17 // Custom includes
18 #include <senf/Packets/DefaultBundle/EthernetPacket.hh>
19 
20 #define prefix_ inline
21 //-/////////////////////////////////////////////////////////////////////////////////////////////////
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 // senf::emu::EmulatedWirelessPacketHeaderType
24 
25 prefix_ senf::emu::EmulatedWirelessPacketHeaderType::key_t
26 senf::emu::EmulatedWirelessPacketHeaderType::nextPacketKey(packet p)
27 {
28  return p->interfaceType();
29 }
30 
31 prefix_ void senf::emu::EmulatedWirelessPacketHeaderType::finalize(packet p)
32 {
33  p->interfaceType() << key(p.next(senf::nothrow));
34 }
35 
36 //-/////////////////////////////////////////////////////////////////////////////////////////////////
37 // senf::emu::PacketHeaderType
38 
39 prefix_ senf::emu::PacketHeaderType::key_t senf::emu::PacketHeaderType::nextPacketKey(packet p)
40 {
41  return p->interfaceType();
42 }
43 
44 prefix_ void senf::emu::PacketHeaderType::finalize(packet p)
45 {
46  p->interfaceType() << key(p.next(senf::nothrow));
47 }
48 
49 //-/////////////////////////////////////////////////////////////////////////////////////////////////
50 // senf::emu:::DVBPacketHeaderType
51 
52 prefix_ senf::emu::DVBPacketHeaderType::factory_t
53 senf::emu::DVBPacketHeaderType::nextPacketType(packet p)
54 {
55  return EthernetPacket::factory();
56 }
57 
58 //-/////////////////////////////////////////////////////////////////////////////////////////////////
59 // senf::emu:::EthernetPacketHeaderType
60 
61 prefix_ senf::emu::EthernetPacketHeaderType::factory_t
62 senf::emu::EthernetPacketHeaderType::nextPacketType(packet p)
63 {
64  return EthernetPacket::factory();
65 }
66 
67 //-/////////////////////////////////////////////////////////////////////////////////////////////////
68 #undef prefix_
69 
70 
71 // Local Variables:
72 // mode: c++
73 // fill-column: 100
74 // comment-column: 40
75 // c-file-style: "senf"
76 // indent-tabs-mode: nil
77 // ispell-local-dictionary: "american"
78 // compile-command: "scons -u test"
79 // End: