Skip to content

Obtaining unparsed information elements. #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Sh3Rm4n opened this issue May 12, 2025 · 0 comments
Open

Obtaining unparsed information elements. #32

Sh3Rm4n opened this issue May 12, 2025 · 0 comments

Comments

@Sh3Rm4n
Copy link
Contributor

Sh3Rm4n commented May 12, 2025

I have a usecase, where I'd like to obtain the raw Information Elements.

As the Nl80211Message is eagerly parsed and Nl80211Element is part of Nl80211BssInfo is part of Nl80211Attr is part of Nl80211Message, there is no easy way to obtain the elements unparsed.

I currently have two options to obtain the "unparsed" form of the information elements.

  1. Use emit again, which converts the information elements back to the serialized form. This is where Fix emit inconsitencies and add tests #30 is needed because of some incosistency issues for emit implementations.
  2. Use a custom Nl80211Message variant, which does only partially parse the payload (or doesn't at all), where the Nl80211Message::attributes field type is just Vec<u8> so that nothing is parsed by GenetlinkHandle::request.

What do you think about adding a switch somewhere (maybe in the Nl80211AttrsBuilder or even the concrete Nl80211AttrsBuilder<Nl80211Scan>), which only parses the message partially (if this is even technically possible).
E.g. maybe adding a flag/option cto force all IEs to be parsed as Other(Vec<u8>)?

Otherwise I could imagine contributing a little more convenience around a RawNl80211Message . WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant