ieee80211_build_hdr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 not NULL, 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 πŸ‘‘


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