pub struct Dot11Elt {
pub id: u8,
pub len: u8,
pub info: Vec<u8>,
}Expand description
Generic 802.11 Information Element (TLV).
Layout:
- ID (1 byte)
- Length (1 byte)
- Info (variable,
lengthbytes)
Fields§
§id: u8Element ID.
len: u8Length of the info field.
info: Vec<u8>Info/data bytes.
Implementations§
Source§impl Dot11Elt
impl Dot11Elt
Sourcepub fn parse(buf: &[u8], offset: usize) -> Result<(Self, usize), FieldError>
pub fn parse(buf: &[u8], offset: usize) -> Result<(Self, usize), FieldError>
Parse a single IE from a buffer at the given offset. Returns the parsed IE and the number of bytes consumed.
Sourcepub fn parse_all(buf: &[u8], offset: usize) -> Vec<Self>
pub fn parse_all(buf: &[u8], offset: usize) -> Vec<Self>
Parse all IEs from a buffer starting at the given offset. Stops on error (truncated IE) and returns what was parsed so far.
Create a hidden/broadcast SSID element (empty SSID).
Trait Implementations§
impl Eq for Dot11Elt
impl StructuralPartialEq for Dot11Elt
Auto Trait Implementations§
impl Freeze for Dot11Elt
impl RefUnwindSafe for Dot11Elt
impl Send for Dot11Elt
impl Sync for Dot11Elt
impl Unpin for Dot11Elt
impl UnsafeUnpin for Dot11Elt
impl UnwindSafe for Dot11Elt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more