Add sharedsock example (#1116)

This commit is contained in:
Misha Bragin
2023-08-31 17:01:32 +02:00
committed by GitHub
parent 00dddb9458
commit d51dc4fd33
7 changed files with 97 additions and 6 deletions

View File

@ -2,8 +2,6 @@ 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