X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketParser.hh;h=db7a32fbca119361570d012e26c9afcee227aa9a;hb=a3d3979b7daaf22ea63ca356edbfa8047dff7b78;hp=b96395520054de4fed1eefb0d02bf0546b5a908b;hpb=2d6585ff852e9d282c17003ba1db0b73eb3a8500;p=senf.git
diff --git a/Packets/PacketParser.hh b/Packets/PacketParser.hh
index b963955..db7a32f 100644
--- a/Packets/PacketParser.hh
+++ b/Packets/PacketParser.hh
@@ -63,6 +63,11 @@
Every parser is derived from senf::PacketParserBase. This class provides the necessary
housekeeping information and provides the parsers with access to the data.
+
+ \warning Parsers are like iterators: They are invalidated whenever the size of the packet's
+ data is changed. You should not store a parser anywhere. If you want to keep a parser
+ reference, use the senf::SafePacketParser wrapper. You still will need to take extra care to
+ ensure the parser is not invalidated.
*/
#ifndef HH_PacketParser_
@@ -516,6 +521,8 @@ namespace senf {
# define SENF_PACKET_PARSER_DEFINE_FIXED_FIELDS_OFFSET(offset,fields) \
SENF_PACKET_PARSER_I_DEFINE_FIXED_FIELDS(offset,fields)
+ /** \brief Default parser parsing nothing
+ */
struct VoidPacketParser
: public PacketParserBase
{
@@ -534,8 +541,10 @@ namespace senf {
location will \e not be updated accordingly and therefore the parser will be
invalid.
- Additionally a SafePacketparser has an uninitialized state. The only allowed operations in
+ Additionally a SafePacketParser has an uninitialized state. The only allowed operations in
this state are the boolean test for validity and assigning another parser.
+
+ \ingroup packetparser
*/
template
class SafePacketParser
@@ -599,13 +608,3 @@ namespace senf {
// comment-column: 40
// End:
-// LocalWords: templated PacketParser defgroup packetparser PacketParsers li
-// LocalWords: EthernetParser ethertype UInt senf PacketParserBase tt
-// LocalWords: struct FooParser const init endcode ingroup param SomeParser
-// LocalWords: ethernet DefaultBundle EthernetPacket hh EthVLan UIntField CFI
-// LocalWords: VLanId OverlayField cfi vlanId accessor defaultInit bitfield
-// LocalWords: SomePacket SimpleVectorSizer packetparsermacros Fraunhofer std
-// LocalWords: hideinitializer Institut fuer offene Kommunikationssysteme STL
-// LocalWords: FOKUS Kompetenzzentrum Satelitenkommunikation SatCom Bund cerr
-// LocalWords: berlios dil Structors someField someVector someOtherField
-// LocalWords: TruncatedPacketException