Commit 9c9a3f3e authored by Matt Layher's avatar Matt Layher

bpf: add Setter interface

This interface can be implemented by types which are capable of
attaching compiled BPF filters to themselves, such as
x/net/ipv{4,6}.PacketConn.

Fixes golang/go#19912

Change-Id: I4674c3e312c173d5a7a3beb3cd53704f8c08e29b
Reviewed-on: https://go-review.googlesource.com/44972
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
parent 1a68b131
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bpf
// A Setter is a type which can attach a compiled BPF filter to itself.
type Setter interface {
SetBPF(filter []RawInstruction) error
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment