net, syscall: remove BindToDevice API from UDPConn, IPConn

For now a pair of socket options SOL_SOCKET and SO_BINDTODEVICE
is supported on Linux only. I'd like to demote BindToDevice API
to syscall level because it's Linux dependent one.

In the near future, probably we may have a bit more portable
API that using IPROTO_IP/IPV6 level socket options to specify,
identify an inbound, outbound IP interface on incoming, outgoing
UDP and raw IP packets.

R=cw, golang-dev
CC=golang-dev
https://golang.org/cl/5447071
This commit is contained in:
Mikio Hara 2011-12-02 23:18:16 +09:00
parent 30775f67e7
commit cf4acf80b4
5 changed files with 0 additions and 35 deletions

View file

@ -522,15 +522,6 @@ func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
return
}
// TODO:
// FreeBSD has IP_SENDIF. Darwin probably needs BSDLLCTest, see:
// http://developer.apple.com/mac/library/samplecode/BSDLLCTest/index.html
// BindToDevice binds the socket associated with fd to device.
func BindToDevice(fd int, device string) (err error) {
return ENOSYS
}
//sys kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, timeout *Timespec) (n int, err error)
func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) {