( novalue( disable_##name, VoidPacketParser )) \
( id( name, parser )) );
- /* */
+ /* macro to create padding parser */
#define SKIP_OPTIONAL_PADDING(cond, parser, size) \
SENF_PARSER_SKIP( \
(cond ? (size - (parser##__offset() + \
senf::bytes(parser##_())) % size) % size : 0) , 0 );
- OPTIONAL_FIELD ( tsft, UInt64LSBParser );
- OPTIONAL_FIELD ( flags, RadiotapPacketParser_Flags );
- OPTIONAL_FIELD ( rate, UInt8Parser );
- SKIP_OPTIONAL_PADDING(channelOptionsPresent(), rate, 2);
- OPTIONAL_FIELD ( channelOptions, RadiotapPacketParser_ChannelOptions ) ;
- SKIP_OPTIONAL_PADDING(fhssPresent(), channelOptions, 2);
- OPTIONAL_FIELD ( fhss, UInt16LSBParser );
- OPTIONAL_FIELD ( dbmAntennaSignal, Int8Parser );
- OPTIONAL_FIELD ( dbmAntennaNoise, Int8Parser );
- SKIP_OPTIONAL_PADDING(lockQualityPresent(), dbmAntennaNoise, 2);
- OPTIONAL_FIELD ( lockQuality, UInt16LSBParser );
- SKIP_OPTIONAL_PADDING(txAttenuationPresent(), lockQuality, 2);
- OPTIONAL_FIELD ( txAttenuation, UInt16LSBParser );
- SKIP_OPTIONAL_PADDING(dbTxAttenuationPresent(), txAttenuation, 2);
- OPTIONAL_FIELD ( dbTxAttenuation, UInt16LSBParser );
- OPTIONAL_FIELD ( dbmTxAttenuation, Int8Parser );
- OPTIONAL_FIELD ( antenna, UInt8Parser );
- OPTIONAL_FIELD ( dbAntennaSignal, UInt8Parser );
- OPTIONAL_FIELD ( dbAntennaNoise, UInt8Parser );
- SKIP_OPTIONAL_PADDING(fcsPresent(), dbAntennaNoise, 4)
- OPTIONAL_FIELD ( fcs, UInt32Parser );
+ OPTIONAL_FIELD ( tsft, UInt64LSBParser );
+ OPTIONAL_FIELD ( flags, RadiotapPacketParser_Flags );
+ OPTIONAL_FIELD ( rate, UInt8Parser );
+ SKIP_OPTIONAL_PADDING ( channelOptionsPresent(), rate, 2 );
+ OPTIONAL_FIELD ( channelOptions, RadiotapPacketParser_ChannelOptions ) ;
+ SKIP_OPTIONAL_PADDING ( fhssPresent(), channelOptions, 2 );
+ OPTIONAL_FIELD ( fhss, UInt16LSBParser );
+ OPTIONAL_FIELD ( dbmAntennaSignal, Int8Parser );
+ OPTIONAL_FIELD ( dbmAntennaNoise, Int8Parser );
+ SKIP_OPTIONAL_PADDING ( lockQualityPresent(), dbmAntennaNoise, 2 );
+ OPTIONAL_FIELD ( lockQuality, UInt16LSBParser );
+ SKIP_OPTIONAL_PADDING ( txAttenuationPresent(), lockQuality, 2 );
+ OPTIONAL_FIELD ( txAttenuation, UInt16LSBParser );
+ SKIP_OPTIONAL_PADDING ( dbTxAttenuationPresent(), txAttenuation, 2 );
+ OPTIONAL_FIELD ( dbTxAttenuation, UInt16LSBParser );
+ OPTIONAL_FIELD ( dbmTxAttenuation, Int8Parser );
+ OPTIONAL_FIELD ( antenna, UInt8Parser );
+ OPTIONAL_FIELD ( dbAntennaSignal, UInt8Parser );
+ OPTIONAL_FIELD ( dbAntennaNoise, UInt8Parser );
+ SKIP_OPTIONAL_PADDING ( fcsPresent(), dbAntennaNoise, 4 );
+ OPTIONAL_FIELD ( fcs, UInt32Parser );
SENF_PARSER_INIT() {
version() = 0;