X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FDefaultBundle%2FIpV6Packet.hh;h=33b5fc2ae8970f835f8e57bee843ef08b0a136f0;hb=aa8de2975f5365cd4f29f6f337f93ad328f6685c;hp=b332a9846b5b892fd716d23f79ef3ba287012d31;hpb=2d6585ff852e9d282c17003ba1db0b73eb3a8500;p=senf.git diff --git a/Packets/DefaultBundle/IpV6Packet.hh b/Packets/DefaultBundle/IpV6Packet.hh index b332a98..33b5fc2 100644 --- a/Packets/DefaultBundle/IpV6Packet.hh +++ b/Packets/DefaultBundle/IpV6Packet.hh @@ -33,16 +33,15 @@ namespace senf { - ///\addtogroup protocolbundle_default - ///@{ + /** \brief Parse an IpV6 packet - // See RFC2460 + Parser implementing the IpV6 header. The fields implemented are: + + \see IpV6PacketType \n + RFC 2460 + */ 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 @@ -85,6 +114,7 @@ namespace senf { static void dump(packet p, std::ostream & os); }; + /** \brief IpV6 packet typedef */ typedef IpV6PacketType::packet IpV6Packet; ///@}