Packets: some minor GenericTLV clean ups
[senf.git] / senf / Packets / DefaultBundle / ICMPv6TypePacket.hh
index 067f34e..e1b1c02 100644 (file)
@@ -106,6 +106,8 @@ namespace senf {
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
+        
+        static void dump(packet p, std::ostream & os);
     };
         
     typedef ConcretePacket<ICMPv6EchoReplyType> ICMPv6EchoReply;
@@ -161,6 +163,8 @@ namespace senf {
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
+        
+        static void dump(packet p, std::ostream & os);
     };
         
     typedef ConcretePacket<ICMPv6ErrDestUnreachableType> ICMPv6ErrDestUnreachable;
@@ -174,10 +178,10 @@ namespace senf {
         SENF_PARSER_FIELD ( mtu, UInt32Parser );
     
         /*   Code     static set to 0       */
-    //     SENF_PARSER_INIT() {
-    //         ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
-    //         icmpv6->code() = 0;
-    //     }
+        SENF_PARSER_INIT() {
+            ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
+            icmpv6->code() = 0;
+        }
         
         SENF_PARSER_FINALIZE ( ICMPv6ErrTooBigParser );
     };
@@ -204,6 +208,8 @@ namespace senf {
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
+        
+        static void dump(packet p, std::ostream & os);
     };
 
     typedef ConcretePacket<ICMPv6ErrTooBigType> ICMPv6ErrTooBig;
@@ -218,7 +224,8 @@ namespace senf {
         SENF_PARSER_FIELD    ( unused, UInt32Parser );
         /*  Code    0 - Hop limit exceeded in transit
                     1 - Fragment reassembly time exceeded   */
-        void setErrCode(int code){
+        void setErrCode(int code)
+        {
             ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
             icmpv6->code() = code;
         }
@@ -248,6 +255,8 @@ namespace senf {
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
+        
+        static void dump(packet p, std::ostream & os);
     };
     typedef ConcretePacket<ICMPv6ErrTimeExceededType> ICMPv6ErrTimeExceeded;
     
@@ -263,7 +272,8 @@ namespace senf {
                     1 - Unrecognized Next Header type encountered
                     2 - Unrecognized IPv6 option encountered          */
         
-        void setErrCode(int code){
+        void setErrCode(int code)
+        {
             ICMPv6Packet icmpv6 (packet().rfind<ICMPv6Packet>(senf::nothrow));
             icmpv6->code() = code;
         }
@@ -292,6 +302,8 @@ namespace senf {
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
+        
+        static void dump(packet p, std::ostream & os);
     };
     typedef ConcretePacket<ICMPv6ErrParamProblemType> ICMPv6ErrParamProblem;
     
@@ -351,6 +363,8 @@ namespace senf {
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
+        
+        static void dump(packet p, std::ostream & os);
     };
         
     typedef ConcretePacket<MLDv2ListenerQueryType> MLDv2ListenerQuery;
@@ -411,6 +425,8 @@ namespace senf {
         using mixin::nextPacketRange;
         using mixin::init;
         using mixin::initSize;
+        
+        static void dump(packet p, std::ostream & os);
     };
         
     typedef ConcretePacket<MLDv2ListenerReportType> MLDv2ListenerReport;