Skip to content
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

rich_nlas feature is non-additive (and makes nla docs confusing) #5

Open
eric-seppanen opened this issue Dec 21, 2022 · 2 comments
Open

Comments

@eric-seppanen
Copy link

I tried writing some code using the netlink-packet-sock-diag crate, using docs.rs to understand the Nla enum. According to those docs, the TcpInfo variant contains a Vec<u8>, which I took to mean that decoding isn't available for this data structure.

I was surprised when I looked at the source code and discovered that decoding was present but required a feature flag. Perhaps the docs for this enum should contain a note that decoding requires a feature flag to be enabled?

I also notice that enabling the feature flag makes incompatible changes to the enum contents, making code no longer compile. This is a non-additive feature; it would be better to follow Cargo's guidance and ensure that enabling features doesn't break the existing public API.

@cathay4t
Copy link
Member

Hi @eric-seppanen We are planning to remove this rich_nlas feature and stabilize our API slowly. Sorry for the mess up.

@kamyuentse
Copy link

I encountered the same issue today. And the TcpInfo length is variant with different kernel version.

@cathay4t As you say, the rich_nlas would be removed in the future release? And, for now, the only way to extract tcp info is writting a custom parser?

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

3 participants