RFC 2292 struct and constant definitions#4954
RFC 2292 struct and constant definitions#4954Skyb0rg007 wants to merge 1 commit intorust-lang:mainfrom
Conversation
b8f20e4 to
16f3cea
Compare
|
Alright, I need help. On *BSD platforms (FreeBSD, macOS, etc), But the Linux doesn't mark these structs as |
742cf17 to
6d97ed6
Compare
d5989eb to
dfe9971
Compare
This PR adds the icmp6_filter struct and constants as defined by RFC 2292 - Advanced Sockets API for IPv6. These constants are available for use in get/setsockopt on supported Unix platforms. The operations defined on the icmp6_filter struct are defined as C macros, so the implementations are not included here. See the RFC for definitions and use.
dfe9971 to
7fa8771
Compare
|
For now, I simply guard the offending struct definitions with
Otherwise I think this PR is ready to review. |
Description
This PR adds the structs and constants as defined by RFC 2292 - Advanced Sockets API for IPv6.
These constants are available for use in get/setsockopt on supported Unix platforms.
The operations defined on the icmp6_filter struct are defined as C macros, so the implementations are not included here.
Sources
https://github.com/bminor/glibc/blob/04e750e75b73957cf1c791535a3f4319534a52fc/inet/netinet/icmp6.h
https://github.com/kraj/musl/blob/kraj/master/include/netinet/icmp6.h
https://github.com/freebsd/freebsd-src/blob/9ae367d11de8abbdf53884836c9ba30908c5c8db/sys/netinet/icmp6.h
Also in the RFC: https://datatracker.ietf.org/doc/html/rfc2292#section-3.2
Checklist
Unfortunately I could not get the libc-tests working locally, so this PR is marked as draft.
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated