github.com/jspc/eggos@v0.5.1-0.20221028160421-556c75c878a5/inet/ndev.go (about) 1 package inet 2 3 import "gvisor.dev/gvisor/pkg/tcpip/stack" 4 5 var DefaultDevice Device 6 7 type Device interface { 8 Mac() [6]byte 9 Transmit(pkt *stack.PacketBuffer) error 10 SetReceiveCallback(func(b []byte)) 11 } 12 13 func RegisterDevice(d Device) { 14 DefaultDevice = d 15 }