tree: 87609524bb769f89d17d6008e0ee8896d9e2a3be [search]
  1. cpp/
  2. rust/
  3. README.md
src/connectivity/wlan/lib/common/README.md

WLAN Common

This library provides shared WLAN definitions such as frame parsers, element encoders, and test utilities for the WLAN stack.

Major Responsibilities

Field and Element Parsing

The ie parser contains definitions and parsing logic for binary Information Elements (IEs) and vendor attributes in management frames.

MAC Frame Parsing

The mac frame parser inspects binary frames to determine IEEE 802.11 frame control types, subtypes, and header fields.

Frame Writing

Frame writing utilities serialize IEEE 802.11 management and data frames into binary formats for transmission.

Test Utilities

Test utilities generate fake frames and fake stations for unit tests across the stack and provide the assert_variant macro.

Rust and C++ Implementations

The core WLAN stack completed its transition to Rust. The canonical library for the stack is lib/common/rust (wlan-common). The lib/common/cpp directory contains shared C++ helpers, element parsers, and utilities retained for C++ drivers (wlansoftmac and vendor drivers).

Build System Note

BUILD.bazel defines the lib/common build targets. When you modify dependencies or sources, edit BUILD.bazel first. Then run fx bazel2gn to regenerate BUILD.gn. Do not edit BUILD.gn directly.