Opened 4 years ago

Closed 4 years ago

#15666 closed enhancement (no change required)

posix/netinet6 IPV6_ADD_MEMBERSHIP missing

Reported by: kallisti5 Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Network & Internet/Stack Version: R1/Development
Keywords: ipv6 Cc:
Blocked By: Blocking:
Platform: All

Description

~> cat /system/develop/headers/posix/netinet/in.h | grep MEMBERSHIP
#define IP_ADD_MEMBERSHIP			12
#define IP_DROP_MEMBERSHIP			13
~> cat /system/develop/headers/posix/netinet6/in6.h | grep MEMBERSHIP

Rust is looking for IPV6_ADD_MEMBERSHIP / IPV6_DROP_MEMBERSHIP.

https://github.com/rust-lang-nursery/net2-rs/pull/53

Change History (3)

comment:1 by nielx, 4 years ago

The definitions are missing, but are they really?

There are some sources that seem to imply that they are the same.

I am just wondering whether we should add them as aliases in posix/netinet/in.h as part of the official API, or whether we just define them as aliases in Rust's libc?

comment:2 by pulkomandy, 4 years ago

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html in POSIX only has IPV6_JOIN_GROUP/IPV6_LEAVE_GROUP . To me it looks like Rust is using a non-standard name for the constant, and that should be fixed on Rust side?

comment:3 by nielx, 4 years ago

Resolution: no change required
Status: newclosed

It's not really the Rust side, it is the net2 crate and it seems that by default it goes to the Linuxism (?) of IPV6_ADD_MEMBERSHIP. I have submitted a PR to fix the net2 crate on Haiku.

Closing this enhancement as it is not necessary.

Note: See TracTickets for help on using tickets.