-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add RTF_*, RTA_*, RTAX_*, RTM_* definitions on BSDs #3714
Conversation
r? @JohnTitor rustbot has assigned @JohnTitor. Use |
4a0d782
to
cffe959
Compare
Do you plan to unify with macOS (same ancestor) by moving RTM_ADD and other constants with same values to src/unix/bsd/mod.rs ? |
7e8a9c5
to
9d8b39c
Compare
Please, don't remove error[E0425]: cannot find value `RTAX_MAX` in crate `libc`
--> cargo-crates/iroh-net-0.16.2/src/net/interfaces/bsd.rs:875:46
|
875 | let mut addrs = Vec::with_capacity(libc::RTAX_MAX as usize);
| ^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `RTAX_MAX` in crate `libc`
--> cargo-crates/iroh-net-0.16.2/src/net/interfaces/bsd.rs:879:23
|
879 | for i in 0..libc::RTAX_MAX as usize {
| ^^^^^^^^ not found in `libc`
|
help: you might have meant to write `.` instead of `..`
|
879 - for i in 0..libc::RTAX_MAX as usize {
879 + for i in 0.libc::RTAX_MAX as usize {
| |
At first glance this looks okay, but there are a couple things needed. Could you please do the following?
|
@rustbot author |
It'd be great to land this, so mozilla/mtu#29 would work on the BSDs. |
* Unify RTM_ADD and friends under bsd namespace * Keeps RTAX_MAX as it is used to loop over alternate internal encoding.
Going to wait on the backport until #3970 is figured out. |
unbreak OpenBSD after #3714 by properly define RTF_FMASK
* Unify RTM_ADD and friends under bsd namespace * Keeps RTAX_MAX as it is used to loop over alternate internal encoding. (backport <rust-lang#3714>) (cherry picked from commit e1566fd)
(backport <rust-lang#3970>) (cherry picked from commit dbe4b8b)
mozilla#29 added the following `libc` import: ``` rust use libc::{ freeifaddrs, getifaddrs, getpid, if_data, if_indextoname, ifaddrs, in6_addr, in_addr, sockaddr_in, sockaddr_in6, sockaddr_storage, AF_UNSPEC, PF_ROUTE, RTAX_MAX, }; ``` `RTAX_MAX` was added in `libc` `0.2.160`: https://github.com/rust-lang/libc/releases/tag/0.2.160 More specifically rust-lang/libc#3714. This commit makes sure the above new requirement is encoded in the `mtu` `Cargo.toml` `libc` dependency declaration. See CI failure without discussed in mozilla#51 (comment).
Grep from:
Closes #3711.
@rustbot review