Packets documentation updates
[senf.git] / Packets / DefaultBundle / EthernetPacket.hh
index 6991f9d..4332391 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Thorsten Horstmann <tho@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -23,8 +23,8 @@
 /** \file
     \brief EthernetPacket public header */
 
-#ifndef HH_EthernetPacket_
-#define HH_EthernetPacket_ 1
+#ifndef HH_SENF_Packets_DefaultBundle_EthernetPacket_
+#define HH_SENF_Packets_DefaultBundle_EthernetPacket_ 1
 
 // Custom includes
 #include <algorithm>
@@ -85,7 +85,6 @@ namespace senf {
             \ref PacketRegistry
      */
     struct EtherTypes {
-        // See 
         typedef boost::uint16_t key_t;
     };
 
@@ -96,6 +95,7 @@ namespace senf {
 
         \par Fields:
             \ref EthernetPacketParser
+            \image html EthernetPacket.png
 
         \par Associated registries:
             \ref EtherTypes
@@ -111,15 +111,17 @@ namespace senf {
     {
 #ifndef DOXYGEN
         typedef PacketTypeMixin<EthernetPacketType, EtherTypes> mixin;
+#endif
         typedef ConcretePacket<EthernetPacketType> packet;
         typedef EthernetPacketParser parser;
-#endif
+
         using mixin::nextPacketRange;
         using mixin::initSize;
         using mixin::init;
 
         static factory_t nextPacketType(packet p);
-        static void dump(packet p, std::ostream & os);
+        /// Dump given EthernetPacket in readable form to given output stream
+        static void dump(packet p, std::ostream & os); 
         static void finalize(packet p);
     };
 
@@ -152,7 +154,8 @@ namespace senf {
 
         \par Fields:
             \ref EthVLanPacketParser
-
+            \image html EthVLanPacket.png
+        
         \par Associated registries:
             \ref EtherTypes
 
@@ -167,9 +170,10 @@ namespace senf {
     {
 #ifndef DOXYGEN
         typedef PacketTypeMixin<EthVLanPacketType, EtherTypes> mixin;
+#endif
         typedef ConcretePacket<EthVLanPacketType> packet;
         typedef EthVLanPacketParser parser;
-#endif
+
         using mixin::nextPacketRange;
         using mixin::nextPacketType;
         using mixin::initSize;
@@ -177,9 +181,10 @@ namespace senf {
 
         /** \todo Add LLC/SNAP support -> only use the registry
             for type() values >=1536, otherwise expect an LLC header */
-        static registry_key_t nextPacketKey(packet p) 
+        static key_t nextPacketKey(packet p) 
             { return p->type(); }
 
+        /// Dump given EthVLanPacket in readable form to given output stream
         static void dump(packet p, std::ostream & os);
         static void finalize(packet p);
     };