Trait libwifi::Addresses[][src]

pub trait Addresses {
    fn src(&self) -> Option<&MacAddress>;
fn dest(&self) -> &MacAddress;
fn bssid(&self) -> Option<&MacAddress>; }

Helper trait to easily access source, destination and bssid on various types.

Required methods

fn src(&self) -> Option<&MacAddress>[src]

Returns the sender of the Frame. This isn’t always send in every frame (e.g. CTS).

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

This isn’t always send in every frame (e.g. RTS).

Loading content...

Implementors

impl Addresses for DataHeader[src]

fn src(&self) -> Option<&MacAddress>[src]

Return the mac address of the sender

fn dest(&self) -> &MacAddress[src]

Return the mac address of the receiver. A full ff:ff:.. usually indicates a undirected broadcast.

fn bssid(&self) -> Option<&MacAddress>[src]

The BSSID for this request. In most cases, this is expected to be present. The only time it’s not, is in a wireless distributed system (WDS).

impl Addresses for ManagementHeader[src]

Which address is used in which way, depends on a combination of

  • two flags in the FrameControl header.
  • the Type/Subtype constellation.

A rule of thumb is this:

Address 1:
The recipient station address. If to_ds is set, this is the AP address. If from_ds is set then this is the station address

Address 2:
The transmitter station address. If from_ds is set, this is the AP address. If to_ds is set then this is the station address.

Address 3:
If Address 1 contains the destination address then Address 3 will contain the source address. Similarly, if Address 2 contains the source address then Address 3 will contain the destination address.

Sequence Control:
Contains the FragmentNumber and SequenceNumber that define the main frame and the number of fragments in the frame.

fn src(&self) -> Option<&MacAddress>[src]

Return the mac address of the sender

fn dest(&self) -> &MacAddress[src]

Return the mac address of the receiver. A full ff:ff:.. usually indicates a undirected broadcast.

fn bssid(&self) -> Option<&MacAddress>[src]

The BSSID for this request. In most cases, this is expected to be present. The only time it’s not, is in a wireless distributed system (WDS).

impl Addresses for Ack[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for AssociationRequest[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for AssociationResponse[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for Beacon[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for BlockAck[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for BlockAckRequest[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for Cts[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for Data[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for NullData[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for ProbeRequest[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for ProbeResponse[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for QosData[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for QosNull[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

impl Addresses for Rts[src]

fn src(&self) -> Option<&MacAddress>[src]

fn dest(&self) -> &MacAddress[src]

fn bssid(&self) -> Option<&MacAddress>[src]

Loading content...