some clean-ups
tho [Wed, 17 Dec 2008 13:58:55 +0000 (13:58 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1019 270642c3-0616-0410-b53a-bc976706d245

Packets/80211Bundle/RadiotapPacket.hh
Packets/DefaultBundle/EthernetPacket.hh
Packets/DefaultBundle/ICMPv6Packet.cc
Packets/DefaultBundle/ICMPv6Packet.hh
Packets/DefaultBundle/ICMPv6Packet.test.cc
Packets/DefaultBundle/ICMPv6TypePacket.cc
Packets/DefaultBundle/ICMPv6TypePacket.hh

index e36308e..0269a08 100644 (file)
@@ -35,7 +35,7 @@ namespace senf
 
         <b>Re-ordering of bits due to LSB byte order</b>
      */
-    struct RadiotapPacketParser_Flags : public senf::PacketParserBase
+    struct RadiotapPacketParser_Flags : public PacketParserBase
     {
     #   include SENF_FIXED_PARSER()
 
@@ -55,7 +55,7 @@ namespace senf
 
         <b>Re-ordering of bits due to LSB byte order</b>
      */
-    struct RadiotapPacketParser_ChannelOptions : public senf::PacketParserBase
+    struct RadiotapPacketParser_ChannelOptions : public PacketParserBase
     {
     #   include SENF_FIXED_PARSER()
 
@@ -95,7 +95,7 @@ namespace senf
 
         \todo extended present field (bit 31 of present field is set)
     */
-    struct RadiotapPacketParser : public senf::PacketParserBase
+    struct RadiotapPacketParser : public PacketParserBase
     {
     #   include SENF_PARSER()
 
@@ -177,7 +177,7 @@ namespace senf
             version() = 0;
         }
 
-        SENF_PARSER_FINALIZE(RadiotapPacketParser);
+        SENF_PARSER_FINALIZE( RadiotapPacketParser );
     };
 
     /** \brief Radiotap packet
@@ -193,12 +193,12 @@ namespace senf
         \ingroup protocolbundle_80211
      */
     struct RadiotapPacketType
-        : public senf::PacketTypeBase,
-          public senf::PacketTypeMixin<RadiotapPacketType>
+        : public PacketTypeBase,
+          public PacketTypeMixin<RadiotapPacketType>
     {
-        typedef senf::PacketTypeMixin<RadiotapPacketType> mixin;
-        typedef senf::ConcretePacket<RadiotapPacketType> packet;
-        typedef senf::RadiotapPacketParser parser;
+        typedef PacketTypeMixin<RadiotapPacketType> mixin;
+        typedef ConcretePacket<RadiotapPacketType> packet;
+        typedef RadiotapPacketParser parser;
 
         using mixin::nextPacketRange;
         using mixin::init;
@@ -209,7 +209,7 @@ namespace senf
         static factory_t nextPacketType(packet p);
     };
 
-    typedef senf::ConcretePacket<RadiotapPacketType> RadiotapPacket;
+    typedef ConcretePacket<RadiotapPacketType> RadiotapPacket;
 }
 
 #endif
index bac2554..cbaf6e3 100644 (file)
@@ -109,11 +109,10 @@ namespace senf {
         : public PacketTypeBase,
           public PacketTypeMixin<EthernetPacketType, EtherTypes>
     {
-#ifndef DOXYGEN
         typedef PacketTypeMixin<EthernetPacketType, EtherTypes> mixin;
         typedef ConcretePacket<EthernetPacketType> packet;
         typedef EthernetPacketParser parser;
-#endif
+
         using mixin::nextPacketRange;
         using mixin::initSize;
         using mixin::init;
@@ -165,11 +164,10 @@ namespace senf {
         : public PacketTypeBase, 
           public PacketTypeMixin<EthVLanPacketType, EtherTypes>
     {
-#ifndef DOXYGEN
         typedef PacketTypeMixin<EthVLanPacketType, EtherTypes> mixin;
         typedef ConcretePacket<EthVLanPacketType> packet;
         typedef EthVLanPacketParser parser;
-#endif
+
         using mixin::nextPacketRange;
         using mixin::nextPacketType;
         using mixin::initSize;
index 719b8d9..d70e7f5 100644 (file)
@@ -1,7 +1,9 @@
+// $Id$
+//
 // Copyright (C) 2008
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
 // Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Philipp Batroff <Philipp.Batroff@fokus.fraunhofer.de>
+//     Philipp Batroff <pug@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -32,7 +34,7 @@ namespace {
         registerICMPv6Packet (58);
 }
 
-prefix_ void senf::ICMPV6PacketParser::calcChecksum() const {
+prefix_ boost::uint16_t senf::ICMPv6PacketParser::calcChecksum() const {
 
     senf::IpChecksum summer;
     senf::IPv6Packet ipv6 (packet().rfind<senf::IPv6Packet>(senf::nothrow));
@@ -55,16 +57,16 @@ prefix_ void senf::ICMPV6PacketParser::calcChecksum() const {
     summer.feed( i()+checksum_offset+2, data().end() );
 
     boost::uint16_t rv (summer.sum());
-    this->checksum() << (rv ? rv : 0xffffu);
+    return rv ? rv : 0xffffu;
 }
 
-prefix_ void senf::ICMPV6PacketType::dump(packet p, std::ostream &os)
+prefix_ void senf::ICMPv6PacketType::dump(packet p, std::ostream &os)
 {
     boost::io::ios_all_saver ias(os);
     os << "ICMPv6 protocol:\n"
-        << "Type                    : " << p->type() <<"\n"
-        << "Code                    : " << p->code() <<"\n"
-        << "Checksum                : " << p->checksumOutput() << "\n";
+       << "Type                    : " << p->type() <<"\n"
+       << "Code                    : " << p->code() <<"\n"
+       << "Checksum                : " << p->checksum() << "\n";
 }
 
 #undef prefix_
index ad8bb00..44a4316 100644 (file)
@@ -1,7 +1,9 @@
+// $Id$
+//
 // Copyright (C) 2008
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
 // Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Philipp Batroff <Philipp.Batroff@fokus.fraunhofer.de>
+//     Philipp Batroff <pug@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // Free Software Foundation, Inc.,
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-#ifndef HH_ICMPV6Packet
-#define HH_ICMPV6Packet
+#ifndef HH_SENF_Packets_DefaultBundle_ICMPv6Packet_
+#define HH_SENF_Packets_DefaultBundle_ICMPv6Packet_ 1
 
 // Custom includes
 #include "../../Packets/Packets.hh"
 #include "../../Packets/DefaultBundle/IPv6Packet.hh"
 
-namespace senf{
-    struct ICMPV6PacketParser : public senf::PacketParserBase
+namespace senf 
+{
+
+    struct ICMPv6PacketParser : public PacketParserBase
     {
-    #       include SENF_FIXED_PARSER()
-            SENF_PARSER_FIELD    ( type, senf::UInt8Parser );
-            SENF_PARSER_FIELD    ( code, senf::UInt8Parser );
-            SENF_PARSER_PRIVATE_FIELD ( checksum, senf::UInt16Parser);
+#       include SENF_FIXED_PARSER()
+        SENF_PARSER_FIELD ( type,     UInt8Parser  );
+        SENF_PARSER_FIELD ( code,     UInt8Parser  );
+        SENF_PARSER_FIELD ( checksum, UInt16Parser );
     
-            SENF_PARSER_FINALIZE ( ICMPV6PacketParser );
-    
-            void calcChecksum() const;
-            boost::uint16_t checksumOutput() const
-                { return this->checksum();}
+        SENF_PARSER_FINALIZE ( ICMPv6PacketParser );
+        
+        boost::uint16_t calcChecksum() const;
     };
     
-        struct ICMPTypes {
-            // ICMP type registry
-            typedef boost::uint16_t key_t;
-        };
+    struct ICMPTypes {
+        // ICMP type registry
+        typedef boost::uint16_t key_t;
+    };
     
-    struct ICMPV6PacketType 
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<ICMPV6PacketType, ICMPTypes>
+    struct ICMPv6PacketType 
+        : public PacketTypeBase,
+          public PacketTypeMixin<ICMPv6PacketType, ICMPTypes>
     {
-        typedef senf::PacketTypeMixin<ICMPV6PacketType, ICMPTypes> mixin;
-        typedef senf::ConcretePacket<ICMPV6PacketType> packet;
-        typedef ICMPV6PacketParser parser;
+        typedef PacketTypeMixin<ICMPv6PacketType, ICMPTypes> mixin;
+        typedef ConcretePacket<ICMPv6PacketType> packet;
+        typedef ICMPv6PacketParser parser;
         
         using mixin::nextPacketRange;
         using mixin::nextPacketType;
@@ -59,15 +61,18 @@ namespace senf{
         using mixin::initSize;
         
         static void dump(packet p, std::ostream & os);
-        static senf::IpTypes::key_t nextPacketKey(packet p) { 
+        
+        static IpTypes::key_t nextPacketKey(packet p) { 
             return p->type();
         }
+        
         static void finalize(packet p) {
-            p->calcChecksum();
+            p->checksum() << p->calcChecksum();
             p->type() << key(p.next(senf::nothrow));
         }
     };
     
-    typedef ICMPV6PacketType::packet ICMPv6Packet;
+    typedef ConcretePacket<ICMPv6PacketType> ICMPv6Packet;
 }
+
 #endif
index 3b1bd02..aa14500 100644 (file)
@@ -1,9 +1,9 @@
-// $Id: main.test.cc 206 2007-02-20 14:20:52Z g0dil $
+// $Id$
 //
-// Copyright (C) 2006
+// Copyright (C) 2008
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
 // Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Philipp Batroff <Philipp.Batroff@fokus.fraunhofer.de>
+//     Philipp Batroff <pug@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 
 // Custom includes
 
-#include "ICMPv6Packet.hh"
-#include "../../Packets/Packets.hh"
 #include "../../Utils/auto_unit_test.hh"
 #include <boost/test/test_tools.hpp>
+#include "ICMPv6Packet.hh"
 #include "ICMPv6TypePacket.hh"
 
 BOOST_AUTO_UNIT_TEST(ICMPv6Packet_packet)
 {
-    unsigned char data[] = { 0x8f, 0x00 ,0x8d ,0x54 ,0x00 ,0x00 ,0x00 ,0x01 ,0x04 ,0x00 ,0x00 ,0x00 ,0xff ,0x15 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x16};
+    unsigned char data[] = { 
+            0x8f, 0x00, 0x8d, 0x54, 0x00, 0x00, 0x00, 0x01,
+            0x04, 0x00, 0x00, 0x00, 0xff, 0x15, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x16
+    };
 
     senf::ICMPv6Packet p ( senf::ICMPv6Packet::create(data) );
     
-    BOOST_CHECK_EQUAL( p->type(),           0x8f);
-    BOOST_CHECK_EQUAL( p->code(),           0x00);
-    BOOST_CHECK_EQUAL( p->checksumOutput(), 0x8d54);
+    BOOST_CHECK_EQUAL( p->type(),     0x8f   );
+    BOOST_CHECK_EQUAL( p->code(),     0x00   );
+    BOOST_CHECK_EQUAL( p->checksum(), 0x8d54 );
     BOOST_CHECK( p.next() );
     BOOST_CHECK( p.next().is<senf::MLDv2ListenerReport>() );
     BOOST_CHECK_EQUAL( p.next().size(), 24u );
index 6e5d9d8..520bb55 100644 (file)
@@ -1,9 +1,9 @@
-// $Id: main.test.cc 206 2008-06-08 14:20:52Z pug $
+// $Id$
 //
-// Copyright (C) 2006
+// Copyright (C) 2008
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
 // Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Philipp Batroff <Philipp.Batroff@fokus.fraunhofer.de>
+//     Philipp Batroff <pug@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 
 namespace {
 //Implementing the ICMPv6 Type registry
-    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPV6ErrDestUnreachable>
-        registerICMPV6ErrDestUnreachable (1);
-    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPV6ErrTooBig>
-        registerICMPV6ErrTooBig (2);
-    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPV6ErrTimeExceeded>
-        registerICMPV6ErrTimeExceeded (3);
-    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPV6ErrParamProblem>
-        registerICMPV6ErrParamProblem (4);
-    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPv6EchoReq>
-        registerICMPv6EchoReq (128);
+    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPv6ErrDestUnreachable>
+        registerICMPv6ErrDestUnreachable (1);
+    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPv6ErrTooBig>
+        registerICMPv6ErrTooBig (2);
+    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPv6ErrTimeExceeded>
+        registerICMPv6ErrTimeExceeded (3);
+    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPv6ErrParamProblem>
+        registerICMPv6ErrParamProblem (4);
+    senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPv6EchoRequest>
+        registerICMPv6EchoRequest (128);
     senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::ICMPv6EchoReply>
         registerICMPv6EchoReply (129);
     senf::PacketRegistry<senf::ICMPTypes>::RegistrationProxy<senf::MLDv2ListenerQuery>
index 0b28c35..8741909 100644 (file)
@@ -1,9 +1,9 @@
-// $Id: main.test.cc 206 2008-06-08 14:20:52Z pug $
+// $Id$
 //
-// Copyright (C) 2006
+// Copyright (C) 2008
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
 // Competence Center NETwork research (NET), St. Augustin, GERMANY
-//     Philipp Batroff <Philipp.Batroff@fokus.fraunhofer.de>
+//     Philipp Batroff <pug@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 
 // Definition of non-inline non-template functions
 
-#ifndef HH_ICMPV6TYPEPacket
-#define HH_ICMPV6TYPEPacket
+#ifndef HH_SENF_Packets_DefaultBundle_ICMPv6TypePacket_
+#define HH_SENF_Packets_DefaultBundle_ICMPv6TypePacket_ 1
+
 // Custom includes
 #include "../../Packets/Packets.hh"
 #include "ICMPv6Packet.hh"
 
-namespace senf{
+namespace senf {
+
     //#############################################################
     //ICMPv6 Echo Request
     //#############################################################
-    struct ICMPV6EchoRequestParser : public senf::PacketParserBase
+    struct ICMPv6EchoRequestParser : public PacketParserBase
     {
-    #       include SENF_FIXED_PARSER()
-        SENF_PARSER_FIELD    ( identifier, senf::UInt16Parser );
-        SENF_PARSER_FIELD    ( seqNr, senf::UInt16Parser );
+#       include SENF_FIXED_PARSER()
+        SENF_PARSER_FIELD ( identifier, UInt16Parser );
+        SENF_PARSER_FIELD ( seqNr,      UInt16Parser );
         
-        SENF_PARSER_FINALIZE ( ICMPV6EchoRequestParser );
+        SENF_PARSER_FINALIZE ( ICMPv6EchoRequestParser );
     };
     
-    struct ICMPV6EchoRequestType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<ICMPV6EchoRequestType>
+    struct ICMPv6EchoRequestType
+        : public PacketTypeBase,
+          public PacketTypeMixin<ICMPv6EchoRequestType>
     {
-        typedef senf::PacketTypeMixin<ICMPV6EchoRequestType> mixin;
-        typedef senf::ConcretePacket<ICMPV6EchoRequestType> packet;
-        typedef ICMPV6EchoRequestParser parser;
+        typedef PacketTypeMixin<ICMPv6EchoRequestType> mixin;
+        typedef ConcretePacket<ICMPv6EchoRequestType> packet;
+        typedef ICMPv6EchoRequestParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
     
-    typedef ICMPV6EchoRequestType::packet ICMPv6EchoReq;
+    typedef ConcretePacket<ICMPv6EchoRequestType> ICMPv6EchoRequest;
     
     //#############################################################
     //ICMPv6 Echo Reply
     //#############################################################
-    struct ICMPV6EchoReplyParser : public senf::PacketParserBase
+    struct ICMPv6EchoReplyParser : public PacketParserBase
     {
-    #       include SENF_FIXED_PARSER()
-        SENF_PARSER_FIELD    ( identifier, senf::UInt16Parser );
-        SENF_PARSER_FIELD    ( seqNr, senf::UInt16Parser );
+#       include SENF_FIXED_PARSER()
+        SENF_PARSER_FIELD ( identifier, UInt16Parser );
+        SENF_PARSER_FIELD ( seqNr,      UInt16Parser );
         
-        SENF_PARSER_FINALIZE ( ICMPV6EchoReplyParser );
+        SENF_PARSER_FINALIZE ( ICMPv6EchoReplyParser );
     };
     
-    struct ICMPV6EchoReplyType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<ICMPV6EchoReplyType>
+    struct ICMPv6EchoReplyType
+        : public PacketTypeBase,
+          public PacketTypeMixin<ICMPv6EchoReplyType>
     {
-        typedef senf::PacketTypeMixin<ICMPV6EchoReplyType> mixin;
-        typedef senf::ConcretePacket<ICMPV6EchoReplyType> packet;
-        typedef ICMPV6EchoReplyParser parser;
+        typedef PacketTypeMixin<ICMPv6EchoReplyType> mixin;
+        typedef ConcretePacket<ICMPv6EchoReplyType> packet;
+        typedef ICMPv6EchoReplyParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
-    typedef ICMPV6EchoReplyType::packet ICMPv6EchoReply;
+        
+    typedef ConcretePacket<ICMPv6EchoReplyType> ICMPv6EchoReply;
     
     //#############################################################
     //ICMPv6 Error Destination Unreachable Message
     //#############################################################
-    struct ICMPV6ErrDestUnreachableParser : public senf::PacketParserBase
+    struct ICMPv6ErrDestUnreachableParser : public PacketParserBase
     {
-    #       include SENF_FIXED_PARSER()
+#       include SENF_FIXED_PARSER()
+        
         //should be set static 0 by sender and ignored by receiver
-        SENF_PARSER_PRIVATE_FIELD    ( unused, senf::UInt32Parser );
+        SENF_PARSER_PRIVATE_FIELD ( unused, UInt32Parser );
         
-        SENF_PARSER_INIT() { unused() = 0; }
+        SENF_PARSER_INIT() { 
+            unused() = 0; 
+        }
         /*   Code     0 - No route to destination
                     1 - Communication with destination
                             administratively prohibited
@@ -100,35 +106,36 @@ namespace senf{
                     4 - Port unreachable
                     5 - Source address failed ingress/egress policy
                     6 - Reject route to destination   */
-        void setErrCode(int code){
+        void setErrCode(int code) {
             ICMPv6Packet icmpv6 (senf::Packet().rfind<ICMPv6Packet>(senf::nothrow));
             icmpv6->code() = code;
         }
         
-        SENF_PARSER_FINALIZE ( ICMPV6ErrDestUnreachableParser );
+        SENF_PARSER_FINALIZE ( ICMPv6ErrDestUnreachableParser );
     };
     
-    struct ICMPV6ErrDestUnreachableType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<ICMPV6ErrDestUnreachableType>
+    struct ICMPv6ErrDestUnreachableType
+        : public PacketTypeBase,
+          public PacketTypeMixin<ICMPv6ErrDestUnreachableType>
     {
-        typedef senf::PacketTypeMixin<ICMPV6ErrDestUnreachableType> mixin;
-        typedef senf::ConcretePacket<ICMPV6ErrDestUnreachableType> packet;
-        typedef ICMPV6ErrDestUnreachableParser parser;
+        typedef PacketTypeMixin<ICMPv6ErrDestUnreachableType> mixin;
+        typedef ConcretePacket<ICMPv6ErrDestUnreachableType> packet;
+        typedef ICMPv6ErrDestUnreachableParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
-    typedef ICMPV6ErrDestUnreachableType::packet ICMPV6ErrDestUnreachable;
+        
+    typedef ConcretePacket<ICMPv6ErrDestUnreachableType> ICMPv6ErrDestUnreachable;
     
     //#############################################################
     //ICMPv6 Error Packet Too Big Message
     //#############################################################
-    struct ICMPV6ErrTooBigParser : public senf::PacketParserBase
+    struct ICMPv6ErrTooBigParser : public PacketParserBase
     {
-    #       include SENF_FIXED_PARSER()
-        SENF_PARSER_FIELD    ( MTU, senf::UInt32Parser );
+#       include SENF_FIXED_PARSER()
+        SENF_PARSER_FIELD ( mtu, UInt32Parser );
     
         /*   Code     static set to 0       */
     //     SENF_PARSER_INIT() {
@@ -136,31 +143,32 @@ namespace senf{
     //         icmpv6->code() = 0;
     //     }
         
-        SENF_PARSER_FINALIZE ( ICMPV6ErrTooBigParser );
+        SENF_PARSER_FINALIZE ( ICMPv6ErrTooBigParser );
     };
     
-    struct ICMPV6ErrTooBigType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<ICMPV6ErrTooBigType>
+    struct ICMPv6ErrTooBigType
+        : public PacketTypeBase,
+          public PacketTypeMixin<ICMPv6ErrTooBigType>
     {
-        typedef senf::PacketTypeMixin<ICMPV6ErrTooBigType> mixin;
-        typedef senf::ConcretePacket<ICMPV6ErrTooBigType> packet;
-        typedef ICMPV6ErrTooBigParser parser;
+        typedef PacketTypeMixin<ICMPv6ErrTooBigType> mixin;
+        typedef ConcretePacket<ICMPv6ErrTooBigType> packet;
+        typedef ICMPv6ErrTooBigParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
-    typedef ICMPV6ErrTooBigType::packet ICMPV6ErrTooBig;
+
+    typedef ConcretePacket<ICMPv6ErrTooBigType> ICMPv6ErrTooBig;
     
     //#############################################################
     //ICMPv6 Error Time Exceeded Message
     //#############################################################
-    struct ICMPV6ErrTimeExceededParser : public senf::PacketParserBase
+    struct ICMPv6ErrTimeExceededParser : public PacketParserBase
     {
-    #       include SENF_FIXED_PARSER()
+#       include SENF_FIXED_PARSER()
         //should be set static 0 by sender and ignored by receiver
-        SENF_PARSER_FIELD    ( unused, senf::UInt32Parser );
+        SENF_PARSER_FIELD    ( unused, UInt32Parser );
         /*  Code    0 - Hop limit exceeded in transit
                     1 - Fragment reassembly time exceeded   */
         void setErrCode(int code){
@@ -168,31 +176,31 @@ namespace senf{
             icmpv6->code() = code;
         }
         
-        SENF_PARSER_FINALIZE ( ICMPV6ErrTimeExceededParser );
+        SENF_PARSER_FINALIZE ( ICMPv6ErrTimeExceededParser );
     };
     
-    struct ICMPV6ErrTimeExceededType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<ICMPV6ErrTimeExceededType>
+    struct ICMPv6ErrTimeExceededType
+        : public PacketTypeBase,
+          public PacketTypeMixin<ICMPv6ErrTimeExceededType>
     {
-        typedef senf::PacketTypeMixin<ICMPV6ErrTimeExceededType> mixin;
-        typedef senf::ConcretePacket<ICMPV6ErrTimeExceededType> packet;
-        typedef ICMPV6ErrTimeExceededParser parser;
+        typedef PacketTypeMixin<ICMPv6ErrTimeExceededType> mixin;
+        typedef ConcretePacket<ICMPv6ErrTimeExceededType> packet;
+        typedef ICMPv6ErrTimeExceededParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
-    typedef ICMPV6ErrTimeExceededType::packet ICMPV6ErrTimeExceeded;
+    typedef ConcretePacket<ICMPv6ErrTimeExceededType> ICMPv6ErrTimeExceeded;
     
     //#############################################################
     //ICMPv6 Error Parameter Problem Message
     //#############################################################
-    struct ICMPV6ErrParamProblemParser : public senf::PacketParserBase
+    struct ICMPv6ErrParamProblemParser : public PacketParserBase
     {
-    #       include SENF_FIXED_PARSER()
+#       include SENF_FIXED_PARSER()
         //should be set static 0 by sender and ignored by receiver
-        SENF_PARSER_FIELD    ( pointer, senf::UInt32Parser );
+        SENF_PARSER_FIELD ( pointer, UInt32Parser );
         /*  Code      0 - Erroneous header field encountered
                     1 - Unrecognized Next Header type encountered
                     2 - Unrecognized IPv6 option encountered          */
@@ -201,30 +209,30 @@ namespace senf{
             ICMPv6Packet icmpv6 (senf::Packet().rfind<ICMPv6Packet>(senf::nothrow));
             icmpv6->code() = code;
         }
-        SENF_PARSER_FINALIZE ( ICMPV6ErrParamProblemParser );
+        SENF_PARSER_FINALIZE ( ICMPv6ErrParamProblemParser );
     };
     
-    struct ICMPV6ErrParamProblemType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<ICMPV6ErrParamProblemType>
+    struct ICMPv6ErrParamProblemType
+        : public PacketTypeBase,
+          public PacketTypeMixin<ICMPv6ErrParamProblemType>
     {
-        typedef senf::PacketTypeMixin<ICMPV6ErrParamProblemType> mixin;
-        typedef senf::ConcretePacket<ICMPV6ErrParamProblemType> packet;
-        typedef ICMPV6ErrParamProblemParser parser;
+        typedef PacketTypeMixin<ICMPv6ErrParamProblemType> mixin;
+        typedef ConcretePacket<ICMPv6ErrParamProblemType> packet;
+        typedef ICMPv6ErrParamProblemParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
-    typedef ICMPV6ErrParamProblemType::packet ICMPV6ErrParamProblem;
+    typedef ConcretePacket<ICMPv6ErrParamProblemType> ICMPv6ErrParamProblem;
     
     //#############################################################
     //ICMPv6 MLDv2 (RFC 3810) Multicast Listener Query
     //#############################################################
-    struct MLDv2ListenerQueryParser : public senf::PacketParserBase
+    struct MLDv2ListenerQueryParser : public PacketParserBase
     {
-    #   include SENF_PARSER()
-    //need a variant here
+#      include SENF_PARSER()
+        //need a variant here
         // a.) maxResponseCode < 32768 =>Interger
         // b.) maxResponseCode >=32768 => float (is there a float parser???)
         /* 
@@ -234,81 +242,86 @@ namespace senf{
         |1| exp |          mant         |
         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
         
-        SENF_PARSER_FIELD   ( maxResponseCode, senf::UInt16Parser );
-        SENF_PARSER_FIELD   ( reserved, senf::UInt16Parser );   //set to zero by default
-        SENF_PARSER_FIELD   ( mcAddress, senf::INet6AddressParser);
-        SENF_PARSER_BITFIELD ( resv, 4, unsigned);              //set to zero by default
-        SENF_PARSER_BITFIELD ( sFlag, 1, unsigned);
-        SENF_PARSER_BITFIELD ( qrv, 3, unsigned);
-        SENF_PARSER_FIELD ( qqic, senf::UInt8Parser );
-        SENF_PARSER_PRIVATE_FIELD ( nrSources, senf::UInt16Parser );
-        SENF_PARSER_VECTOR  (srcAddresses, nrSources, senf::INet6AddressParser );
+        SENF_PARSER_FIELD ( maxResponseCode, UInt16Parser       );
+        SENF_PARSER_FIELD ( reserved,        UInt16Parser       ); // set to zero by default
+        SENF_PARSER_FIELD ( mcAddress,       INet6AddressParser );
+        SENF_PARSER_BITFIELD ( resv,  4, unsigned ); // set to zero by default
+        SENF_PARSER_BITFIELD ( sFlag, 1, unsigned );
+        SENF_PARSER_BITFIELD ( qrv,   3, unsigned );
+        SENF_PARSER_FIELD    ( qqic, UInt8Parser );
+        SENF_PARSER_PRIVATE_FIELD ( nrSources, UInt16Parser );
+        SENF_PARSER_VECTOR   (srcAddresses, nrSources, INet6AddressParser );
+        
+        SENF_PARSER_FINALIZE ( MLDv2ListenerQueryParser );
         
-        SENF_PARSER_INIT() 
-        { 
+        SENF_PARSER_INIT() { 
             reserved() = 0; 
             resv() = 0;
         }
-        SENF_PARSER_FINALIZE ( MLDv2ListenerQueryParser );
-        
     };
     
     struct MLDv2ListenerQueryType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<MLDv2ListenerQueryType>
+        : public PacketTypeBase,
+          public PacketTypeMixin<MLDv2ListenerQueryType>
     {
-        typedef senf::PacketTypeMixin<MLDv2ListenerQueryType> mixin;
-        typedef senf::ConcretePacket<MLDv2ListenerQueryType> packet;
+        typedef PacketTypeMixin<MLDv2ListenerQueryType> mixin;
+        typedef ConcretePacket<MLDv2ListenerQueryType> packet;
         typedef MLDv2ListenerQueryParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
-    typedef MLDv2ListenerQueryType::packet MLDv2ListenerQuery;
+        
+    typedef ConcretePacket<MLDv2ListenerQueryType> MLDv2ListenerQuery;
     
     //#############################################################
     //ICMPv6 MLDv2 (RFC 3810) Multicast Listener Report Message
     //#############################################################
     //First: the Multicast Address Record Parser
-    struct MLDv2AddressRecordParser : public senf::PacketParserBase
+    struct MLDv2AddressRecordParser : public PacketParserBase
     {
-    #   include SENF_PARSER()
-        SENF_PARSER_FIELD   ( recordType, senf::UInt8Parser );
-        SENF_PARSER_PRIVATE_FIELD   ( auxDataLen, senf::UInt8Parser );
-        SENF_PARSER_PRIVATE_FIELD   ( nrOfSrcs, senf::UInt16Parser );
-        SENF_PARSER_FIELD   ( mcAddress, senf::INet6AddressParser);
-        SENF_PARSER_VECTOR  ( srcAddresses, nrOfSrcs, senf::INet6AddressParser );
-        SENF_PARSER_VECTOR  ( auxData, auxDataLen, senf::UInt32Parser );
+#       include SENF_PARSER()
         
+        SENF_PARSER_FIELD   ( recordType, UInt8Parser );
+        SENF_PARSER_PRIVATE_FIELD   ( auxDataLen, UInt8Parser );
+        SENF_PARSER_PRIVATE_FIELD   ( nrOfSrcs, UInt16Parser );
+        SENF_PARSER_FIELD   ( mcAddress, INet6AddressParser);
+        SENF_PARSER_VECTOR  ( srcAddresses, nrOfSrcs, INet6AddressParser );
+        SENF_PARSER_VECTOR  ( auxData, auxDataLen, UInt32Parser );
         
         SENF_PARSER_FINALIZE ( MLDv2AddressRecordParser );
     };
     
-    struct MLDv2ListenerReportParser : public senf::PacketParserBase
+    struct MLDv2ListenerReportParser : public PacketParserBase
     {
-    #   include SENF_PARSER()
-        SENF_PARSER_FIELD   ( reserved, senf::UInt16Parser );   //set to zero by default
-        SENF_PARSER_PRIVATE_FIELD   ( nrMcastAddrRecords_, senf::UInt16Parser );
-        SENF_PARSER_LIST    ( mcastAddrRecords, nrMcastAddrRecords_, MLDv2AddressRecordParser );
+#       include SENF_PARSER()
         
-        SENF_PARSER_INIT() { reserved() = 0; }
+        SENF_PARSER_FIELD   ( reserved, UInt16Parser );   //set to zero by default
+        SENF_PARSER_PRIVATE_FIELD   ( nrMcastAddrRecords_, UInt16Parser );
+        SENF_PARSER_LIST    ( mcastAddrRecords, nrMcastAddrRecords_, MLDv2AddressRecordParser );
         
         SENF_PARSER_FINALIZE ( MLDv2ListenerReportParser );
+        
+        SENF_PARSER_INIT() { 
+            reserved() = 0; 
+        }
     };
     
     struct MLDv2ListenerReportType
-            : public senf::PacketTypeBase,
-            public senf::PacketTypeMixin<MLDv2ListenerReportType>
+        : public PacketTypeBase,
+          public PacketTypeMixin<MLDv2ListenerReportType>
     {
-        typedef senf::PacketTypeMixin<MLDv2ListenerReportType> mixin;
-        typedef senf::ConcretePacket<MLDv2ListenerReportType> packet;
+        typedef PacketTypeMixin<MLDv2ListenerReportType> mixin;
+        typedef ConcretePacket<MLDv2ListenerReportType> packet;
         typedef MLDv2ListenerReportParser parser;
         
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
     };
-    typedef MLDv2ListenerReportType::packet MLDv2ListenerReport;
+        
+    typedef ConcretePacket<MLDv2ListenerReportType> MLDv2ListenerReport;
 }
+
 #endif