X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FDefaultBundle%2FIPv6Extensions.hh;h=1b9a1ef28804ff301ae3927d22aba776b0b266a6;hb=9e03cf6e4f35e548a2c384f76da4a1d76fca3fc5;hp=197f5c9264323d5c25a58fbd1ffabfa65980fe19;hpb=601d1f509f5bb24df167a4dd5a20da67a0af9af8;p=senf.git diff --git a/senf/Packets/DefaultBundle/IPv6Extensions.hh b/senf/Packets/DefaultBundle/IPv6Extensions.hh index 197f5c9..1b9a1ef 100644 --- a/senf/Packets/DefaultBundle/IPv6Extensions.hh +++ b/senf/Packets/DefaultBundle/IPv6Extensions.hh @@ -27,6 +27,10 @@ #define HH_SENF_Packets_DefaultBundle_IPv6Extensions_ 1 // Custom includes +#include +#include +#include +#include "ListOptionTypeParser.hh" #include "IPv6Packet.hh" //#include "IPv6Extensions.mpp" @@ -48,11 +52,9 @@ namespace senf { SENF_PARSER_FIELD ( nextHeader , UInt8Parser ); SENF_PARSER_PRIVATE_FIELD ( reserved1 , UInt8Parser ); - SENF_PARSER_BITFIELD ( fragmentOffset , 13, unsigned ); SENF_PARSER_PRIVATE_BITFIELD ( reserved2 , 2, unsigned ); SENF_PARSER_BITFIELD ( moreFragments , 1, bool ); - SENF_PARSER_FIELD ( id , UInt32Parser ); SENF_PARSER_FINALIZE(IPv6PacketParserExtension_Fragment); @@ -109,10 +111,10 @@ namespace senf { /** \brief Parse in IPv6 routing extension header Parser implementing the IPv6 routing Header extension. The fields implemented are: - \image html IPv6Extensions_Routing.png + \image html IPv6Extensions_Routing.png - \see IPv6ExtensionType_Routing \n - RFC 2460 + \see IPv6ExtensionType_Routing \n + RFC 2460 */ //Routing Header Extension (type 0 only) @@ -186,7 +188,6 @@ The Type 0 Routing header has the following format: (RFC 2460) struct IPv6ExtensionType_Routing : public PacketTypeBase, public PacketTypeMixin - { #ifndef DOXYGEN typedef PacketTypeMixin mixin; @@ -225,13 +226,19 @@ The Type 0 Routing header has the following format: (RFC 2460) RFC 2460 */ -// Hop-By-Hop skeleton without Options +// Hop-By-Hop Extension Header struct IPv6PacketParserExtension_HopByHop : public PacketParserBase { # include SENF_PARSER() SENF_PARSER_FIELD ( nextHeader, UInt8Parser ); SENF_PARSER_FIELD ( headerLength, UInt8Parser ); - + + typedef detail::FixedAuxParserPolicy ListOptionTypeAuxPolicy; + typedef detail::ListOptionTypeParser_Policy ListOptionTypePolicy; + typedef ListParser ListOptionTypeParser; + + SENF_PARSER_FIELD ( options, ListOptionTypeParser); + SENF_PARSER_FINALIZE ( IPv6PacketParserExtension_HopByHop ); }; @@ -295,6 +302,7 @@ The Type 0 Routing header has the following format: (RFC 2460) // Destination Options skeleton without TLV-Options struct IPv6PacketParserExtension_Destination : public PacketParserBase { + # include SENF_PARSER() SENF_PARSER_FIELD ( nextHeader, UInt8Parser ); SENF_PARSER_FIELD ( headerLength, UInt8Parser );