func ipv4MulticastLoopback(fd int) (bool, error) { v, err := syscall.GetsockoptByte(fd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_LOOP) if err != nil { return false, os.NewSyscallError("getsockopt", err) } return v == 1, nil }
func ipv4MulticastTTL(fd int) (int, error) { v, err := syscall.GetsockoptByte(fd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_TTL) if err != nil { return 0, os.NewSyscallError("getsockopt", err) } return int(v), nil }
func ipv4MulticastLoopback(fd int) (bool, error) { v, err := syscall.GetsockoptByte(fd, ianaProtocolIP, sysSockoptMulticastLoopback) if err != nil { return false, os.NewSyscallError("getsockopt", err) } return v == 1, nil }
func ipv4MulticastTTL(fd int) (int, error) { v, err := syscall.GetsockoptByte(fd, ianaProtocolIP, sysSockoptMulticastTTL) if err != nil { return 0, os.NewSyscallError("getsockopt", err) } return int(v), nil }
func ipv4MulticastTTL(fd *netFD) (int, error) { fd.incref() defer fd.decref() v, err := syscall.GetsockoptByte(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_TTL) if err != nil { return -1, os.NewSyscallError("getsockopt", err) } return int(v), nil }
func ipv4MulticastLoopback(fd *netFD) (bool, error) { fd.incref() defer fd.decref() v, err := syscall.GetsockoptByte(fd.sysfd, syscall.IPPROTO_IP, syscall.IP_MULTICAST_LOOP) if err != nil { return false, os.NewSyscallError("getsockopt", err) } return v == 1, nil }