rtap Namespace Reference

Radiotap header related compounds. More...


Classes

struct  header
 Radiotap header format. More...

Functions

void check (const header *h, size_t caplen)
const void * first_field (const header *, size_t caplen)
const void * get_80211 (const header *, size_t caplen)
tool::microseconds get_tsft (const header *, size_t caplen, const void *first_field)
bool eq_80211 (const header *lhs, size_t lhs_caplen, const header *rhs, size_t rhs_caplen)
bool eq_time_and_80211 (const header *lhs, size_t lhs_caplen, const header *rhs, size_t rhs_caplen, unsigned precision=phy::eq_time_default_precision)
const void * get80211 (const header *h, size_t caplen)

Variables

struct rtap::header __packed__


Detailed Description

Radiotap header related compounds.

Function Documentation

void rtap::check ( const header *  h,
size_t  caplen 
)

Throw std::invalid_argument when a radiotap header is not valid.

A radiotap header is considered invalid when:

bool rtap::eq_80211 ( const header *  lhs,
size_t  lhs_caplen,
const header *  rhs,
size_t  rhs_caplen 
)

Compare IEEE 802.11 bytes from radiotap headers.

Return whether two IEEE 802.11 frames embedded inside radiotap headers are equals. This function does not compare the radiotap headers.

In case there is not enough bytes to decide whether frames are equal (caplen is too short), 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.

bool rtap::eq_time_and_80211 ( const header *  lhs,
size_t  lhs_caplen,
const header *  rhs,
size_t  rhs_caplen,
unsigned  precision = phy::eq_time_default_precision 
)

Compare IEEE 802.11 bytes from radiotap headers, but also check MAC time.

Return whether two IEEE 802.11 frames embedded inside radiotap headers are equals. Also compare the TSFT fields of radiotap headers. 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 is too short), 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.

const void * rtap::first_field ( const header *  h,
size_t  caplen 
)

Get the address of a radiotap header's first field (or 0 if not available.

)

Warning:
This function does not check the radiotap header's version.

const void* rtap::get_80211 ( const header *  ,
size_t  caplen 
)

Get a pointer to the IEEE 802.11 frame (or 0 if not available.

)

Warning:
This function does not check the radiotap header is valid.
See also:
check()

tool::microseconds rtap::get_tsft ( const header *  h,
size_t  caplen,
const void *  first_field 
)

Retrieve a radiotap header's TSFT field, or throw std::invalid_argument.

Warning:
This function does not check the radiotap header is valid.
See also:
check()


Generated on Tue Jan 15 19:32:31 2008 for wipal by  doxygen 1.5.4