You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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?
I tried writing some code using the
netlink-packet-sock-diag
crate, using docs.rs to understand theNla
enum. According to those docs, theTcpInfo
variant contains aVec<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.
The text was updated successfully, but these errors were encountered: