pub struct Dot11Beacon {
pub offset: usize,
}Expand description
802.11 Beacon frame body.
Fixed fields: timestamp(8B) + beacon_interval(2B) + capability(2B) = 12 bytes.
Followed by an IE chain (parsed separately by the ie module).
Fields§
§offset: usizeImplementations§
Source§impl Dot11Beacon
impl Dot11Beacon
pub fn new(offset: usize) -> Self
Sourcepub fn validate(buf: &[u8], offset: usize) -> Result<(), FieldError>
pub fn validate(buf: &[u8], offset: usize) -> Result<(), FieldError>
Validate the buffer contains enough data.
Sourcepub fn timestamp(&self, buf: &[u8]) -> Result<u64, FieldError>
pub fn timestamp(&self, buf: &[u8]) -> Result<u64, FieldError>
Timestamp (8 bytes, little-endian).
Sourcepub fn beacon_interval(&self, buf: &[u8]) -> Result<u16, FieldError>
pub fn beacon_interval(&self, buf: &[u8]) -> Result<u16, FieldError>
Beacon interval in TUs (1 TU = 1024 microseconds), little-endian u16.
Sourcepub fn capability(&self, buf: &[u8]) -> Result<u16, FieldError>
pub fn capability(&self, buf: &[u8]) -> Result<u16, FieldError>
Capability information (2 bytes, little-endian).
Sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
Header length (fixed fields only).
Trait Implementations§
Source§impl Clone for Dot11Beacon
impl Clone for Dot11Beacon
Source§fn clone(&self) -> Dot11Beacon
fn clone(&self) -> Dot11Beacon
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Dot11Beacon
impl RefUnwindSafe for Dot11Beacon
impl Send for Dot11Beacon
impl Sync for Dot11Beacon
impl Unpin for Dot11Beacon
impl UnsafeUnpin for Dot11Beacon
impl UnwindSafe for Dot11Beacon
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