X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketParser.hh;h=6c40b2f1fbb2826a55367530724e2dd9606e8dee;hb=83df9651fac5af034774ff9314ee18eeb8a5ec2a;hp=21858ba8a4cbfebd6fbe316acc68752f8e9c92c7;hpb=2c10a733c69cd95e10a312a471c84d07d52b7755;p=senf.git diff --git a/Packets/PacketParser.hh b/Packets/PacketParser.hh index 21858ba..6c40b2f 100644 --- a/Packets/PacketParser.hh +++ b/Packets/PacketParser.hh @@ -325,27 +325,11 @@ namespace senf { These macros simplify providing the above defined interface. A typical packet declaration using these macros has the following form (This is a concrete example from the definition of - the ethernet packet in DefaultBundle//EthernetPacket.hh) - \code - struct Parse_EthVLan : public senf::PacketParserBase - { - SENF_PACKET_PARSER_INIT(Parse_EthVLan); - - // //////////////////////////////////////////////////////////////////////// - - typedef senf::Parse_UIntField < 0, 3 > Parse_Priority; - typedef senf::Parse_Flag < 3 > Parse_CFI; - typedef senf::Parse_UIntField < 4, 16 > Parse_VLanId; - typedef senf::Parse_UInt16 Parse_Type; - - SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS( - ((OverlayField)( priority, Parse_Priority )) - ((OverlayField)( cfi, Parse_CFI )) - ((Field )( vlanId, Parse_VLanId )) - ((Field )( type, Parse_Type )) - ); - }; - \endcode + the ethernet packet in DefaultBundle/EthernetPacket.hh) + + \dontinclude EthernetPacket.hh + \skipline struct Parse_EthVLan : public PacketParserBase + \until }; The macros take care of the following: \li They define the accessor functions returning parsers of the given type.