Add RFC 3678 multicast group_req/group_source_req and MCAST_*#5236
Add RFC 3678 multicast group_req/group_source_req and MCAST_*#5236sbogomolov wants to merge 1 commit into
group_req/group_source_req and MCAST_*#5236Conversation
|
Some changes occurred in an Android module cc @maurer |
|
@sbogomolov do you actually have a use these constants? Three PRs in the past few hours is a lot. Also, these PR descriptions look like they may be AI-generated. Please handwrite all PR descriptions and commit messages, and make sure to include the information requested in the PR template. |
I actually use these, yes :) Not every single constant is used by me, but I thought it would make sense to add related constants together. They are used in my reflector project (mDNS, SSDP/DIAL, WoL). I'm trying to create PRs for all constants / structs that I had to manually define. |
6bf280f to
c08df52
Compare
c08df52 to
4a5c221
Compare
This comment has been minimized.
This comment has been minimized.
4a5c221 to
e2fc905
Compare
This comment has been minimized.
This comment has been minimized.
Add the protocol-independent multicast group membership request structs `group_req` and `group_source_req` (RFC 3678) on Linux, Apple, and FreeBSD, and the `MCAST_*` socket-option constants on Apple and FreeBSD (Linux already defines them). Apple wraps the structs in `#pragma pack(4)`, so they are `#[repr(packed(4))]` there; Linux and FreeBSD use natural alignment. DragonFly lacks the RFC 3678 multicast API, so it is excluded.
e2fc905 to
5383022
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. |
Description
Add
group_req/group_source_reqand theMCAST_*socket options for the protocol-independent multicast API (RFC 3678) on Linux, Apple, and FreeBSD. Linux already had theMCAST_*constants. Apple needs#[repr(packed(4))]since the structs are under#pragma pack(4)there. DragonFly doesn't have this API, so it's FreeBSD-only.Sources
Linux
group_req/group_source_req(linux/in.h):Apple
group_req/group_source_req/MCAST_*(netinet/in.h):FreeBSD
group_req/group_source_req/MCAST_*(netinet/in.h):Checklist
libc-test/semverhave been updated*LASTor*MAXare includedcd libc-test && cargo test --target mytarget)