Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Packets / DefaultBundle / NDPOptions.hh
index cefce55..d4cc4a7 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: ICMPv6TypePacket.hh 1449 2009-09-25 23:03:48Z g0dil $
+// $Id$
 //
 // Copyright (C) 2010
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
 // Custom includes
 #include <senf/Packets/Packets.hh>
 #include <senf/Packets/DefaultBundle/EthernetPacket.hh>
-#include <senf/Packets/DefaultBundle/ListOptionTypeParser.hh>
+#include <senf/Packets/DefaultBundle/IPv6Packet.hh>
 
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 namespace senf {
+
     //#############################################################
     //ICMPv6 Neighbor Discovery (RFC 4861) Options
     //#############################################################
@@ -44,11 +46,21 @@ namespace senf {
 
         typedef GenericTLVParserRegistry<NDPOptionParser> Registry;
     };
-    typedef GenericTLVParserBase<NDPOptionParser> NDPGenericOptionParser;
+
+    struct NDPGenericOptionParser : public GenericTLVParserBase<NDPOptionParser>
+    {
+        typedef GenericTLVParserBase<NDPOptionParser> base;
+        NDPGenericOptionParser(data_iterator i, state_type s) : base(i,s) {}
+
+        senf::PacketParserBase::size_type bytes() const
+        {
+            return length()*8;
+        }
+    };
 
     struct NDPSourceLLAddressTLVParser : public NDPOptionParser
     {
-#      include SENF_PARSER()
+#       include SENF_PARSER()
         SENF_PARSER_INHERIT  ( NDPOptionParser );
         SENF_PARSER_FIELD    ( source, MACAddressParser);
         SENF_PARSER_FINALIZE ( NDPSourceLLAddressTLVParser);
@@ -64,7 +76,7 @@ namespace senf {
 
     struct NDPTargetLLAddressTLVParser : public NDPOptionParser
     {
-#      include SENF_PARSER()
+#       include SENF_PARSER()
         SENF_PARSER_INHERIT  ( NDPOptionParser );
         SENF_PARSER_FIELD    ( target, MACAddressParser );
         SENF_PARSER_FINALIZE ( NDPTargetLLAddressTLVParser );
@@ -74,13 +86,17 @@ namespace senf {
             type() = typeId;
             length() = 1;
         }
-        static const UInt8Parser::value_type typeId = 0x02;
+
+        senf::PacketParserBase::size_type bytes(NDPTargetLLAddressTLVParser p) {
+                    return length()*8;
+        }
+        static const type_t::value_type typeId = 0x02;
         void dump(std::ostream & os) const;
     };
 
     struct NDPPrefixInformationTLVParser : public NDPOptionParser
     {
-#      include SENF_PARSER()
+#       include SENF_PARSER()
         SENF_PARSER_INHERIT          ( NDPOptionParser );
         SENF_PARSER_FIELD            ( prefixLength, UInt8Parser );
         SENF_PARSER_BITFIELD         ( l, 1, bool );
@@ -99,13 +115,16 @@ namespace senf {
             reserved1() = 0;
             reserved2() = 0;
         }
+        senf::PacketParserBase::size_type bytes(NDPPrefixInformationTLVParser p) {
+            return length()*8;
+        }
         static const UInt8Parser::value_type typeId = 0x03;
         void dump(std::ostream & os) const;
     };
 
     struct NDPMTUTLVParser : public NDPOptionParser
     {
-#      include SENF_PARSER()
+#       include SENF_PARSER()
         SENF_PARSER_INHERIT          ( NDPOptionParser );
         SENF_PARSER_PRIVATE_BITFIELD ( reserved, 16, unsigned );
         SENF_PARSER_FIELD            ( mtu, UInt32Parser );
@@ -122,9 +141,13 @@ namespace senf {
     };
 }
 
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
+//#include "NDPOptions.cci"
+//#include "NDPOptions.ct"
+//#include "NDPOptions.cti"
 #endif
 
-
+\f
 // Local Variables:
 // mode: c++
 // fill-column: 100