2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
4 // Stefan Bund <g0dil@berlios.de>
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 \brief IpV6Extensions public header */
24 #ifndef HH_IpV6Extensions_
25 #define HH_IpV6Extensions_ 1
28 #include "IpV6Packet.hh"
30 //#include "IpV6Extensions.mpp"
31 ///////////////////////////////hh.p////////////////////////////////////////
35 ///\addtogroup protocolbundle_default
39 struct Parse_IpV6Extension_Fragment : public PacketParserBase
41 SENF_PACKET_PARSER_INIT(Parse_IpV6Extension_Fragment);
43 ///////////////////////////////////////////////////////////////////////////
45 typedef Parse_UInt8 Parse_8bit;
46 typedef Parse_UIntField < 0, 13 > Parse_Offset;
47 typedef Parse_UIntField < 13, 15 > Parse_Reserved;
48 typedef Parse_Flag < 15 > Parse_More;
49 typedef Parse_UInt32 Parse_32bit;
51 SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
52 ((Field )( nextHeader , Parse_8bit ))
53 ((Field )( reserved1 , Parse_8bit ))
54 ((OverlayField)( fragmentOffset , Parse_Offset ))
55 ((OverlayField)( reserved2 , Parse_Reserved ))
56 ((Field )( moreFragments , Parse_More ))
57 ((Field )( id , Parse_32bit )) );
60 struct IpV6ExtensionType_Fragment
61 : public PacketTypeBase,
62 public PacketTypeMixin<IpV6ExtensionType_Fragment, IpTypes>
64 typedef PacketTypeMixin<IpV6ExtensionType_Fragment, IpTypes> mixin;
65 typedef ConcretePacket<IpV6ExtensionType_Fragment> packet;
66 typedef Parse_IpV6Extension_Fragment parser;
68 using mixin::nextPacketRange;
69 using mixin::nextPacketType;
70 using mixin::initSize;
73 static registry_key_t nextPacketKey(packet p)
74 { return p->nextHeader(); }
76 static void dump(packet p, std::ostream & os);
79 typedef IpV6ExtensionType_Fragment::packet IpV6Extension_Fragment;
84 ///////////////////////////////hh.e////////////////////////////////////////
86 #ifndef SENF_PACKETS_DECL_ONLY
87 //#include "IpV6Extensions.cci"
88 //#include "IpV6Extensions.ct"
89 //#include "IpV6Extensions.cti"
96 // c-file-style: "senf"
97 // indent-tabs-mode: nil
98 // ispell-local-dictionary: "american"
99 // compile-command: "scons -u test"
100 // comment-column: 40