capture: disable without cgo
This commit is contained in:
parent
20a248af16
commit
6836779a56
|
@ -1,3 +1,5 @@
|
|||
//go:build cgo
|
||||
|
||||
package capture
|
||||
|
||||
import (
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
//go:build !cgo
|
||||
|
||||
package capture
|
||||
|
||||
import "fmt"
|
||||
|
||||
import "inet.af/netaddr"
|
||||
|
||||
type nullReaderFromCloser interface {
|
||||
ReadFrom(b []byte) (body []byte, src netaddr.IP, ifindex int, err error)
|
||||
Close() error
|
||||
}
|
||||
|
||||
func FromInterface(string) (nullReaderFromCloser, error) {
|
||||
return nil, fmt.Errorf("packet capture disabled")
|
||||
}
|
Loading…
Reference in New Issue