mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-30 03:54:35 +01:00
12 lines
360 B
Go
12 lines
360 B
Go
|
package sharedsock
|
||
|
|
||
|
import "golang.org/x/net/bpf"
|
||
|
|
||
|
const magicCookie uint32 = 0x2112A442
|
||
|
|
||
|
// BPFFilter is a generic filter that provides ipv4 and ipv6 BPF instructions
|
||
|
type BPFFilter interface {
|
||
|
// GetInstructions returns raw BPF instructions for ipv4 and ipv6
|
||
|
GetInstructions(port uint32) (ipv4 []bpf.RawInstruction, ipv6 []bpf.RawInstruction, err error)
|
||
|
}
|