#include <trace-tools/wifi/addr.hh>
Public Member Functions | |
addr () | |
addr (const void *a) | |
addr (const std::string &) | |
void | dump (void *) const |
Comparison operators | |
bool | operator< (const addr &) const |
bool | operator== (const addr &) const |
bool | operator!= (const addr &) const |
Address' bytes access | |
uint8_t & | operator[] (unsigned) |
const uint8_t & | operator[] (unsigned) const |
Static Public Member Functions | |
static const addr & | null () |
static const addr & | broadcast () |
wifi::addr::addr | ( | ) | [inline] |
Construct a null address.
wifi::addr::addr | ( | const void * | a | ) | [inline] |
Construct an address from a memory location.
An alternative to using this constructor is to static_cast
the memory location:
void* p = // To some memory containing a 802.11 address. std::cout << *static_cast<addr*> (p) << std::endl;
wifi::addr::addr | ( | const std::string & | str | ) | [inline] |
Construct an address from a string representation.
Example:
addr a (std::string ("00:16:ec:92:84:b8"));
void wifi::addr::dump | ( | void * | a | ) | const [inline] |
Copy to a memory location.
const addr & wifi::addr::null | ( | ) | [inline, static] |
Get 00:00:00:00:00:00
.
const addr & wifi::addr::broadcast | ( | ) | [inline, static] |
Get ff:ff:ff:ff:ff:ff
.