From: cni Date: Tue, 9 Dec 2008 16:42:06 +0000 (+0000) Subject: Packets/80211Bundle: some clean-up X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=a58be9dbd48369f2c0469b5c214406d26f1feefa;p=senf.git Packets/80211Bundle: some clean-up git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1010 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/80211Bundle/RadiotapPacket.hh b/Packets/80211Bundle/RadiotapPacket.hh index ea6eee4..28f1beb 100644 --- a/Packets/80211Bundle/RadiotapPacket.hh +++ b/Packets/80211Bundle/RadiotapPacket.hh @@ -148,33 +148,33 @@ namespace senf ( 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;