-
Notifications
You must be signed in to change notification settings - Fork 691
feat: Get tcp_info
structure
#2615
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
daaa9af
7e6cd7e
46c7bb0
7cb4426
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -1268,6 +1268,17 @@ sockopt_impl!( | |||||||
libc::SO_EXCLBIND, | ||||||||
bool | ||||||||
); | ||||||||
#[cfg(target_os = "linux")] | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi there
If uClibc has that symbol, you can add it to the libc crate. Otherwise, we need to filter it out:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That PR rust-lang/libc#4347 added it to the main branch, Nix uses the Once the backport PR gets merged, update the Line 31 in ea012be
- libc = { version = "0.2.171", features = ["extra_traits"] }
+ libc = { git = "https://github.com/rust-lang/libc", rev = "the commit includes your libc PR", features = ... } There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, thanks! I'll update this PR when the change is backported. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused by this comment. The commit was backported to the 0.2 branch: rust-lang/libc@5a1f5f2. Why would pinning the version of the crate in the nix Cargo.toml file be the correct approach? I don't think that should get committed, right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Emm, I don't think I understand what you mean, could you please elaborate a bit? |
||||||||
#[cfg(feature = "net")] | ||||||||
sockopt_impl!( | ||||||||
#[cfg_attr(docsrs, doc(cfg(feature = "net")))] | ||||||||
/// Get tcp_info structure. | ||||||||
TcpInfo, | ||||||||
GetOnly, | ||||||||
libc::SOL_TCP, | ||||||||
libc::TCP_INFO, | ||||||||
libc::tcp_info | ||||||||
); | ||||||||
|
||||||||
#[allow(missing_docs)] | ||||||||
// Not documented by Linux! | ||||||||
|
Uh oh!
There was an error while loading. Please reload this page.