X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=HowTos%2FNewPacket%2FMainpage.dox;h=054754398b4185c3a93067243e39cbf9853c4bd8;hb=3ccce76c61833d1cac9e1a2e34dcc670b93c6b3f;hp=38948069250d9006b6b611681959edff6c3ced1e;hpb=ef9940d989277e814988967b0022bfdd13542045;p=senf.git diff --git a/HowTos/NewPacket/Mainpage.dox b/HowTos/NewPacket/Mainpage.dox index 3894806..0547543 100644 --- a/HowTos/NewPacket/Mainpage.dox +++ b/HowTos/NewPacket/Mainpage.dox @@ -276,18 +276,15 @@ definition to generate a more usable interface: \code - SENF_PARSER_PRIVATE_VARIANT ( optionalFields_, checksumPresent, - (novalue(disable_checksum, senf::VoidPacketParser)) - ( id(checksum, GREPacketParser_OptFields)) ); + SENF_PARSER_VARIANT ( optionalFields_, checksumPresent, + (novalue(disable_checksum, senf::VoidPacketParser)) + ( id(checksum, GREPacketParser_OptFields)) ); \endcode - Here, we changed to things: - \li We made the variant private - \li We added some optional information to the variants type list + Here, we added some optional information to the variants type list. - With this information, \ref SENF_PARSER_PRIVATE_VARIANT() will create some additional \e public - accessor members (those are public, only the variant itself is private). The members generated - work like: + With this information, \ref SENF_PARSER_VARIANT() will create some additional \e public accessor + members and will automatically make the variant itself private. The members generated work like: \code void disable_checksum() const { optionalFields_().init<0>; } @@ -942,7 +939,7 @@ senf::EthernetPacket eth (senf::EthernetPacket::create(senf::noinit)); isock.read(eth.data(),0u); GREPacket gre (senf::GREPacket::createBefore(eth)); - gre.finalize(); + gre.finalizeAll(); osock.write(gre.data()); } }