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////////////////////////////////////////
36 struct Parse_IpV6Extension_Fragment : public PacketParserBase
38 SENF_PACKET_PARSER_INIT(Parse_IpV6Extension_Fragment);
40 ///////////////////////////////////////////////////////////////////////////
42 typedef Parse_UInt8 Parse_8bit;
43 typedef Parse_UIntField < 0, 13 > Parse_Offset;
44 typedef Parse_UIntField < 13, 15 > Parse_Reserved;
45 typedef Parse_Flag < 15 > Parse_More;
46 typedef Parse_UInt32 Parse_32bit;
48 SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
49 ((Field )( nextHeader , Parse_8bit ))
50 ((Field )( reserved1 , Parse_8bit ))
51 ((OverlayField)( fragmentOffset , Parse_Offset ))
52 ((OverlayField)( reserved2 , Parse_Reserved ))
53 ((Field )( moreFragments , Parse_More ))
54 ((Field )( id , Parse_32bit )) );
57 struct IpV6ExtensionType_Fragment
58 : public PacketTypeBase,
59 public PacketTypeMixin<IpV6ExtensionType_Fragment, IpTypes>
61 typedef PacketTypeMixin<IpV6ExtensionType_Fragment, IpTypes> mixin;
62 typedef ConcretePacket<IpV6ExtensionType_Fragment> packet;
63 typedef Parse_IpV6Extension_Fragment parser;
65 using mixin::nextPacketRange;
66 using mixin::nextPacketType;
67 using mixin::initSize;
70 static registry_key_t nextPacketKey(packet p)
71 { return p->nextHeader(); }
73 static void dump(packet p, std::ostream & os);
76 typedef IpV6ExtensionType_Fragment::packet IpV6Extension_Fragment;
79 ///////////////////////////////hh.e////////////////////////////////////////
80 //#include "IpV6Extensions.cci"
81 //#include "IpV6Extensions.ct"
82 //#include "IpV6Extensions.cti"
89 // c-file-style: "senf"
90 // indent-tabs-mode: nil
91 // ispell-local-dictionary: "american"
92 // compile-command: "scons -u test"