for_each_element_completed(9)
π for_each_element_completed(9) β Kernel API Manual
okay so bestie, welcome to the for_each_element_completed page from the Kernel API Manual β¨ this one's a tiny little helper but it's lowkey carrying the whole "did we actually finish parsing" vibe check, so let's get into it π«Ά
πΈ NAME πΈ
for_each_element_completed β determine if element parsing consumed all data
like, the whole entire point: did your element walk eat all the data or not π
β¨ SYNOPSIS β¨
bool for_each_element_completed (const struct element *element , const
void *data , size_t datalen );
that's the whole signature, no cap π
π¦ ARGUMENTS π¦
elementβ the element pointer you got afterfor_each_elementor friends ran π« like, the one you're holding at the end of the loopdataβ same data pointer as passed tofor_each_elementor friends, fr fr, it's gotta be the same one πdatalenβ same data length as passed tofor_each_elementor friends, again, must match the original πΈ
heads up bestie: all three have to line up with what you passed in originally, or the answer means nothing π
π RETURN π
true if all elements were iterated, false otherwise β and pls see the notes below before you trust that false π like, the notes are the whole tea β
π DESCRIPTION π
so this function returns true if all the data was parsed or considered while walking the elements π₯ iconic behaviour, honestly.
Only use this if your for_each_element loop cannot be broken out of π because if you do break out early, it always returns false β always, every time, no exceptions, and that's on periodt π
so don't come for this function when it's your own loop being messy.
also: if some data was malformed, this returns false π because the last parsed element will not fill the whole remaining data. it's giving "leftover crumbs" energy π the walk just couldn't reach all the way to the end.
π§ SEE ALSO π§
Kernel file ./include/linux/ieee80211.h β and oh my god bestie the guest list is long, literally everyone showed up to this party π all of these are (9) pages:
ieee80211_has_tods(9)ieee80211_has_fromds(9)ieee80211_has_a4(9)ieee80211_has_morefrags(9)ieee80211_has_retry(9)ieee80211_has_pm(9)ieee80211_has_moredata(9)ieee80211_has_protected(9)ieee80211_has_order(9)ieee80211_is_mgmt(9)ieee80211_is_ctl(9)ieee80211_is_data(9)ieee80211_is_ext(9)ieee80211_is_data_qos(9)ieee80211_is_data_present(9)ieee80211_is_assoc_req(9)ieee80211_is_assoc_resp(9)ieee80211_is_reassoc_req(9)ieee80211_is_reassoc_resp(9)ieee80211_is_assoc(9)ieee80211_is_probe_req(9)ieee80211_is_probe_resp(9)ieee80211_is_beacon(9)ieee80211_is_atim(9)ieee80211_is_disassoc(9)ieee80211_is_auth(9)ieee80211_is_deauth(9)ieee80211_is_action(9)ieee80211_is_back_req(9)ieee80211_is_back(9)ieee80211_is_pspoll(9)ieee80211_is_rts(9)ieee80211_is_cts(9)ieee80211_is_ack(9)ieee80211_is_cfend(9)ieee80211_is_cfendack(9)ieee80211_is_nullfunc(9)ieee80211_is_qos_nullfunc(9)ieee80211_is_trigger(9)ieee80211_is_any_nullfunc(9)ieee80211_is_first_frag(9)ieee80211_is_frag(9)struct ieee80211_quiet_ie(9)struct ieee80211_msrment_ie(9)struct ieee80211_channel_sw_ie(9)struct ieee80211_ext_chansw_ie(9)struct ieee80211_sec_chan_offs_ie(9)struct ieee80211_wide_bw_chansw_ie(9)struct ieee80211_tim_ie(9)struct ieee80211_tpc_report_ie(9)struct ieee80211_bss_load_elem(9)struct ieee80211_timeout_interval_ie(9)enum ieee80211_idle_options(9)struct ieee80211_bss_max_idle_period_ie(9)struct ieee80211_bssid_index(9)struct ieee80211_multiple_bssid_configuration(9)ieee80211_get_qos_ctl(9)ieee80211_get_tid(9)ieee80211_get_SA(9)ieee80211_get_DA(9)ieee80211_is_bufferable_mmpdu(9)_ieee80211_is_robust_mgmt_frame(9)ieee80211_is_robust_mgmt_frame(9)ieee80211_is_public_action(9)ieee80211_is_protected_dual_of_public_action(9)_ieee80211_is_group_privacy_action(9)ieee80211_is_group_privacy_action(9)ieee80211_tu_to_usec(9)ieee80211_get_tdls_action(9)ieee80211_action_contains_tpc(9)ieee80211_is_timing_measurement(9)ieee80211_is_ftm(9)struct ieee80211_enh_crit_upd(9)ieee80211_check_tim(9)
and that's the whole page bestie, you ate that π«Ά
this lil gem lives in ./include/linux and the date on it is October 2026 β so yeah, slightly future-dated, main character energy fr fr π go forth and check your parsing loops π
π¦ 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