4 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
5 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
6 // Stefan Bund <stefan.bund@fokus.fraunhofer.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #define HH_UDPPacket_ 1
27 #include "Packets/Packets.hh"
29 //#include "UDPPacket.mpp"
30 ///////////////////////////////hh.p////////////////////////////////////////
34 ///\addtogroup protocolbundle_default
38 struct Parse_UDP : public PacketParserBase
40 SENF_PACKET_PARSER_INIT(Parse_UDP);
42 ///////////////////////////////////////////////////////////////////////////
44 typedef Parse_UInt16 Parse_16bit;
46 SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
47 ((Field)( source, Parse_16bit ))
48 ((Field)( destination, Parse_16bit ))
49 ((Field)( length, Parse_16bit ))
50 ((Field)( crc, Parse_16bit )) );
54 : public PacketTypeBase,
55 public PacketTypeMixin<UDPPacketType>
57 typedef PacketTypeMixin<UDPPacketType> mixin;
58 typedef ConcretePacket<UDPPacketType> packet;
59 typedef Parse_UDP parser;
61 using mixin::nextPacketRange;
62 using mixin::initSize;
65 static void dump(packet p, std::ostream & os);
68 typedef UDPPacketType::packet UDPPacket;
74 ///////////////////////////////hh.e////////////////////////////////////////
76 #ifndef SENF_PACKETS_DECL_ONLY
77 //#include UDPPacket.cci"
78 //#include "UDPPacket.ct"
79 //#include "UDPPacket.cti"
86 // c-file-style: "senf"
87 // indent-tabs-mode: nil
88 // ispell-local-dictionary: "american"
89 // compile-command: "scons -u test"