Packets/DefaultBundle: Fix packet parser documentation using #ifndef DOXYGEN guards
g0dil [Tue, 24 Jul 2007 12:34:46 +0000 (12:34 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@346 270642c3-0616-0410-b53a-bc976706d245

Packets/DefaultBundle/EthernetPacket.hh
Packets/DefaultBundle/IpV4Packet.hh
Packets/DefaultBundle/IpV6Extensions.hh
Packets/DefaultBundle/IpV6Packet.hh
Packets/DefaultBundle/UDPPacket.hh

index f40d755..ebb07ae 100644 (file)
@@ -76,29 +76,30 @@ namespace senf {
     
     /** \brief Parse an Ethernet packet
 
-        Parser implementing an ethernet header. The fields implemented are
-
-        <table class="senf">
-        <tr> <th>Field name</th>  <th>Parser type</th>     </tr>
-        <tr> <td>destination</td> <td>\ref Parse_MAC</td>  </tr>
-        <tr> <td>source</td>      <td>\ref Parse_MAC</td>  </tr>
-        <tr> <td>type</td>        <td>\ref Parse_Type</td> </tr>
-        </table>
+        Parser implementing an ethernet header.
 
         \see EthernetPacketType
      */
     struct Parse_Ethernet : public PacketParserBase
     {
-        SENF_PACKET_PARSER_INIT(Parse_Ethernet);
+        typedef Parse_UInt16                      Parse_Type;
 
-        ///////////////////////////////////////////////////////////////////////////
+#       ifndef DOXYGEN
 
-        typedef Parse_UInt16                      Parse_Type;
+        SENF_PACKET_PARSER_INIT(Parse_Ethernet);
 
         SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
             ((Field)( destination, Parse_MAC  ))
             ((Field)( source,      Parse_MAC  ))
             ((Field)( type,        Parse_Type )) );
+
+#       else
+
+        Parse_MAC destination();
+        Parse_MAC source();
+        Parse_Type type();
+
+#       endif
     };
 
     /** \brief EtherType registry
@@ -154,32 +155,33 @@ namespace senf {
         
         Parser interpreting the ethernet VLAN tag. Fields are
 
-        <table class="senf">
-        <tr> <th>Field name</th><th>Parser type</th></tr>
-        <tr><td>priority</td><td>\ref Parse_Priority</td></tr>
-        <tr><td>cfi</td><td>\ref Parse_CFI</td></tr>
-        <tr><td>vlanId</td><td>\ref Parse_VLanId</td></tr>
-        <tr><td>type</td><td>\ref Parse_Type</td></tr>
-        </table>
-
         \see EthVLanPacketType
      */
     struct Parse_EthVLan : public PacketParserBase
     {
-        SENF_PACKET_PARSER_INIT(Parse_EthVLan);
-
-        ///////////////////////////////////////////////////////////////////////////
-
         typedef Parse_UIntField < 0,  3 > Parse_Priority;
         typedef Parse_Flag          < 3 > Parse_CFI;
         typedef Parse_UIntField < 4, 16 > Parse_VLanId;
         typedef Parse_UInt16              Parse_Type;
 
+#       ifndef DOXYGEN
+
+        SENF_PACKET_PARSER_INIT(Parse_EthVLan);
+
         SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
             ((OverlayField)( priority, Parse_Priority ))
             ((OverlayField)( cfi,      Parse_CFI      ))
             ((Field       )( vlanId,   Parse_VLanId   ))
             ((Field       )( type,     Parse_Type     )) );
+
+#       else
+
+        Parse_Priority priority();
+        Parse_CFI cfi();
+        Parse_VLanId vlanId();
+        Parse_Type type();
+
+#       endif
     };
 
     /** \brief Ethernet VLAN tag
index 94a6823..8bd7c69 100644 (file)
@@ -35,24 +35,6 @@ namespace senf {
 
         Parser implementing the IpV4 header. The fields implemented are:
 
-        <table class="senf">
-            <tr><th>Field name</th><th>Parser type</th></tr>
-            <tr><td>version</td><td>\ref Parse_Version</td></tr>
-            <tr><td>ihl</td><td>\ref Parse_IHL</td></tr>
-            <tr><td>tos</td><td>\ref Parse_8bit</td></tr>
-            <tr><td>length</td><td>\ref Parse_16bit</td></tr>
-            <tr><td>identifier</td><td>\ref Parse_16bit</td></tr>
-            <tr><td>reserved</td><td>\ref Parse_R</td></tr>
-            <tr><td>df</td><td>\ref Parse_DF</td></tr>
-            <tr><td>mf</td><td>\ref Parse_MF</td></tr>
-            <tr><td>frag</td><td>\ref Parse_Frag</td></tr>
-            <tr><td>ttl</td><td>\ref Parse_8bit</td></tr>
-            <tr><td>protocol</td><td>\ref Parse_8bit</td></tr>
-            <tr><td>crc</td><td>\ref Parse_16bit</td></tr>
-            <tr><td>source</td><td>\ref Parse_32bit</td></tr>
-            <tr><td>destination</td><td>\ref Parse_32bit</td></tr>
-        </table>
-
         \see IpV4PacketType \n
             <a href="http://tools.ietf.org/html/rfc791">RFC 791</a>
 
@@ -60,10 +42,6 @@ namespace senf {
      */
     struct Parse_IpV4 : public PacketParserBase
     {
-        SENF_PACKET_PARSER_NO_INIT(Parse_IpV4);
-
-        ///////////////////////////////////////////////////////////////////////////
-
         typedef Parse_UIntField <  0,  4 > Parse_Version;
         typedef Parse_UIntField <  4,  8 > Parse_IHL;
         typedef Parse_UInt8                Parse_8bit;
@@ -74,6 +52,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     ))
@@ -90,6 +72,25 @@ 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;
         }
index 4817348..a0bd5b0 100644 (file)
@@ -36,31 +36,21 @@ namespace senf {
         
         Parser implementing the IpV6 fragment extension. The fields implemented are:
 
-        <table class="senf">
-            <tr><th>Field name</th><th>Parser type</th></tr>
-            <tr><td>nextHeader</td><td>\ref Parse_8bit</td></tr>
-            <tr><td>reserved1</td><td>\ref Parse_8bit</td></tr>
-            <tr><td>fragmentOffset</td><td>\ref Parse_Offset</td></tr>
-            <tr><td>reserved2</td><td>\ref Parse_Reserved</td></tr>
-            <tr><td>moreFragments</td><td>\ref Parse_More</td></tr>
-            <tr><td>id</td><td>\ref Parse_32bit</td></tr>
-        </table>
-
         \see IpV6ExtensionType_Fragment \n
             <a href="http://tools.ietf.org/html/rfc2460">RFC 2460</a>
      */
     struct Parse_IpV6Extension_Fragment : public PacketParserBase
     {
-        SENF_PACKET_PARSER_INIT(Parse_IpV6Extension_Fragment);
-
-        ///////////////////////////////////////////////////////////////////////////
-
         typedef Parse_UInt8                Parse_8bit;
         typedef Parse_UIntField <  0, 13 > Parse_Offset;
         typedef Parse_UIntField < 13, 15 > Parse_Reserved;
         typedef Parse_Flag      < 15     > Parse_More;
         typedef Parse_UInt32               Parse_32bit;
 
+#       ifndef DOXYGEN
+
+        SENF_PACKET_PARSER_INIT(Parse_IpV6Extension_Fragment);
+
         SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
             ((Field       )( nextHeader     , Parse_8bit     ))
             ((Field       )( reserved1      , Parse_8bit     ))
@@ -68,6 +58,17 @@ namespace senf {
             ((OverlayField)( reserved2      , Parse_Reserved ))
             ((Field       )( moreFragments  , Parse_More     ))
             ((Field       )( id             , Parse_32bit    )) );
+
+#       else
+
+        Parse_8bit nextHeader();
+        Parse_8bit reserved1();
+        Parse_Offset fragmentOffset();
+        Parse_Reserved reserved2();
+        Parse_More moreFragments();
+        Parse_32bit id();
+
+#       endif
     };
 
     /** \brief IpV6 fragment extension
index 33ccb8b..112afdc 100644 (file)
@@ -37,27 +37,11 @@ namespace senf {
 
         Parser implementing the IpV6 header. The fields implemented are:
 
-        <table class="senf">
-            <tr><th>Field name</th><th>Parser type</th></tr>
-            <tr><td>version</td><td>\ref Parse_Version</td></tr>
-            <tr><td>trafficClass</td><td>\ref Parse_Class</td></tr>
-            <tr><td>flowLabel</td><td>\ref Parse_FlowLabel</td></tr>
-            <tr><td>length</td><td>\ref Parse_16bit</td></tr>
-            <tr><td>nextHeader</td><td>\ref Parse_8bit</td></tr>
-            <tr><td>hopLimit</td><td>\ref Parse_8bit</td></tr>
-            <tr><td>source</td><td>\ref Parse_Addr</td></tr>
-            <tr><td>destination</td><td>\ref Parse_Addr</td></tr>
-        </table>
-
         \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;
@@ -66,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     ))
@@ -76,6 +64,19 @@ namespace senf {
             ((Field       )( source,       Parse_Addr      ))
             ((Field       )( destination,  Parse_Addr      )) );
 
+#       else
+
+        Parse_Version version();
+        Parse_Class trafficClass();
+        Parse_FlowLabel flowLabel();
+        Parse_16bit length();
+        Parse_8bit nextHeader();
+        Parse_8bit hopLimit();
+        Parse_Addr source();
+        Parse_Addr destination();
+
+#       endif
+
         void init() {
             version() = 6;
         }
index 615c530..5ea93db 100644 (file)
@@ -35,30 +35,31 @@ namespace senf {
 
         Parser implementing the UDP header. The fields implemented are:
 
-        <table class="senf">
-            <tr><th>Field name</th><th>Parser type</th></tr>
-            <tr><td>source</td><td>\ref Parse_16bit</td></tr>
-            <tr><td>destination</td><td>\ref Parse_16bit</td></tr>
-            <tr><td>length</td><td>\ref Parse_16bit</td></tr>
-            <tr><td>crc</td><td>\ref Parse_16bit</td></tr>
-        </table>
-
         \see UDPPacketType
             <a href="http://tools.ietf.org/html/rfc768">RFC 768</a>
      */
     struct Parse_UDP : public PacketParserBase
     {
-        SENF_PACKET_PARSER_INIT(Parse_UDP);
+        typedef Parse_UInt16 Parse_16bit;
 
-        ///////////////////////////////////////////////////////////////////////////
+#       ifndef DOXYGEN
 
-        typedef Parse_UInt16 Parse_16bit;
+        SENF_PACKET_PARSER_INIT(Parse_UDP);
 
         SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS(
             ((Field)( source,      Parse_16bit ))
             ((Field)( destination, Parse_16bit ))
             ((Field)( length,      Parse_16bit ))
             ((Field)( crc,         Parse_16bit )) );
+
+#       else
+
+        Parse_16bit source();
+        Parse_16bit destination();
+        Parse_16bit length();
+        Parse_16bit crc();
+
+#       endif
     };
 
     /** \brief UDP packet