Documentation ¶
Index ¶
Constants ¶
View Source
const ( AND Operator = "and" OR = "or" NOOP = "" )
Supported operators
View Source
const ( SRC Dir = "src" DST = "dst" NODIR = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expr ¶
type Expr string
Expr represents a BPF expression. It's zero value is ready to use.
func FromAddr ¶ added in v0.4.0
FromAddr returns a BPF from a network address, plus direction information. Use NODIR to make a filter that matches both src and dst packets.
func (Expr) Join ¶ added in v0.4.0
Join returns a new expression, made of the conjunction of the caller with `r`, wrapped in an Expr. Callers have to ensure that operator precedence is preserved.
func (Expr) NewReader ¶
NewReader returns an io.Reader implementation, which will read the BPF expression from `e`. Later modifications of `e` will not affect the content of the reader.
Click to show internal directories.
Click to hide internal directories.