From abe9d9f67f2c2c696ef26690fa8518dfc4e28728 Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Wed, 6 Jan 2021 11:39:14 -0800 Subject: Support add/remove IPv6 multicast group sock opt IPv4 was always supported but UDP never supported joining/leaving IPv6 multicast groups via socket options. Add: IPPROTO_IPV6, IPV6_JOIN_GROUP/IPV6_ADD_MEMBERSHIP Remove: IPPROTO_IPV6, IPV6_LEAVE_GROUP/IPV6_DROP_MEMBERSHIP Test: integration_test.TestUDPAddRemoveMembershipSocketOption PiperOrigin-RevId: 350396072 --- pkg/abi/linux/socket.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/abi/linux') diff --git a/pkg/abi/linux/socket.go b/pkg/abi/linux/socket.go index 556892dc3..8591acbf2 100644 --- a/pkg/abi/linux/socket.go +++ b/pkg/abi/linux/socket.go @@ -250,6 +250,12 @@ type SockAddrInet struct { _ [8]uint8 // pad to sizeof(struct sockaddr). } +// Inet6MulticastRequest is struct ipv6_mreq, from uapi/linux/in6.h. +type Inet6MulticastRequest struct { + MulticastAddr Inet6Addr + InterfaceIndex int32 +} + // InetMulticastRequest is struct ip_mreq, from uapi/linux/in.h. type InetMulticastRequest struct { MulticastAddr InetAddr -- cgit v1.2.3