From 44b90221d709e5f0bac876829073cdc30bb8e5a5 Mon Sep 17 00:00:00 2001 From: Nick Carter <ncarter@flocknetworks.com> Date: Wed, 16 Oct 2019 17:04:46 +0100 Subject: [PATCH] Add struct ip_mreqn: ip multicast req with intf id The ip_mreqn struct has an additional interface id parameter. This allows programming IPv4 multicast groups using the interface id alongside the src IPv4 address. Linux has supported the ip_mreqn struct since Linux 2.2 ref: man ip.7 [Adding to linux x86_64 only as adding to linux_like/mod.rs caused failures in the sparc64 and mips64 C regression tests] --- src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs index d1a22943..74e2688c 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs @@ -261,6 +261,12 @@ s! { pub c_ispeed: ::speed_t, pub c_ospeed: ::speed_t, } + + pub struct ip_mreqn { + pub imr_multiaddr: ::in_addr, + pub imr_address: ::in_addr, + pub imr_ifindex: ::c_int, + } } s_no_extra_traits! { -- GitLab