mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
27 lines
674 B
Go
27 lines
674 B
Go
//go:build !linux
|
|
|
|
package capture
|
|
|
|
import "errors"
|
|
|
|
// AFPacketCapture is not available on this platform.
|
|
type AFPacketCapture struct{}
|
|
|
|
// NewAFPacketCapture returns nil on non-Linux platforms.
|
|
func NewAFPacketCapture(string, *Session) *AFPacketCapture { return nil }
|
|
|
|
// Start returns an error on non-Linux platforms.
|
|
func (c *AFPacketCapture) Start() error {
|
|
return errors.New("AF_PACKET capture is only supported on Linux")
|
|
}
|
|
|
|
// Stop is a no-op on non-Linux platforms.
|
|
func (c *AFPacketCapture) Stop() {
|
|
// no-op on non-Linux platforms
|
|
}
|
|
|
|
// Offer is a no-op on non-Linux platforms.
|
|
func (c *AFPacketCapture) Offer([]byte, bool) {
|
|
// no-op on non-Linux platforms
|
|
}
|