forked from subspace-com/fast_afpacket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconn_other.go
25 lines (19 loc) · 816 Bytes
/
conn_other.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
//go:build !linux
package fastafpacket
import (
"fmt"
"net"
"runtime"
"golang.org/x/net/bpf"
)
var errNotSupported = fmt.Errorf("packet: not supported on %s", runtime.GOOS)
func (c *Conn) recvTimestamps(_ []byte, _ int) (int, net.Addr, SocketTimestamps, error) {
return 0, nil, SocketTimestamps{}, errNotSupported
}
func (c *Conn) readFrom(_ []byte) (int, net.Addr, error) { return 0, nil, errNotSupported }
func (c *Conn) writeTo(_ []byte, _ net.Addr) (int, error) { return 0, errNotSupported }
func (c *Conn) setBPF(_ []bpf.RawInstruction) error { return errNotSupported }
func (c *Conn) stats() (*Stats, error) { return nil, errNotSupported }
func Listen(iface *net.Interface, socketType int, socketProtocol int, config *Config) (*Conn, error) {
return nil, errNotSupported
}