cfg80211_find_elem_match(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’– NAME ๐Ÿ’–

okay so this is cfg80211_find_elem_match(9) from the Kernel API Manual โ€” part 1 of 3, bestie, and yes more parts are coming, so don't go anywhere ๐Ÿ’…

cfg80211_find_elem_match โ€” match an information element and a byte array in data. It's giving "find the IE, match the bytes" energy, and honestly? iconic. โœจ

โœจ SYNOPSIS โœจ

const struct element * cfg80211_find_elem_match (u8 eid , const u8 *ies , unsigned int len , const u8 *match , unsigned int match_len , unsigned int match_offset );

๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • eid โ€” the element ID, aka which element we're looking for ๐Ÿ‘€
  • ies โ€” the data consisting of IEs
  • len โ€” length of the data
  • match โ€” the byte array to match
  • match_len โ€” number of bytes in the match array
  • match_offset โ€” offset in the IE data where the byte array should match. โš ๏ธ note the difference to cfg80211_find_ie_match: that one considers the offset to start from the element ID byte, but here we take the data portion instead. iykyk, bestie โ€” this offset is not the same thing.

๐Ÿ”ฅ RETURN ๐Ÿ”ฅ

It returns NULL if the element ID could not be found, or if the element is invalid (it claims to be longer than the given data), or if the byte array doesn't match. Otherwise, it returns the requested element struct. Slay. ๐Ÿ’…

๐Ÿ’… NOTE ๐Ÿ’…

โš ๏ธ no cap: there are no checks on the element length other than having to fit into the given data and being large enough for the byte array to match. That's the only length vibe check happening here, fr fr.

๐Ÿ’ซ SEE ALSO ๐Ÿ’ซ

okay bestie, buckle up, because this is the part where the page just. keeps. going. ๐Ÿ’€

First up, the actual kernel file all this lives in: ./include/net/cfg80211.h.

And then the whole extended friend group โ€” every single one of these is a (9) page, fr fr. No skipping, no "you get the idea" โ€” I said what I said:


okay and that's genuinely all of it, no cap ๐Ÿ˜ญ go drink some water, you earned it ๐Ÿซถ there's still more of this page coming though, so don't wander off ๐Ÿ’–


okay that's the whole SEE ALSO situation, bestie โ€” go click through them, they're all right there ๐Ÿ’…

and that's a wrap on this one ๐ŸŽ€ this page comes from ./include/net, version-dated October 2026, and it's all about cfg80211_find_elem_match(9). take care of her ๐Ÿซถโœจ

๐Ÿ“ฆ where this page comes from