ieee80211_ra...terator_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ ieee80211_radiotap_iterator_next (kernel API manual, bestie edition)

okay so real talk: this is a page from the Kernel API Manual, and it's about ieee80211_radiotap_iterator_next β€” the little function that walks your radiotap parser forward one arg at a time. she's not glamorous but she's essential πŸ’…

✨ NAME ✨

ieee80211_radiotap_iterator_next β€” returns the next radiotap parser iterator arg πŸŽ€

✨ SYNOPSIS ✨

int ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator
*iterator );

✨ ARGUMENTS ✨

  • iterator β€” the radiotap_iterator you want to move on to the next arg (if there even is one, no pressure 🫢)

✨ RETURN ✨

  • 0 β€” slay, there's an argument for you to handle πŸ’–
  • -ENOENT β€” that's a wrap, there are no more args 🌸
  • -EINVAL β€” something else is wrong, and it's giving "not my fault" 😭

✨ DESCRIPTION ✨

so what does she actually do? this function hands you the next radiotap arg index (IEEE80211_RADIOTAP_*) in this_arg_index, and it sets this_arg to point at the payload for that field. literally her whole job ✨

she also takes care of alignment handling and extended present fields for you β€” yes bestie, she does the unglamorous work so you don't have to πŸ‘‘

and here's the cute part: this_arg can be changed by the caller. like, eg, you can increment it to move inside a compound argument like IEEE80211_RADIOTAP_CHANNEL. main character energy, honestly 🌈

the args she points to are in little-endian format, whatever the endianness of your CPU is. no exceptions, no cap πŸ’€

πŸ’€ Alignment Gotcha πŸ’€

okay this is the part where you listen. you must take care when dereferencing iterator.this_arg for multibyte types... the pointer is not aligned. not even a little.

so don't just raw-deref her, bestie 😭 use:

get_unaligned((type *)iterator.this_arg)

to dereference iterator.this_arg for type "type" safely on all arches. every single one. periodt πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole vibe check πŸŽ€ this page lives in ./net/wireless, dated October 2026, and it's filed under the same ieee80211_ra...terator_next(9) header you came in through. drink some water, align your pointers, and go parse something iconic πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from