Implement nl80211 and mac80211_hwsim generic Netlink constants#302
Implement nl80211 and mac80211_hwsim generic Netlink constants#302a-gavin wants to merge 3 commits intojbaublitz:mainfrom
Conversation
Add support for Linux 'mac80211_hwsim' virtual WiFi driver https://www.kernel.org/doc/html/next/networking/mac80211_hwsim/mac80211_hwsim.html Unlike other netlink constants (e.g. 'nl80211'), these constants are presently only available in the 'mac80211_hwsim' kernel driver (specifically in 'mac80211_hwsim.h'). Somewhat confusingly, this header file includes both netlink API constants and structs in addition to those which are driver-internal only. To the best of my knowledge, the constants added in this commit constitute all of the netlink API.
jbaublitz
left a comment
There was a problem hiding this comment.
Hi @a-gavin, thanks for the contribution.
I have a few notes about this PR. First of all, can you provide more information on where the constants are defined for the hardcoded constants? Are they not included in the crate that you pulled in?
Overall, I'll do a final review and probably include this as soon as you fix the documentation bug popping up in CI.
I detailed some info on the
Definitions for
Do you mind if I resubmit the I submitted this as a draft to get feedback and would like to sort out the non- |
|
Submitted PR for just |
|
Hi @a-gavin, I've finally found the time to reply to your issue. Please take a look at my response and let me know what you think. As for the new PR, I'll take a look once we've gotten on the same page about what we're seeing in the Wireshark dump. |
Something to chew on while I continue to add more to the
neli-side of thenl80211constants for a project I'm working on. I expect to add several more enums over the next month or so to thenl80211definitions (mac80211_hwsimshould be okay as is, pending any feedback).Given this and this blocking feature request/issue I raised regarding
NlattrTypeserialized types, I'm raising this as a draft. For a finalized PR, I plan to properly document the thenl80211constants, update the existingnl80211example to use the constants, and of course update the commit message.For some quick context, the
nl80211generic Netlink interface is the primary method used to configure and query WiFi interfaces in the Linux kernel (e.g.wpa_supplicant/hostapd,iwd,iw). Themac80211_hwsimgeneric Netlink Interface is the communication method used to configure and query virtual WiFi radios in the Linux kernel and is used by several projects for virtualized testing (e.g.wpa_supplicant/hostapd,iwd).To grab
nl80211definitions, this PR uses thelinux-raw-syscrate as previously discussed. Support for allnl80211Linux 6.16 constants landed in thelinux-raw-syscrate which is included in thev0.11.0release. Unlikenl80211, themac80211_hwsimgeneric Netlink constants are only defined in the kernel module itself, so definitions are added manually.