Add missing doxygen \file comments
[senf.git] / Packets / DefaultBundle / IpV4Packet.hh
index 4c3d977..773345e 100644 (file)
@@ -20,6 +20,9 @@
 // Free Software Foundation, Inc.,
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+/** \file
+    \brief IpV4Packet public header */
+
 #ifndef HH_IpV4Packet_
 #define HH_IpV4Packet_ 1
 
 
 namespace senf {
 
-    ///\addtogroup protocolbundle_default
-    ///@{
+    /** \brief Parse an IpV4 packet
 
-    struct Parse_IpV4 : public PacketParserBase
-    {
-        SENF_PACKET_PARSER_NO_INIT(Parse_IpV4);
+        Parser implementing the IpV4 header. The fields implemented are:
 
-        ///////////////////////////////////////////////////////////////////////////
+        \see IpV4PacketType \n
+            <a href="http://tools.ietf.org/html/rfc791">RFC 791</a>
 
+        \todo Implement options
+     */
+    struct Parse_IpV4 : public PacketParserBase
+    {
         typedef Parse_UIntField <  0,  4 > Parse_Version;
         typedef Parse_UIntField <  4,  8 > Parse_IHL;
         typedef Parse_UInt8                Parse_8bit;
@@ -50,6 +55,10 @@ namespace senf {
         typedef Parse_UIntField <  3, 16 > Parse_Frag;
         typedef Parse_UInt32               Parse_32bit;
 
+#       ifndef DOXYGEN
+
+        SENF_PACKET_PARSER_NO_INIT(Parse_IpV4);
+
         SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
             ((OverlayField)( version,     Parse_Version ))
             ((Field       )( ihl,         Parse_IHL     ))
@@ -66,17 +75,54 @@ namespace senf {
             ((Field       )( source,      Parse_32bit   ))
             ((Field       )( destination, Parse_32bit   )) );
 
+#       else
+
+        Parse_Version version();
+        Parse_IHL ihl();
+        Parse_8bit tos();
+        Parse_16bit length();
+        Parse_16bit identifier();
+        Parse_R reserved();
+        Parse_DF df();
+        Parse_MF mf();
+        Parse_Frag frag();
+        Parse_8bit ttl();
+        Parse_8bit protocol();
+        Parse_16bit crc();
+        Parse_32bit source();
+        Parse_32bit destination();
+
+#       endif
+
         void init() {
             version() = 4;
         }
     };
 
+    /** \brief IP protocol number registry
+
+        This registeres packets with their IP protocol number.
+
+        \see <a href="http://www.iana.org/assignments/protocol-numbers">Protocol numbers</a> \n
+            PacketRegistry
+     */
     struct IpTypes {
-        // See http://www.iana.org/assignments/protocol-numbers
-        // Also used by IPv6
         typedef boost::uint16_t key_t;
     };
 
+    /** \brief IpV4 packet
+        
+        \par Packet type (typedef):
+            \ref IpV4Packet
+
+        \par Fields:
+            \ref Parse_IpV4
+
+        \par Associated registries:
+            \ref IpTypes
+
+        \ingroup protocolbundle_default
+     */
     struct IpV4PacketType
         : public PacketTypeBase,
           public PacketTypeMixin<IpV4PacketType, IpTypes>
@@ -96,9 +142,8 @@ namespace senf {
         static void dump(packet p, std::ostream & os);
     };
         
+    /** \brief IpV4 packet typedef */
     typedef IpV4PacketType::packet IpV4Packet;
-
-    ///@}
 }