rtw_get_wps_attr(9)
π« rtw_get_wps_attr β a kernel API manual, but make it make sense π«
okay so bestie, welcome to the rtw_get_wps_attr(9) page π
this is a Kernel API Manual entry and it's genuinely not that deep β it's a little search function that goes digging through a WPS IE for one specific attribute. let's get into it π
πΈ NAME πΈ
rtw_get_wps_attr β search a specific WPS attribute from a given WPS IE β¨
like, you hand it a WPS IE, you tell it which attribute ID you're hunting for, and it goes and finds it. icon behaviour honestly π«Ά
π¦ SYNOPSIS π¦
u8 * rtw_get_wps_attr (u8 *wps_ie , uint wps_ielen , u16 target_attr_id
, u8 *buf_attr , u32 *len_attr );
five arguments, one pointer returned, no cap π₯
π ARGUMENTS π
okay so here's who's who in this function call:
wps_ieβ the address of the WPS IE you want it to search π this is the thing it's gonna dig through.wps_ielenβ the length limit starting fromwps_ieπ« basically "don't look past here bestie".target_attr_idβ the attribute ID of the WPS attribute you're searching for π this is your target, your main character, the one you're looking for.buf_attrβ if this is notNULLand the WPS attribute is found, the WPS attribute gets copied into the buf starting frombuf_attrπ so it's your little delivery box. but only if it's notNULL, and only if the attribute is actually found. two conditions, both required, no exceptions β¨len_attrβ if this is notNULLand the WPS attribute is found, it gets set to the length of the entire WPS attribute π note the word entire β that's the whole attribute, not just the content. also same two conditions as above π
β RETURN β
it returns the address of the specific WPS attribute that was found π or NULL π if it wasn't. that's it. that's the whole return value. short and iconic.
π§ SEE ALSO π§
go look at the kernel file ./drivers/staging/rtl8723bs/core/rtw_ieee80211.c if you want the real tea π
and these sibling functions, all besties in the same family:
rtw_get_ie_ex(9)rtw_ies_remove_ie(9)rtw_get_wps_ie(9)rtw_get_wps_attr_content(9)rtw_ieee802_11_parse_elems(9)
iykyk π
lowkey reminder:buf_attrandlen_attronly get touched when they're notNULLand the attribute is found. don't @ me, that's just what the page says π
okay that's the whole page!! this one came out of ./drivers/staging/rtl8723bs/core, dated October 2026, in the old rtw_get_wps_attr(9) era π and the manual name up top was, you guessed it, rtw_get_wps_attr(9). slay, go find your attributes bestie πΈβ¨π
π¦ 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