Add methods to TCP and UDP sockets to modify hop limit (refresh of #94678)#138744
Add methods to TCP and UDP sockets to modify hop limit (refresh of #94678)#138744Mallets wants to merge 9 commits intorust-lang:mainfrom
Conversation
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
|
r? libs-api because it's been a while since the original PR was approved. |
This comment has been minimized.
This comment has been minimized.
7f790e2 to
9c1ee90
Compare
|
☔ The latest upstream changes (presumably #139724) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Sorry—I missed that this was ready for review again. Please use |
9c1ee90 to
25fb525
Compare
|
@rustbot ready |
|
Thank you! @bors r+ |
…=dtolnay Add methods to TCP and UDP sockets to modify hop limit (refresh of rust-lang#94678) rust-lang#94678 was closed because of time constraints of the original author (`@kckeiks).` This PR is a refresh of rust-lang#94678 where the original proposed changes are ported to the current status of the standard library. In addition, this PR: - implements the change suggested in rust-lang#94678 (comment) - defines `set_multicast_hop_limit_v6` and `multicast_hop_limit_v6 ` only for UDP sockets and not for TCP sockets as originally proposed Issue: rust-lang#139166
|
@Dylan-DPC the build succeed |
|
☔ The latest upstream changes (presumably #146418) made this pull request unmergeable. Please resolve the merge conflicts. |
|
You can reproduce the failure with Checking stage1 library artifacts{std} (stage1:x86_64-unknown-linux-gnu -> stage1:wasm32-wasip2)
Checking std v0.0.0
warning: dropping unsupported crate type `dylib` for target `wasm32-wasip2`
error[E0425]: cannot find value `IPV6_MULTICAST_HOPS` in crate `c`
--> library/std/src/sys/net/connection/socket/mod.rs:831:53
|
831 | setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS, limit as c_int)
| ^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `IPV6_MULTICAST_LOOP`
|
::: /home/david/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.175/src/wasi/p2.rs:117:1
|
117 | pub const IPV6_MULTICAST_LOOP: c_int = 19;
| ------------------------------------ similarly named constant `IPV6_MULTICAST_LOOP` defined here
error[E0425]: cannot find value `IPV6_MULTICAST_HOPS` in crate `c`
--> library/std/src/sys/net/connection/socket/mod.rs:835:70
|
835 | let raw: c_int = getsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS)?;
| ^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `IPV6_MULTICAST_LOOP`
|
::: /home/david/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.175/src/wasi/p2.rs:117:1
|
117 | pub const IPV6_MULTICAST_LOOP: c_int = 19;
| ------------------------------------ similarly named constant `IPV6_MULTICAST_LOOP` defined here |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cfe9d15 to
a9dbefc
Compare
This comment has been minimized.
This comment has been minimized.
a9dbefc to
9698730
Compare
|
☔ The latest upstream changes (presumably #150334) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@Mallets any updates on this? thanks |
Co-authored-by: David Tolnay <dtolnay@gmail.com>
9698730 to
b3c63c8
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@Dylan-DPC, thank you for the reminder! I had completely overlooked this PR. |
View all comments
#94678 was closed because of time constraints of the original author (@kckeiks).
This PR is a refresh of #94678 where the original proposed changes are ported to the current status of the standard library.
In addition, this PR:
set_multicast_hop_limit_v6andmulticast_hop_limit_v6only for UDP sockets and not for TCP sockets as originally proposedIssue: #139166