return addr1();
}
-//shift some bits to read the 12bit sequence number bit field in LSB byte order
-prefix_ boost::uint16_t senf::WLANPacket_MgtFrameParser::sequenceNumber()
- const
-{
- boost::uint16_t seqN = 0;
- seqN |= seqNumber_2();
- seqN <<= 4;
- seqN |= seqNumber_1();
- return seqN;
-}
-
-//shift some bits to read the 12bit sequence number bit field in LSB byte order
-prefix_ boost::uint16_t senf::WLANPacket_DataFrameParser::sequenceNumber()
- const
-{
- boost::uint16_t seqN = 0;
- seqN |= seqNumber_2();
- seqN <<= 4;
- seqN |= seqNumber_1();
- return seqN;
-}
prefix_ void senf::WLANPacketType::dump(packet p, std::ostream &os)
{
//this is needed due to the goto in the WLANPacketParser. Don't know exactly why yet.
SENF_PARSER_INIT() {}
- boost::uint16_t sequenceNumber() const;
+ boost::uint16_t sequenceNumber() const {
+ return (uint16_t)(seqNumber_2()) << 4 | seqNumber_1();
+ };
};
/** \brief Control frame parser
//this is needed to due to the goto in the WLANPacketParser. Don't know exactly why yet.
SENF_PARSER_INIT() {}
- boost::uint16_t sequenceNumber() const;
+ boost::uint16_t sequenceNumber() const {
+ return (uint16_t)(seqNumber_2()) << 4 | seqNumber_1();
+ };
MACAddressParser receiverAddress() const { return addr1(); }; //ra is always addr1
MACAddressParser transmitterAddress() const { return addr2(); }; //ta is always addr2