ieee80211_ra...terator_next(9)
π¦ 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β theradiotap_iteratoryou 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 π
- Kernel file
./net/wireless/radiotap.cπ¦ ieee80211_radiotap_iterator_init(9)β go meet her sister, she's the one who sets all this up π
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
- 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