wlan_common/ie/wsc/
fields.rs
1use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout, Unaligned};
6
7#[derive(Eq, PartialEq, Hash, Clone, Debug)]
9pub struct ProbeRespWsc {
10 pub version: u8,
11 pub wps_state: WpsState,
12 pub ap_setup_locked: bool,
13 pub selected_reg: bool,
14 pub selected_reg_config_methods: Option<[u8; 2]>,
15 pub response_type: u8,
16 pub uuid_e: [u8; 16],
17 pub manufacturer: Vec<u8>,
18 pub model_name: Vec<u8>,
19 pub model_number: Vec<u8>,
20 pub serial_number: Vec<u8>,
21 pub primary_device_type: [u8; 8],
22 pub device_name: Vec<u8>,
23 pub config_methods: [u8; 2],
24 pub rf_bands: Option<u8>,
25 pub vendor_ext: Vec<u8>,
26 }
28
29#[repr(C, packed)]
30#[derive(
31 Eq, PartialEq, Hash, IntoBytes, KnownLayout, FromBytes, Immutable, Unaligned, Copy, Clone, Debug,
32)]
33pub struct WpsState(pub u8);
34
35impl WpsState {
36 pub const NOT_CONFIGURED: Self = Self(0x01);
37 pub const CONFIGURED: Self = Self(0x02);
38}