4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Thorsten Horstmann <tho@berlios.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 \brief MIH protocol public header */
26 #ifndef HH_SENF_Packets_80221Bundle_MIHPacket_
27 #define HH_SENF_Packets_80221Bundle_MIHPacket_ 1
30 #include "../../Packets/Packets.hh"
32 //#include "MIHPacket.mpp"
33 ///////////////////////////////hh.p////////////////////////////////////////
37 struct MIHPacketParser : public senf::PacketParserBase
39 # include SENF_PARSER()
41 SENF_PARSER_BITFIELD ( version, 4, unsigned );
42 SENF_PARSER_BITFIELD ( ackRequest, 1, bool );
43 SENF_PARSER_BITFIELD ( ackResponse, 1, bool );
44 SENF_PARSER_BITFIELD ( uir, 1, bool );
45 SENF_PARSER_BITFIELD ( moreFragment, 1, bool );
46 SENF_PARSER_BITFIELD ( fragmentNr, 7, unsigned );
47 SENF_PARSER_SKIP_BITS ( 1 );
49 // MIH message ID (MID)
50 SENF_PARSER_BITFIELD ( sid, 4, unsigned );
51 SENF_PARSER_BITFIELD ( opcode, 2, unsigned );
52 SENF_PARSER_BITFIELD ( aid, 10, unsigned );
54 SENF_PARSER_SKIP_BITS ( 4 );
55 SENF_PARSER_BITFIELD ( transactionId, 12, unsigned );
56 SENF_PARSER_FIELD_RO ( payloadLength, UInt16Parser );
58 SENF_PARSER_FINALIZE ( MIHPacketParser );
63 : public PacketTypeBase,
64 public PacketTypeMixin<MIHPacketType>
66 typedef PacketTypeMixin<MIHPacketType> mixin;
67 typedef ConcretePacket<MIHPacketType> packet;
68 typedef MIHPacketParser parser;
70 using mixin::nextPacketRange;
72 using mixin::initSize;
74 static void dump(packet p, std::ostream &os);
75 // static void finalize(packet p);
78 typedef ConcretePacket<MIHPacketType> MIHPacket;
82 ///////////////////////////////hh.e////////////////////////////////////////
84 #ifndef SENF_PACKETS_DECL_ONLY
85 //#include "MIHPacket.cci"
86 //#include "MIHPacket.ct"
87 //#include "MIHPacket.cti"
94 // c-file-style: "senf"
95 // indent-tabs-mode: nil
96 // ispell-local-dictionary: "american"
97 // compile-command: "scons -u test"