pub struct MacAddress(pub [u8; 6]);
Expand description

This is our representation of a MAC-address

use libwifi::frame::components::MacAddress;

let address = MacAddress([255, 255, 255, 255, 255, 255]);
println!("{}", address.is_broadcast());
// -> true

Tuple Fields

0: [u8; 6]

Implementations

Check whether this MAC addresses the whole network.

Check whether this is a group address. Group addresses start with 01:80:C2::0/24.

The 01:00:5e::0/18 space is reserved for ipv4 multicast

33:33::0/24 is used for ipv6 neighborhood discovery.

The 33:33::0/24 space is reserved for ipv6 multicast

The 01:80:c2::0/18 space is reserved for spanning-tree requests.

A helper function to check whether the mac address is an actual device or just some kind of “meta” mac address.

This function is most likely not complete, but it already covers a cases.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.