diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-07-22 18:15:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-07-22 18:15:38 +0000 |
commit | 22b955cca564a9a3a5b8c9d9dd1e295b7943c128 (patch) | |
tree | abdbd898676e1f853fca2d7e031d105d7ebcf676 /libgo/go/syscall/bpf_bsd.go | |
parent | 9d04a3af4c6491536badf6bde9707c907e4d196b (diff) | |
download | gcc-22b955cca564a9a3a5b8c9d9dd1e295b7943c128.zip gcc-22b955cca564a9a3a5b8c9d9dd1e295b7943c128.tar.gz gcc-22b955cca564a9a3a5b8c9d9dd1e295b7943c128.tar.bz2 |
libgo: update to go1.7rc3
Reviewed-on: https://go-review.googlesource.com/25150
From-SVN: r238662
Diffstat (limited to 'libgo/go/syscall/bpf_bsd.go')
-rw-r--r-- | libgo/go/syscall/bpf_bsd.go | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libgo/go/syscall/bpf_bsd.go b/libgo/go/syscall/bpf_bsd.go index cc6c1e7..8b58755 100644 --- a/libgo/go/syscall/bpf_bsd.go +++ b/libgo/go/syscall/bpf_bsd.go @@ -1,4 +1,4 @@ -// Copyright 2011 The Go Authors. All rights reserved. +// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -12,14 +12,17 @@ import ( "unsafe" ) +// Deprecated: Use golang.org/x/net/bpf instead. func BpfStmt(code, k int) *BpfInsn { return &BpfInsn{Code: uint16(code), K: uint32(k)} } +// Deprecated: Use golang.org/x/net/bpf instead. func BpfJump(code, k, jt, jf int) *BpfInsn { return &BpfInsn{Code: uint16(code), Jt: uint8(jt), Jf: uint8(jf), K: uint32(k)} } +// Deprecated: Use golang.org/x/net/bpf instead. func BpfBuflen(fd int) (int, error) { var l int _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGBLEN, uintptr(unsafe.Pointer(&l))) @@ -29,6 +32,7 @@ func BpfBuflen(fd int) (int, error) { return l, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpfBuflen(fd, l int) (int, error) { _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSBLEN, uintptr(unsafe.Pointer(&l))) if err != 0 { @@ -37,6 +41,7 @@ func SetBpfBuflen(fd, l int) (int, error) { return l, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func BpfDatalink(fd int) (int, error) { var t int _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGDLT, uintptr(unsafe.Pointer(&t))) @@ -46,6 +51,7 @@ func BpfDatalink(fd int) (int, error) { return t, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpfDatalink(fd, t int) (int, error) { _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSDLT, uintptr(unsafe.Pointer(&t))) if err != 0 { @@ -54,6 +60,7 @@ func SetBpfDatalink(fd, t int) (int, error) { return t, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpfPromisc(fd, m int) error { _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCPROMISC, uintptr(unsafe.Pointer(&m))) if err != 0 { @@ -62,6 +69,7 @@ func SetBpfPromisc(fd, m int) error { return nil } +// Deprecated: Use golang.org/x/net/bpf instead. func FlushBpf(fd int) error { _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCFLUSH, 0) if err != 0 { @@ -75,6 +83,7 @@ type ivalue struct { value int16 } +// Deprecated: Use golang.org/x/net/bpf instead. func BpfInterface(fd int, name string) (string, error) { var iv ivalue _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGETIF, uintptr(unsafe.Pointer(&iv))) @@ -84,6 +93,7 @@ func BpfInterface(fd int, name string) (string, error) { return name, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpfInterface(fd int, name string) error { var iv ivalue copy(iv.name[:], []byte(name)) @@ -94,6 +104,7 @@ func SetBpfInterface(fd int, name string) error { return nil } +// Deprecated: Use golang.org/x/net/bpf instead. func BpfTimeout(fd int) (*Timeval, error) { var tv Timeval _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGRTIMEOUT, uintptr(unsafe.Pointer(&tv))) @@ -103,6 +114,7 @@ func BpfTimeout(fd int) (*Timeval, error) { return &tv, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpfTimeout(fd int, tv *Timeval) error { _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSRTIMEOUT, uintptr(unsafe.Pointer(tv))) if err != 0 { @@ -111,6 +123,7 @@ func SetBpfTimeout(fd int, tv *Timeval) error { return nil } +// Deprecated: Use golang.org/x/net/bpf instead. func BpfStats(fd int) (*BpfStat, error) { var s BpfStat _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGSTATS, uintptr(unsafe.Pointer(&s))) @@ -120,6 +133,7 @@ func BpfStats(fd int) (*BpfStat, error) { return &s, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpfImmediate(fd, m int) error { _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCIMMEDIATE, uintptr(unsafe.Pointer(&m))) if err != 0 { @@ -128,6 +142,7 @@ func SetBpfImmediate(fd, m int) error { return nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpf(fd int, i []BpfInsn) error { var p BpfProgram p.Len = uint32(len(i)) @@ -139,6 +154,7 @@ func SetBpf(fd int, i []BpfInsn) error { return nil } +// Deprecated: Use golang.org/x/net/bpf instead. func CheckBpfVersion(fd int) error { var v BpfVersion _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCVERSION, uintptr(unsafe.Pointer(&v))) @@ -151,6 +167,7 @@ func CheckBpfVersion(fd int) error { return nil } +// Deprecated: Use golang.org/x/net/bpf instead. func BpfHeadercmpl(fd int) (int, error) { var f int _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCGHDRCMPLT, uintptr(unsafe.Pointer(&f))) @@ -160,6 +177,7 @@ func BpfHeadercmpl(fd int) (int, error) { return f, nil } +// Deprecated: Use golang.org/x/net/bpf instead. func SetBpfHeadercmpl(fd, f int) error { _, _, err := Syscall(SYS_IOCTL, uintptr(fd), BIOCSHDRCMPLT, uintptr(unsafe.Pointer(&f))) if err != 0 { |