#include <wipal/phy/avs_header.hh>
Classes | |
struct | v2_extra_fields |
Extra fields when header's version is 2. More... | |
Public Types | |
Static hierarchies related types | |
typedef HIDDEN | time_type |
Public Member Functions | |
uint64_t | mactime_get () const |
uint64_t | hosttime_get () 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 | |
static bool | eq_80211 (const pcapxx::frame_descriptor< D1 > &lhs, const pcapxx::frame_descriptor< D2 > &rhs, tool::endian::endianness phy_end=tool::endian::guess) |
static bool | eq_time_and_80211 (const pcapxx::frame_descriptor< D1 > &lhs, const pcapxx::frame_descriptor< D2 > &rhs, const unsigned precision, const tool::endian::endianness phy_end=tool::endian::guess) |
Public Attributes | |
struct avs::header::v2_extra_fields | __packed__ |
uint32_t | version |
uint32_t | length |
uint64_t | mactime |
uint64_t | hosttime |
uint32_t | phytype |
uint32_t | channel |
uint32_t | datarate |
uint32_t | antenna |
uint32_t | priority |
uint32_t | ssi_type |
uint32_t | ssi_signal |
uint32_t | ssi_noise |
uint32_t | preamble |
uint32_t | encoding |
v2_extra_fields | v2_fields [] |
Static hierarchies related types and methods. | |
typedef avs::header | exact_type |
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) |
template<class D1 , class D2 > | |
static bool | eq_time (const pcapxx::frame_descriptor< D1 > &lhs, const pcapxx::frame_descriptor< D2 > &rhs, const unsigned prec, const tool::endian::endianness phy_end) |
typedef avs::header avs::header::exact_type |
Exact type for this template instanciation.
Reimplemented from phy::header< avs::header >.
const void* phy::header< avs::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 phy::header< avs::header >::eq_80211 | ( | const pcapxx::frame_descriptor< D1 > & | lhs, | |
const pcapxx::frame_descriptor< D2 > & | rhs, | |||
tool::endian::endianness | phy_end = tool::endian::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 phy::header< avs::header >::eq_time_and_80211 | ( | const pcapxx::frame_descriptor< D1 > & | lhs, | |
const pcapxx::frame_descriptor< D2 > & | rhs, | |||
const unsigned | precision, | |||
const tool::endian::endianness | phy_end = tool::endian::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()
.
exact_type& tool::static_base< avs::header >::exact | ( | ) | [inherited] |
Safely downcast to the exact type as a non-const reference.
const exact_type& tool::static_base< avs::header >::exact | ( | ) | const [inherited] |
Safely downcast to the exact type as a const reference.
exact_type* tool::static_base< avs::header >::exact_ptr | ( | ) | [inherited] |
Safely downcast to the exact type as a non-const pointer.
const exact_type* tool::static_base< avs::header >::exact_ptr | ( | ) | const [inherited] |
Safely downcast to the exact type as a const pointer.
uint64_t avs::header::hosttime_get | ( | ) | const [inline] |
Get the hosttime field after endianness adjustments.
size_t phy::header< avs::header >::len | ( | size_t | caplen, | |
bool | swapped | |||
) | const [inherited] |
Get the PHY header length.
Never override this method. Define len_impl()
in subclasses instead.
uint64_t avs::header::mactime_get | ( | ) | const [inline] |
Get the mactime field after endianness adjustments.
time_type phy::header< avs::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 phy::header< avs::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.
Extra fields when header's version is 2.
uint32_t avs::header::antenna |
< Antenna.
uint32_t avs::header::channel |
< PHY channel (frequency).
uint32_t avs::header::datarate |
< PHY data rate.
uint32_t avs::header::encoding |
< PHY encoding type (e.g. QPSK).
uint64_t avs::header::hosttime |
< Host timestamp.
uint32_t avs::header::length |
< Header length.
uint64_t avs::header::mactime |
< MAC timestamp.
uint32_t avs::header::phytype |
< PHY type (i.e. modulation).
uint32_t avs::header::preamble |
< Preamble type (short, long).
uint32_t avs::header::priority |
< Priority.
uint32_t avs::header::ssi_noise |
< SSI noise.
uint32_t avs::header::ssi_signal |
< SSI signal.
uint32_t avs::header::ssi_type |
< SSI type.
uint32_t avs::header::version |
< Header revision.