-
Notifications
You must be signed in to change notification settings - Fork 13
/
packet_others.go
33 lines (25 loc) · 1.22 KB
/
packet_others.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//go:build !linux
// +build !linux
package packet
import (
"fmt"
"net"
"runtime"
"syscall"
"time"
"golang.org/x/net/bpf"
)
// errUnimplemented is returned by all functions on non-Linux platforms.
var errUnimplemented = fmt.Errorf("packet: not implemented on %s", runtime.GOOS)
func listen(_ *net.Interface, _ Type, _ int, _ *Config) (*Conn, error) { return nil, errUnimplemented }
func (*Conn) readFrom(_ []byte) (int, net.Addr, error) { return 0, nil, errUnimplemented }
func (*Conn) writeTo(_ []byte, _ net.Addr) (int, error) { return 0, errUnimplemented }
func (*Conn) setPromiscuous(_ bool) error { return errUnimplemented }
func (*Conn) stats() (*Stats, error) { return nil, errUnimplemented }
type conn struct{}
func (*conn) Close() error { return errUnimplemented }
func (*conn) SetDeadline(_ time.Time) error { return errUnimplemented }
func (*conn) SetReadDeadline(_ time.Time) error { return errUnimplemented }
func (*conn) SetWriteDeadline(_ time.Time) error { return errUnimplemented }
func (*conn) SetBPF(_ []bpf.RawInstruction) error { return errUnimplemented }
func (*conn) SyscallConn() (syscall.RawConn, error) { return nil, errUnimplemented }