Skip to main content

Module dot11

Module dot11 

Source
Expand description

IEEE 802.11 (WiFi / Dot11) protocol layer implementation.

Provides full 802.11 frame parsing, building, and field access including:

  • Frame Control field parsing (type, subtype, flags)
  • Variable address fields (1-4 MAC addresses depending on frame type)
  • Sequence control field
  • FCS variant (Dot11FCS)
  • RadioTap header support
  • Management, control, and data frame subtypes
  • Information elements (IEs)
  • Security wrappers (WEP, TKIP, CCMP)

Re-exports§

pub use builder::Dot11Builder;
pub use control::Dot11Ack;
pub use control::Dot11BlockAck;
pub use control::Dot11BlockAckReq;
pub use control::Dot11CFEnd;
pub use control::Dot11CTS;
pub use control::Dot11PSPoll;
pub use control::Dot11RTS;
pub use data::Dot11QoS;
pub use ie::Dot11Elt;
pub use ie::Dot11EltRSN;
pub use ie::Dot11EltRates;
pub use management::Dot11Action;
pub use management::Dot11AssocReq;
pub use management::Dot11AssocResp;
pub use management::Dot11Auth;
pub use management::Dot11Beacon;
pub use management::Dot11Deauth;
pub use management::Dot11Disas;
pub use management::Dot11ProbeReq;
pub use management::Dot11ProbeResp;
pub use management::Dot11ReassocReq;
pub use management::Dot11ReassocResp;
pub use radiotap::RadioTapBuilder;
pub use radiotap::RadioTapLayer;
pub use security::Dot11CCMP;
pub use security::Dot11TKIP;
pub use security::Dot11WEP;

Modules§

builder
IEEE 802.11 frame builder.
control
IEEE 802.11 control frame subtypes.
data
IEEE 802.11 data frame subtypes and QoS handling.
ie
IEEE 802.11 Information Elements (IEs).
management
IEEE 802.11 management frame subtypes.
offsets
Field offsets within the 802.11 header. NOTE: Frame Control is little-endian.
radiotap
RadioTap header implementation for IEEE 802.11 frames.
security
IEEE 802.11 security wrappers (WEP, TKIP, CCMP).
types
IEEE 802.11 constants, type codes, and name lookup functions.

Structs§

Dot11FcsLayer
IEEE 802.11 FCS layer - same as Dot11Layer but includes a 4-byte FCS trailer.
Dot11Layer
IEEE 802.11 layer - a zero-copy view into the packet buffer.

Constants§

DOT11_FCS_LEN
FCS field length.
DOT11_MGMT_HEADER_LEN
Standard management/data header length: FC(2) + Dur(2) + Addr1(6) + Addr2(6) + Addr3(6) + SC(2) = 24.
DOT11_MIN_HEADER_LEN
Minimum 802.11 header length: FC(2) + Duration(2) + Addr1(6) = 10 bytes. Most frames have at least 24 bytes (3 addresses + seq ctrl).
DOT11_WDS_HEADER_LEN
WDS (4 address) header length: 24 + Addr4(6) = 30.

Functions§

build_frame_control
Build a Frame Control u16 value from components.
crc32_ieee
Compute IEEE CRC32 (used for FCS).