#[non_exhaustive]pub struct Sniffer<'d> { /* private fields */ }unstable only.Expand description
A Wi-Fi sniffer.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Implementations§
Source§impl Sniffer<'_>
impl Sniffer<'_>
Sourcepub fn set_promiscuous_mode(&self, enabled: bool) -> Result<(), WifiError>
pub fn set_promiscuous_mode(&self, enabled: bool) -> Result<(), WifiError>
Set promiscuous mode enabled or disabled.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn send_raw_frame(
&mut self,
use_sta_interface: bool,
buffer: &[u8],
use_internal_seq_num: bool,
) -> Result<(), WifiError>
pub fn send_raw_frame( &mut self, use_sta_interface: bool, buffer: &[u8], use_internal_seq_num: bool, ) -> Result<(), WifiError>
Transmit a raw frame.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn set_receive_cb(&mut self, cb: fn(PromiscuousPkt<'_>))
pub fn set_receive_cb(&mut self, cb: fn(PromiscuousPkt<'_>))
Set the callback for receiving a packet.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.