Radiotap header format. More...
#include <wipal/phy/rtap_header.hh>
Public Types | |
enum | field { tsft = 0x00000001, flags = 0x00000002, rate = 0x00000004, channel = 0x00000008, fhss = 0x00000010, dbm_antsignal = 0x00000020, dbm_antnoise = 0x00000040, lock_quality = 0x00000080, tx_attenuation = 0x00000100, db_tx_attenuation = 0x00000200, dbm_tx_power = 0x00000400, antenna = 0x00000800, db_antsignal = 0x00001000, db_antnoise = 0x00002000, ext = 0x10000000 } |
typedef rtap::header | exact_type |
typedef HIDDEN | time_type |
Public Member Functions | |
typedef | WP_TYPE_ (time_type, exact_type) time_type |
size_t | len_impl (size_t, bool) const |
time_type | time_get_impl (bool) const |
void | time_set_impl (const time_type &, bool) |
const void * | first_field (size_t caplen) const |
void * | first_field (size_t caplen) |
uint64_t | tsft_get (size_t caplen) const |
size_t | len (size_t caplen, bool swapped) const |
const void * | decapsulate (size_t caplen, bool swapped) const |
time_type | time_get (bool swapped) const |
void | time_set (const time_type &time, bool swapped) |
Downcast methods | |
const exact_type & | exact () const |
exact_type & | exact () |
const exact_type * | exact_ptr () const |
exact_type * | exact_ptr () |
Static Public Member Functions | |
template<class S1 , class S2 > | |
static bool | eq_time (const pkt::packet< S1 > &lhs, const pkt::packet< S2 > &rhs, const unsigned prec, const tool::end::endianness phy_end) |
static bool | eq_80211 (const pkt::packet< S1 > &lhs, const pkt::packet< S2 > &rhs, tool::end::endianness phy_end=tool::end::guess) |
static bool | eq_time_and_80211 (const pkt::packet< S1 > &lhs, const pkt::packet< S2 > &rhs, const unsigned precision, const tool::end::endianness phy_end=tool::end::guess) |
Public Attributes | |
uint8_t | it_version |
uint8_t | it_pad |
uint16_t | it_len |
uint32_t | it_present |
Radiotap header format.
Exact type for this template instanciation.
Reimplemented from wpl::phy::header< rtap::header >.
const void* wpl::phy::header< rtap::header >::decapsulate | ( | size_t | caplen, | |
bool | swapped | |||
) | const [inherited] |
Get the embedded IEEE 802.11 frame.
Return 0 if len() > caplen.
This method relies on len()
. You should not need to override it if your subclasses define a proper len_impl()
.
static bool wpl::phy::header< rtap::header >::eq_80211 | ( | const pkt::packet< S1 > & | lhs, | |
const pkt::packet< S2 > & | rhs, | |||
tool::end::endianness | phy_end = tool::end::guess | |||
) | [inline, static, inherited] |
Compare the IEEE 802.11 bytes beyond the PHY header.
Return whether the two IEEE 802.11 frames embedded inside the PHY headers are equals. This function does not compare the PHY headers.
In case there is not enough bytes to decide whether frames are equal (caplen < sizeof prism::header), consider they are not. This is a conservative approach: when merging two traces, this will lead to both frames having their entry in the merged trace.
This method relies on decapsulate()
. You should not need to override it if your subclasses define a proper decapsulate_impl()
.
static bool wpl::phy::header< rtap::header >::eq_time_and_80211 | ( | const pkt::packet< S1 > & | lhs, | |
const pkt::packet< S2 > & | rhs, | |||
const unsigned | precision, | |||
const tool::end::endianness | phy_end = tool::end::guess | |||
) | [inline, static, inherited] |
Compare the IEEE 802.11 bytes beyond PHY headers, but also check timestamps.
Return whether the two IEEE 802.11 frames embedded inside the PHY headers are equals. Also compare the timestamps of PHY headers if available (or the PCAP timestamps else). When the time difference between each header's field is less than precision
, then consider the field equals.
In case there is not enough bytes to decide whether frames are equal (caplen < sizeof prism::header), consider they are not. This is a conservative approach: when merging two traces, this will lead to both frames having their entry in the merged trace.
This method relies on eq_time()
. You should not need to override it if your subclasses define a proper eq_time()
.
void * wpl::rtap::header::first_field | ( | size_t | caplen | ) | [inline] |
Get the Radiotap header's first field address (or 0 if not available).
Non-const version.
const void * wpl::rtap::header::first_field | ( | size_t | caplen | ) | const [inline] |
Get the Radiotap header's first field address (or 0 if not available).
Const version.
size_t wpl::phy::header< rtap::header >::len | ( | size_t | caplen, | |
bool | swapped | |||
) | const [inherited] |
Get the PHY header length.
Never override this method. Define len_impl()
in subclasses instead.
time_type wpl::phy::header< rtap::header >::time_get | ( | bool | swapped | ) | const [inherited] |
Extract timing information from the PHY header.
Never override this method. Define time_get_impl()
in subclasses instead.
void wpl::phy::header< rtap::header >::time_set | ( | const time_type & | time, | |
bool | swapped | |||
) | [inherited] |
Set the PHY header's timing information.
Never override this method. Define time_set_impl()
in subclasses instead.