pub struct Radio { /* private fields */ }Expand description
An 802.11 interface’s Action frames, through nl80211.
Implementations§
Source§impl Radio
impl Radio
Sourcepub fn open(interface: &str) -> Result<Self>
pub fn open(interface: &str) -> Result<Self>
Opens interface’s radio, listening for the transmit status of the
frames it sends and for stations joining and leaving. Registering
for frames and stamping them need CAP_NET_ADMIN.
Sourcepub fn address(&self) -> MacAddress
pub fn address(&self) -> MacAddress
The interface’s own address.
Sourcepub fn access_point(&self) -> Result<bool>
pub fn access_point(&self) -> Result<bool>
Whether the interface is an access point, not a station.
Sourcepub fn stations(&self) -> Result<Vec<MacAddress>>
pub fn stations(&self) -> Result<Vec<MacAddress>>
The stations associated with the access point, or on a station the access point it is associated with.
Sourcepub fn register_action(&self, prefix: &[u8]) -> Result<()>
pub fn register_action(&self, prefix: &[u8]) -> Result<()>
Has Action frames starting with prefix (their Category, then
action and more as needed) come to this radio as Event::Frame.
Fails if another program already takes frames that overlap.
Sourcepub fn set_hw_timestamp(&self, peer: MacAddress, enable: bool) -> Result<()>
pub fn set_hw_timestamp(&self, peer: MacAddress, enable: bool) -> Result<()>
Has the radio stamp the Timing Measurement and Fine Timing
Measurement frames to and from peer, or stop.
Sourcepub fn send_action(
&self,
destination: MacAddress,
bssid: MacAddress,
action: &[u8],
) -> Result<u64>
pub fn send_action( &self, destination: MacAddress, bssid: MacAddress, action: &[u8], ) -> Result<u64>
Sends an Action frame, action from its Category on, to
destination in the BSS bssid (the access point’s address),
returning the cookie its Event::TxStatus will carry.