1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//! Wi-Fi Information Element (IE) parsing and serialization.
//!
//! Information Elements are the building blocks of Wi-Fi management frames
//! (beacons, probe responses, etc.). Each IE contains specific information
//! about an access point or station's capabilities and configuration.
//!
//! # Parsing IEs
//!
//! Use [`from_bytes`] to parse a sequence of IEs from raw bytes.
//! Returns a `Vec<Ie>` containing all successfully parsed IEs:
//!
//! ```
//! # use kawaiifi::ies;
//! // Two IEs: SSID "Hello" + DS Parameter Set (channel 6)
//! let ie_bytes = &[
//! 0x00, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, // SSID IE
//! 0x03, 0x01, 0x06, // DS Parameter Set IE
//! ];
//! let ies = ies::from_bytes(ie_bytes);
//! assert_eq!(ies.len(), 2);
//! ```
//!
//! # Accessing IE Data
//!
//! Each [`Ie`] has `id`, `id_ext`, and `data` fields.
//! Use the `name()` method to get a human-readable IE name:
//!
//! ```
//! # use kawaiifi::ies::{self, IeData};
//! # let ie_bytes = &[
//! # 0x00, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
//! # 0x03, 0x01, 0x06,
//! # ];
//! # let ies = ies::from_bytes(ie_bytes);
//! for ie in &ies {
//! println!("IE: {} (id={}, id_ext={:?})", ie.name(), ie.id, ie.id_ext);
//!
//! match &ie.data {
//! IeData::Ssid(ssid) => println!(" SSID: {}", ssid.to_string_lossy()),
//! IeData::DsParameterSet(ds) => println!(" Channel: {}", ds.current_channel),
//! _ => {}
//! }
//! }
//! ```
pub use *;
pub use ;
pub use Ie;
pub use IeData;
pub use IeId;
pub use from_bytes;
pub use write_bits_lsb0;
/// Resolves inter-IE dependencies that cannot be determined during single-pass parsing.
///
/// Currently handles EHT Capabilities, which requires HE Capabilities context to parse
/// its MCS/NSS set.
pub