wifi::frame Namespace Reference

IEEE 802.11 frames compounds and operations. More...


Classes

struct  dissector_default_hooks
 Default (empty) hooks to be used with dissector. More...
struct  dissector
 IEEE 802.11 frame parser. More...
struct  bssid_address_hooks
 Helper hooks for bssid_address(). More...
struct  seqnum
 IEEE 802.11 Sequence number. More...
struct  seqctl
 IEEE 802.11 Sequence control field. More...
struct  unique_id_factory< hsh_id >
struct  unique_id_factory< seq_bss_tmp_id >
struct  unique_id_factory< seq_dst_bss_tmp_id >
struct  unique_id_factory< seq_src_bss_tmp_id >
struct  unique_id_factory< seq_tmp_id >
struct  unique_id_factory< src_bss_tmp_id >
struct  unique_id_factory< tmp_id >
struct  unique_id
 Identifier for uniquely identifiable frames. More...

Namespaces

namespace  ctl
namespace  data
namespace  dissector_status
namespace  filter
namespace  internals
namespace  mgt
namespace  subtype
namespace  type

Typedefs

typedef unique_id
< internals::hash_value > 
hsh_id
typedef unique_id
< internals::adapter< uint16_t,
internals::seq_bss_tmp_tag1 >
, internals::adapter< unsigned,
internals::seq_bss_tmp_tag2 >
, timestamp
seq_bss_tmp_id
typedef unique_id
< internals::adapter< uint16_t,
internals::seq_dst_bss_tmp_tag1 >
, internals::adapter< unsigned,
internals::seq_dst_bss_tmp_tag2 >
, internals::adapter< unsigned,
internals::seq_dst_bss_tmp_tag3 >
, timestamp
seq_dst_bss_tmp_id
typedef unique_id
< internals::adapter< uint16_t,
internals::seq_src_bss_tmp_tag1 >
, internals::adapter< unsigned,
internals::seq_src_bss_tmp_tag2 >
, internals::adapter< unsigned,
internals::seq_src_bss_tmp_tag3 >
, timestamp
seq_src_bss_tmp_id
typedef unique_id
< internals::adapter< uint16_t,
internals::seq_tmp_tag >
, timestamp
seq_tmp_id
typedef unique_id
< internals::adapter< unsigned,
internals::src_bss_tmp_tag1 >
, internals::adapter< unsigned,
internals::src_bss_tmp_tag2 >
, timestamp
src_bss_tmp_id
typedef unique_id< timestamptmp_id

Functions

template<class PhyH, class Hooks, class FDesc>
dissector< Hooks > dissect (const pcapxx::frame_descriptor< FDesc > &frm, const Hooks &hooks=Hooks())
unsigned protocol_version_of (const void *)
type::frame_type type_of (const void *)
unsigned subtype_of (const void *)
uint8_t control_flags_of (const void *)
bool control_flag (const unsigned flag, const void *frame)
bool to_ds (const void *)
bool from_ds (const void *)
unsigned duration_of (const void *)
const addrtransmitter_address (const void *frame)
const addrbssid_address (const void *, size_t caplen=30)
std::ostream & operator<< (std::ostream &os, const seqctl &a)
std::string make_string (const seqctl &a)
 WP_define_addr_tmp_id (dst, mgt::header::da) WP_define_addr_tmp_id(src
template<class Id1, class Id2, class Id3, class Id4>
std::ostream & operator<< (std::ostream &, const unique_id< Id1, Id2, Id3, Id4 > &)


Detailed Description

IEEE 802.11 frames compounds and operations.

Function Documentation

const addr * wifi::frame::bssid_address ( const void *  frame,
size_t  caplen = 30 
) [inline]

Get a pointer to the frame's BSSID address.

When the frame holds an address that represents a BSSID address, return a pointer to it. Return 0 else.

Some frames holds multiple BSSID addresses (data frames with both the To DS and From DS flags set). In this case, return the transmitter BSSID address.

bool wifi::frame::control_flag ( const unsigned  flag,
const void *  frame 
) [inline]

Extract a specific flag from a frame's control flags.

References control_flags_of().

Referenced by from_ds(), and to_ds().

uint8_t wifi::frame::control_flags_of ( const void *  frame  )  [inline]

Get a frame's control flags.

References tool::extract_little_endian_short_u().

Referenced by control_flag().

template<class PhyH, class Hooks, class FDesc>
dissector< Hooks > wifi::frame::dissect ( const pcapxx::frame_descriptor< FDesc > &  frm,
const Hooks &  hooks = Hooks () 
) [inline]

Dissect a IEEE 802.11 frame given a PCAP frame descriptor .

This function extracts the IEEE 802.11 content of a PCAP frame, builds a dissector object and use it to parse the extracted frame.

Parameters:
[in] frm PCAP frame descriptor of the frame.
Returns:
A dissector object that has parsed the frame.
See also:
dissector

References pcapxx::frame_descriptor< PCAPDescriptor >::bytes(), pcapxx::pkthdr::caplen, pcapxx::frame_descriptor< PCAPDescriptor >::pcap_header(), and pcapxx::frame_descriptor< PCAPDescriptor >::swapped().

unsigned wifi::frame::duration_of ( const void *  frame  )  [inline]

Get a frame's duration.

References tool::extract_little_endian_short_u().

bool wifi::frame::from_ds ( const void *  frame  )  [inline]

Get a frame's from distribution system flag.

References control_flag().

std::string wifi::frame::make_string ( const seqctl &  a  ) 

Make a human readable string from an sequence control field .

template<class Id1, class Id2, class Id3, class Id4>
std::ostream & wifi::frame::operator<< ( std::ostream &  os,
const unique_id< Id1, Id2, Id3, Id4 > &  ui 
) [inline]

Dump a uniquely identifiable frame onto a C++ stream.

std::ostream& wifi::frame::operator<< ( std::ostream &  os,
const seqctl &  a 
)

Dump an sequence control field in human readable notation.

unsigned wifi::frame::protocol_version_of ( const void *  frame  )  [inline]

Get a frame's protocol version.

References tool::extract_little_endian_short_u().

unsigned wifi::frame::subtype_of ( const void *  frame  )  [inline]

Get a frame's subtype.

References tool::extract_little_endian_short_u().

Referenced by transmitter_address().

bool wifi::frame::to_ds ( const void *  frame  )  [inline]

Get a frame's to distribution system flag.

References control_flag().

const addr * wifi::frame::transmitter_address ( const void *  frame  )  [inline]

Get a pointer to the frame's transmitter address.

When the frame holds the address of its transmitter, return a pointer to it. Return 0 else. Note that this function extracts the transmitter address, not the sender address.

References wifi::frame::type::control, wifi::frame::type::data, wifi::frame::type::management, wifi::frame::ctl::subtype::ps_poll, wifi::frame::ctl::subtype::rts, wifi::frame::mgt::header::sa, subtype_of(), wifi::frame::ctl::rts::header::ta, wifi::frame::ctl::ps_poll::header::ta, and type_of().

type::frame_type wifi::frame::type_of ( const void *  frame  )  [inline]


Generated on Thu Jul 31 16:39:04 2008 for wipal by  doxygen 1.5.6