1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 func setKernelSpecificSockopt(s syscall.Handle, f int) {
15 syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_BROADCAST, 1)
17 if f == syscall.AF_INET6 {
18 // using ip, tcp, udp, etc.
19 // allow both protocols even if the OS default is otherwise.
20 syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, 0)