pub struct Dot11QoS {
pub offset: usize,
}Expand description
802.11 QoS Control field (2 bytes).
Layout (Scapy bit ordering for byte 0):
Byte 0: [A-MSDU Present(1) | Ack Policy(2) | EOSP(1) | TID(4)]
Byte 1: TXOP Limit / Queue SizePresent in QoS Data frames (subtype >= 8).
Fields§
§offset: usizeImplementations§
Source§impl Dot11QoS
impl Dot11QoS
pub fn new(offset: usize) -> Self
Sourcepub fn raw(&self, buf: &[u8]) -> Result<u16, FieldError>
pub fn raw(&self, buf: &[u8]) -> Result<u16, FieldError>
Raw QoS Control field (2 bytes, little-endian).
Sourcepub fn tid(&self, buf: &[u8]) -> Result<u8, FieldError>
pub fn tid(&self, buf: &[u8]) -> Result<u8, FieldError>
TID (Traffic Identifier, lower 4 bits of byte 0).
Sourcepub fn eosp(&self, buf: &[u8]) -> Result<bool, FieldError>
pub fn eosp(&self, buf: &[u8]) -> Result<bool, FieldError>
EOSP (End Of Service Period, bit 4 of byte 0).
Sourcepub fn ack_policy(&self, buf: &[u8]) -> Result<u8, FieldError>
pub fn ack_policy(&self, buf: &[u8]) -> Result<u8, FieldError>
Ack Policy (bits 5-6 of byte 0).
Sourcepub fn a_msdu_present(&self, buf: &[u8]) -> Result<bool, FieldError>
pub fn a_msdu_present(&self, buf: &[u8]) -> Result<bool, FieldError>
A-MSDU Present flag (bit 7 of byte 0).
Sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
Header length.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dot11QoS
impl RefUnwindSafe for Dot11QoS
impl Send for Dot11QoS
impl Sync for Dot11QoS
impl Unpin for Dot11QoS
impl UnsafeUnpin for Dot11QoS
impl UnwindSafe for Dot11QoS
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more