Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3609,6 +3609,8 @@ gmtime
gmtime_r
grantpt
group
group_req
group_source_req
hostent
id_t
idtype_t
Expand Down
8 changes: 8 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,12 @@ MAXPHASE
MAXSEC
MAXTC
MAXTHREADNAMESIZE
MCAST_BLOCK_SOURCE
MCAST_JOIN_GROUP
MCAST_JOIN_SOURCE_GROUP
MCAST_LEAVE_GROUP
MCAST_LEAVE_SOURCE_GROUP
MCAST_UNBLOCK_SOURCE
MCL_CURRENT
MCL_FUTURE
MDMBUF
Expand Down Expand Up @@ -2018,6 +2024,8 @@ getxattr
glob
glob_t
globfree
group_req
group_source_req
host_cpu_load_info
host_cpu_load_info_data_t
host_cpu_load_info_t
Expand Down
8 changes: 8 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,12 @@ MAXFREQ
MAXPHASE
MAXSEC
MAXTC
MCAST_BLOCK_SOURCE
MCAST_JOIN_GROUP
MCAST_JOIN_SOURCE_GROUP
MCAST_LEAVE_GROUP
MCAST_LEAVE_SOURCE_GROUP
MCAST_UNBLOCK_SOURCE
MCL_CURRENT
MCL_FUTURE
MDMBUF
Expand Down Expand Up @@ -2065,6 +2071,8 @@ getutxuser
glob
glob_t
globfree
group_req
group_source_req
hexdump
humanize_number
icmp6_ifstat
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/l4re.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2201,6 +2201,8 @@ gid_t
gmtime
gmtime_r
group
group_req
group_source_req
hostent
hstrerror
iconv
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4179,6 +4179,8 @@ getspnam
getspnam_r
gettid
getxattr
group_req
group_source_req
hasmntopt
hwtstamp_config
iconv
Expand Down
22 changes: 22 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,20 @@ s! {
__ss_pad2: Padding<[u8; 112]>,
}

// netinet/in.h: RFC 3678 multicast group membership requests.
#[repr(packed(4))]
pub struct group_req {
pub gr_interface: u32,
pub gr_group: crate::sockaddr_storage,
}

#[repr(packed(4))]
pub struct group_source_req {
pub gsr_interface: u32,
pub gsr_group: crate::sockaddr_storage,
pub gsr_source: crate::sockaddr_storage,
}

pub struct utmpx {
pub ut_user: [c_char; _UTX_USERSIZE],
pub ut_id: [c_char; _UTX_IDSIZE],
Expand Down Expand Up @@ -2611,6 +2625,14 @@ pub const IPPROTO_MAX: c_int = 256;
/// last return value of *_input(), meaning "all job for this pkt is done".
pub const IPPROTO_DONE: c_int = 257;

// RFC 3678 protocol-independent multicast
pub const MCAST_JOIN_GROUP: c_int = 80;
pub const MCAST_LEAVE_GROUP: c_int = 81;
pub const MCAST_JOIN_SOURCE_GROUP: c_int = 82;
pub const MCAST_LEAVE_SOURCE_GROUP: c_int = 83;
pub const MCAST_BLOCK_SOURCE: c_int = 84;
pub const MCAST_UNBLOCK_SOURCE: c_int = 85;

pub const AF_UNSPEC: c_int = 0;
pub const AF_LOCAL: c_int = 1;
pub const AF_UNIX: c_int = AF_LOCAL;
Expand Down
20 changes: 20 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,24 @@ s! {
pub ip6: *mut crate::in6_addr,
}

// netinet/in.h: RFC 3678 multicast group membership requests
pub struct ip_mreq_source {
pub imr_multiaddr: crate::in_addr,
pub imr_sourceaddr: crate::in_addr,
pub imr_interface: crate::in_addr,
}

pub struct group_req {
pub gr_interface: u32,
pub gr_group: crate::sockaddr_storage,
}

pub struct group_source_req {
pub gsr_interface: u32,
pub gsr_group: crate::sockaddr_storage,
pub gsr_source: crate::sockaddr_storage,
}

pub struct statvfs {
pub f_bavail: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
Expand Down Expand Up @@ -3075,6 +3087,14 @@ pub const IPPROTO_DIVERT: c_int = 258;
/// SeND pseudo-protocol
pub const IPPROTO_SEND: c_int = 259;

// RFC 3678 protocol-independent multicast
pub const MCAST_JOIN_GROUP: c_int = 80;
pub const MCAST_LEAVE_GROUP: c_int = 81;
pub const MCAST_JOIN_SOURCE_GROUP: c_int = 82;
pub const MCAST_LEAVE_SOURCE_GROUP: c_int = 83;
pub const MCAST_BLOCK_SOURCE: c_int = 84;
pub const MCAST_UNBLOCK_SOURCE: c_int = 85;

// sys/netinet/TCP.h
pub const TCP_MD5SIG: c_int = 16;
pub const TCP_INFO: c_int = 32;
Expand Down
12 changes: 12 additions & 0 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,24 @@ s! {
pub imr_ifindex: c_int,
}

// netinet/in.h: RFC 3678 multicast group membership requests
pub struct ip_mreq_source {
pub imr_multiaddr: in_addr,
pub imr_interface: in_addr,
pub imr_sourceaddr: in_addr,
}

pub struct group_req {
pub gr_interface: u32,
pub gr_group: crate::sockaddr_storage,
}

pub struct group_source_req {
pub gsr_interface: u32,
pub gsr_group: crate::sockaddr_storage,
pub gsr_source: crate::sockaddr_storage,
}

pub struct sockaddr {
pub sa_family: sa_family_t,
pub sa_data: [c_char; 14],
Expand Down