⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

WifiStation

Struct WifiStation 

Source
pub struct WifiStation { /* private fields */ }
Expand description

WiFi station (client) state machine

Implementations§

Source§

impl WifiStation

Source

pub fn new(own_addr: MacAddress) -> Self

Create a new WiFi station

Source

pub fn state(&self) -> StaState

Get current station state

Source

pub fn current_bss(&self) -> Option<&BssInfo>

Get current BSS info

Source

pub fn scan_results(&self) -> &[BssInfo]

Get scan results

Source

pub fn start_scan(&mut self) -> Vec<u8>

Start BSS scanning. Transitions to Scanning state. Returns a probe request frame to send on each channel.

Source

pub fn process_beacon(&mut self, frame_data: &[u8]) -> Option<BssInfo>

Process a received beacon frame and extract BSS information. Returns the parsed BSS info if the frame is valid.

Source

pub fn authenticate(&mut self, bss: &BssInfo) -> Option<Vec<u8>>

Begin 802.11 Open System authentication with the target BSS. Returns authentication frame bytes to send.

Source

pub fn process_auth_response(&mut self, frame_data: &[u8]) -> bool

Process authentication response. On success, transition to Associating. Returns true if authentication succeeded.

Source

pub fn associate(&mut self) -> Option<Vec<u8>>

Send association request to the current BSS. Returns association request frame bytes.

Source

pub fn process_assoc_response(&mut self, frame_data: &[u8]) -> bool

Process association response. On success, transition to Associated. Returns true if association succeeded.

Source

pub fn deauthenticate(&mut self, reason: u16) -> Option<Vec<u8>>

Deauthenticate from the current BSS. Returns deauthentication frame bytes.

Source

pub fn set_connected(&mut self)

Mark station as fully connected (after WPA handshake completes)

Source

pub fn parse_frame(data: &[u8]) -> Option<(Ieee80211Header, &[u8])>

Parse a raw 802.11 frame into header + body

Auto Trait Implementations§

§

impl Freeze for WifiStation

§

impl RefUnwindSafe for WifiStation

§

impl Send for WifiStation

§

impl Sync for WifiStation

§

impl Unpin for WifiStation

§

impl UnwindSafe for WifiStation

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.