prefix_ void senf::WLANPacket_MgtFrameParser::sequenceNumber(boost::uint16_t sn)
{
- seqNumber_2() = seqNumber_2() | (sn >> 4 ) ;
- seqNumber_1() = seqNumber_1() | sn;
+ seqNumber_2() = 0u | (sn >> 4 ) ;
+ seqNumber_1() = 0u | sn;
}
prefix_ void senf::WLANPacket_MgtFrameType::dump(packet p, std::ostream &os)
prefix_ void senf::WLANPacket_DataFrameParser::sequenceNumber(boost::uint16_t sn)
{
- seqNumber_2() = seqNumber_2() | (sn >> 4 ) ;
- seqNumber_1() = seqNumber_1() | sn;
+ seqNumber_2() = 0u | (sn >> 4 ) ;
+ seqNumber_1() = 0u | sn;
}
p->bssid() = senf::MACAddress::from_string("00:1a:4d:3e:c7:5c")
);
SENF_CHECK_NO_THROW(
- p->sequenceNumber(555u);
+ p->sequenceNumber(2);
+ p->sequenceNumber(p->sequenceNumber()+1);
);
-
- std::cout << p->sequenceNumber() << "\n";
BOOST_CHECK_EQUAL( p->type(), 0u );
- BOOST_CHECK_EQUAL( p->sequenceNumber(), 555u );
+ BOOST_CHECK_EQUAL( p->sequenceNumber(), 3u );
}