ieee80211_build_hdr(9)
π ieee80211_build_hdr β like, the kernel API manual page
Okay bestie, so this is ieee80211_build_hdr(9) from the Kernel API Manual, and it's genuinely one of those functions that's doing the most, so let's get into it π«Ά
β¨ NAME β¨
ieee80211_build_hdr β build an 802.11 header in the given frame π
πΈ SYNOPSIS πΈ
struct sk_buff * ieee80211_build_hdr (struct ieee80211_sub_if_data
*sdata , struct sk_buff *skb , u32 info_flags , struct sta_info *sta ,
u32 ctrl_flags , u64 cookie );
Yes the signature is that long, no cap. Six whole arguments. She's high-maintenance and we respect it π
π ARGUMENTS π
sdataβ the virtual interface you're building the header for. It's giving "which face am I wearing today" energy β¨skbβ the skb you're building the header in. The main character, literally π¦info_flagsβ the skb flags to set. Flags! Set them! π©staβ the station pointer. That's your station bestie πΈctrl_flagsβ info control flags to set, because apparently one set of flags wasn't enough πcookieβ a cookie pointer to fill (if it's notNULL, okay? only then) π
π DESCRIPTION π
So here's the vibe: this function takes your skb that's rocking a 802.3 header and reformats that header into the appropriate IEEE 802.11 header β and which 802.11 header it becomes totally depends on which interface the packet is being transmitted on. It's a glow-up, but for headers π
Also, and this is important so don't skip it: this function also takes care of the TX status request and potential unsharing of the SKB. The way that needs to be interleaved with the header building. Not optional, not separable, they're a package deal π₯
π¨ Okay so real talk β this function requires the read-side RCU lock held. Held. By you. Before you call. Not a drill, not a suggestion π
β RETURN β
Returns the (possibly reallocated π β so don't hold onto your old pointer like it's your ex) skb, or an ERR_PTR code. That's it, that's the deal π
π SEE ALSO π
- Kernel file
./net/mac80211/tx.c ieee80211_subif_start_xmit(9)
Bestie, this page came from ./net/mac80211, dated October 2026, and it's the ieee80211_build_hdr(9) manual page β go forth and build those headers correctly, ily, mwah ππ§β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms