Repository navigation
Conversation
|
The Android job hit its 25 minute timeout before the tests finished. It normally takes 8–9 minutes and passed on #5558 and #5559, so this looks like the emulator stalling. NetBSD failed on the package mirror, with the retry broken by |
| use crate::prelude::*; | ||
| use crate::sys::ioccom::*; | ||
|
|
||
| s! { |
There was a problem hiding this comment.
Use s2! rather than s! for new API, it adds a Default impl and makes it effectively non-exhaustive.
There was a problem hiding this comment.
Done, switched both new structs (in6_aliasreq and ifaliasreq) to s2!. Their fields are s! types without Default, so I used #[custom_default(unsafe { mem::zeroed::<...>() })] as in sockaddr_can.
There was a problem hiding this comment.
I'm adding the default impls in #5576 so the unsafe doesn't need to be used. Could you rebase once that lands?
There was a problem hiding this comment.
Rebased, and the custom_defaults are gone now that the field types have Default. I also moved ifaliasreq into the existing s2! block.
|
Reminder, once the PR becomes ready for a review, use |
8144d81 to
da75a90
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
Add the interface alias request structs from `net/if.h` and `netinet6/in6_var.h`. Use `ifaliasreq` for `SIOCAIFADDR` and `SIOCSIFPHYADDR`, which spelled out its size so far, and add the IPv6 ioctls `SIOCAIFADDR_IN6`, `SIOCDIFADDR_IN6` and `SIOCSIFPHYADDR_IN6`. Sources: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/net/if.h#L381-L392 https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/netinet6/in6_var.h#L402-L409 https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/netinet6/in6_var.h#L631-L638 https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/sockio.h#L95 https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/sockio.h#L134 Closes rust-lang#4435
da75a90 to
d819833
Compare
|
@rustbot ready |
|
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. |
Description
Add
ifaliasreqfromnet/if.handin6_aliasreqfromnetinet6/in6_var.h.SIOCAIFADDRandSIOCSIFPHYADDRnow take their size fromifaliasreqinstead of a hardcoded64, so their values stay the same.SIOCAIFADDR_IN6andSIOCSIFPHYADDR_IN6are added now thatin6_aliasreqexists, along withSIOCDIFADDR_IN6to go with them.ifaliasreqfollows thesockaddrlayout from the non-__has_ptrcheckside of the header.in6_aliasreqis macOS only, like thein6_addrlifetimeit contains.Closes #4435
Checklist
libc-test/semverhave been updated*LASTor*MAXhave the standard doc comment (none added)cargo test -p libc-test --target aarch64-apple-darwin, pluscargo checkforaarch64-apple-iosandx86_64-apple-darwin)@rustbot label +stable-nominated