diff options
author | Ian Gudger <igudger@google.com> | 2019-02-15 18:39:10 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-02-15 18:40:15 -0800 |
commit | c611dbc5a7399922588e3fd99b22bda19f684afe (patch) | |
tree | 2bf1ac2dd626e3996d889135a32c4807345bde16 /pkg/tcpip/tcpip.go | |
parent | e2dcce544297b2364ebd4874f6db0390aafa366e (diff) |
Implement IP_MULTICAST_IF.
This allows setting a default send interface for IPv4 multicast. IPv6 support
will come later.
PiperOrigin-RevId: 234251379
Change-Id: I65922341cd8b8880f690fae3eeb7ddfa47c8c173
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r-- | pkg/tcpip/tcpip.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 3cd431d4c..a6e47397a 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -473,6 +473,13 @@ type KeepaliveCountOption int // TTL value for multicast messages. The default is 1. type MulticastTTLOption uint8 +// MulticastInterfaceOption is used by SetSockOpt/GetSockOpt to specify a +// default interface for multicast. +type MulticastInterfaceOption struct { + NIC NICID + InterfaceAddr Address +} + // MembershipOption is used by SetSockOpt/GetSockOpt as an argument to // AddMembershipOption and RemoveMembershipOption. type MembershipOption struct { |