]> Cypherpunks repositories - gostls13.git/commitdiff
net: no panic on placeholders for netbsd
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 28 Feb 2012 01:58:01 +0000 (10:58 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 28 Feb 2012 01:58:01 +0000 (10:58 +0900)
Perhaps it might be better than panic.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5701064

src/pkg/net/sockoptip_netbsd.go

index ccb9697cfba5b309cf462a196fced86504e0c8da..446d92aa343ae9fdb2d9d26bc47036ac1713fdcf 100644 (file)
@@ -2,14 +2,38 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build netbsd
+// IP-level socket options for NetBSD
 
 package net
 
+import "syscall"
+
+func ipv4MulticastInterface(fd *netFD) (*Interface, error) {
+       // TODO: Implement this
+       return nil, syscall.EAFNOSUPPORT
+}
+
 func setIPv4MulticastInterface(fd *netFD, ifi *Interface) error {
-       panic("unimplemented")
+       // TODO: Implement this
+       return syscall.EAFNOSUPPORT
+}
+
+func ipv4MulticastLoopback(fd *netFD) (bool, error) {
+       // TODO: Implement this
+       return false, syscall.EAFNOSUPPORT
 }
 
 func setIPv4MulticastLoopback(fd *netFD, v bool) error {
-       panic("unimplemented")
+       // TODO: Implement this
+       return syscall.EAFNOSUPPORT
+}
+
+func ipv4ReceiveInterface(fd *netFD) (bool, error) {
+       // TODO: Implement this
+       return false, syscall.EAFNOSUPPORT
+}
+
+func setIPv4ReceiveInterface(fd *netFD, v bool) error {
+       // TODO: Implement this
+       return syscall.EAFNOSUPPORT
 }