mirror of
https://github.com/golang/net.git
synced 2026-03-31 10:27:08 +09:00
go.net/ipv4: fix build on dragonfly, plan9, solaris
LGTM=aram, r R=golang-codereviews, 0intro, gobot, dave, aram, r CC=golang-codereviews https://golang.org/cl/49430047
This commit is contained in:
committed by
David du Colombier
parent
0cda728e61
commit
f3b815baac
@@ -2,13 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ipv4
|
||||
// +build dragonfly plan9 solaris
|
||||
|
||||
import "syscall"
|
||||
package ipv4
|
||||
|
||||
func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
|
||||
func newControlMessage(opt *rawOpt) []byte {
|
||||
@@ -18,7 +18,7 @@ func newControlMessage(opt *rawOpt) []byte {
|
||||
|
||||
func parseControlMessage(b []byte) (*ControlMessage, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return nil, syscall.EPLAN9
|
||||
return nil, errOpNoSupport
|
||||
}
|
||||
|
||||
func marshalControlMessage(cm *ControlMessage) []byte {
|
||||
@@ -2,49 +2,48 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build dragonfly plan9 solaris
|
||||
|
||||
package ipv4
|
||||
|
||||
import (
|
||||
"net"
|
||||
"syscall"
|
||||
)
|
||||
import "net"
|
||||
|
||||
func (c *dgramOpt) MulticastTTL() (int, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return 0, syscall.EPLAN9
|
||||
return 0, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) SetMulticastTTL(ttl int) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return nil, syscall.EPLAN9
|
||||
return nil, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) MulticastLoopback() (bool, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return false, syscall.EPLAN9
|
||||
return false, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) SetMulticastLoopback(on bool) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) JoinGroup(ifi *net.Interface, grp net.Addr) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) LeaveGroup(ifi *net.Interface, grp net.Addr) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
@@ -2,28 +2,26 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ipv4
|
||||
// +build dragonfly plan9 solaris
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
package ipv4
|
||||
|
||||
func (c *genericOpt) TOS() (int, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return 0, syscall.EPLAN9
|
||||
return 0, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *genericOpt) SetTOS(tos int) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *genericOpt) TTL() (int, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return 0, syscall.EPLAN9
|
||||
return 0, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *genericOpt) SetTTL(ttl int) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
errOpNoSupport = errors.New("operation not supported")
|
||||
errNoSuchInterface = errors.New("no such interface")
|
||||
errNoSuchMulticastInterface = errors.New("no such multicast interface")
|
||||
)
|
||||
|
||||
@@ -2,26 +2,26 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ipv4
|
||||
// +build dragonfly plan9 solaris
|
||||
|
||||
import "syscall"
|
||||
package ipv4
|
||||
|
||||
func (c *genericOpt) sysfd() (int, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return 0, syscall.EPLAN9
|
||||
return 0, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *dgramOpt) sysfd() (int, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return 0, syscall.EPLAN9
|
||||
return 0, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *payloadHandler) sysfd() (int, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return 0, syscall.EPLAN9
|
||||
return 0, errOpNoSupport
|
||||
}
|
||||
|
||||
func (c *packetHandler) sysfd() (int, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return 0, syscall.EPLAN9
|
||||
return 0, errOpNoSupport
|
||||
}
|
||||
@@ -2,16 +2,16 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ipv4
|
||||
// +build dragonfly plan9 solaris
|
||||
|
||||
import "syscall"
|
||||
package ipv4
|
||||
|
||||
func ipv4HeaderPrepend(fd int) (bool, error) {
|
||||
// TODO(mikio): Implement this
|
||||
return false, syscall.EPLAN9
|
||||
return false, errOpNoSupport
|
||||
}
|
||||
|
||||
func setIPv4HeaderPrepend(fd int, v bool) error {
|
||||
// TODO(mikio): Implement this
|
||||
return syscall.EPLAN9
|
||||
return errOpNoSupport
|
||||
}
|
||||
Reference in New Issue
Block a user