ieee80211_s1g_optional_len(9)
π ieee80211_s1g_optional_len(9) π
okay so bestie, you know how I'm always the one who knows exactly how many bytes everything is? yeah. that's this function. it lives in the Kernel API Manual and it is, genuinely, the glue holding your S1G beacon parsing together. no cap.
β¨ NAME β¨
ieee80211_s1g_optional_len β determine length of optional S1G beacon fields π
literally its whole job. it tells you how long the optional stuff is so you don't have to guess.
πΈ SYNOPSIS πΈ
size_t ieee80211_s1g_optional_len (__le16 fc );
one arg, one size_t return. clean. iconic. the way that signature just works. π
π¦ ARGUMENTS π¦
fcβ frame control bytes in little-endian byteorder π«Ά like, the raw frame control field, passed in as__le16, so please respect the endianness bestie, don't come at it with host order.
β RETURN β
the total length in bytes of the optional fixed-length fields. that's it. that's the whole vibe. β¨
π DESCRIPTION π
so here's the tea π΅ β an S1G beacon can carry up to three optional fixed-length fields, and they sit right before the variable-length elements. think of them as the little preamble besties that show up before the main character (the elements) makes her entrance.
whether each of these fields is even there at all? that's signaled by flags in the frame control field. so fc is basically the group chat where the fields RSVP'd. π
straight from IEEE 802.11-2024 section 9.3.4.3 β and this is the part you screenshot πΈ:
- Next TBTT field may be
0or3bytes - Short SSID field may be
0or4bytes - Access Network Options (ANO) field may be
0or1byte
so you add up whichever ones showed up, and that's your length. the math is mathing. π₯
π SEE ALSO π
- Kernel file
./include/linux/ieee80211-s1g.hπ ieee80211_is_s1g_beacon(9)ieee80211_s1g_has_next_tbtt(9)ieee80211_s1g_has_ano(9)ieee80211_s1g_has_cssid(9)enum ieee80211_s1g_chanwidth(9)enum ieee80211_s1g_pri_chanwidth(9)struct ieee80211_s1g_bcn_compat_ie(9)struct ieee80211_s1g_oper_ie(9)struct ieee80211_aid_response_ie(9)ieee80211_is_s1g_short_beacon(9)
go read the whole squad, iykyk π§
and that's the page bestie!! π this one's brought to you from ./include/linux, dated October 2026, and yes it's ieee80211_s1g_optional_len(9) β mwah, go parse some beacons, you're gonna slay ππ¦π
π¦ 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