added first structure for ULE SNDU Packet
[senf.git] / Packets / DefaultBundle / IpV6Packet.hh
index b332a98..33b5fc2 100644 (file)
 
 namespace senf {
 
-    ///\addtogroup protocolbundle_default
-    ///@{
+    /** \brief Parse an IpV6 packet
 
-    // See RFC2460
+        Parser implementing the IpV6 header. The fields implemented are:
+
+        \see IpV6PacketType \n
+            <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
+     */
     struct Parse_IpV6 : public PacketParserBase
     {
-        SENF_PACKET_PARSER_NO_INIT(Parse_IpV6);
-
-        ///////////////////////////////////////////////////////////////////////////
-
         typedef Parse_UIntField <  0,  4 > Parse_Version;
         typedef Parse_UIntField <  4, 12 > Parse_Class;
         typedef Parse_UIntField < 12, 32 > Parse_FlowLabel;
@@ -51,6 +50,10 @@ namespace senf {
 
         typedef Parse_Array < 16, Parse_8bit > Parse_Addr;
 
+#       ifndef DOXYGEN
+
+        SENF_PACKET_PARSER_NO_INIT(Parse_IpV6);
+
         SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
             ((OverlayField)( version,      Parse_Version   ))
             ((OverlayField)( trafficClass, Parse_Class     ))
@@ -61,11 +64,37 @@ namespace senf {
             ((Field       )( source,       Parse_Addr      ))
             ((Field       )( destination,  Parse_Addr      )) );
 
+#       else
+
+        Parse_Version   version() const;
+        Parse_Class     trafficClass() const;
+        Parse_FlowLabel flowLabel() const;
+        Parse_16bit     length() const;
+        Parse_8bit      nextHeader() const;
+        Parse_8bit      hopLimit() const;
+        Parse_Addr      source() const;
+        Parse_Addr      destination() const;
+
+#       endif
+
         void init() {
             version() = 6;
         }
     };
 
+    /** \brief IpV6 packet
+
+        \par Packet type (typedef):
+            \ref IpV6Packet
+        
+        \par Fields:
+            \ref Parse_IpV6
+
+        \par Associated registries:
+            \ref IpTypes
+
+        \ingroup protocolbundle_default
+     */
     struct IpV6PacketType
         : public PacketTypeBase,
           public PacketTypeMixin<IpV6PacketType, IpTypes>
@@ -85,6 +114,7 @@ namespace senf {
         static void dump(packet p, std::ostream & os);
     };
 
+    /** \brief IpV6 packet typedef */
     typedef IpV6PacketType::packet IpV6Packet;
 
     ///@}