filters

package
v0.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowContext

type FlowContext struct {
	// contains filtered or unexported fields
}

FlowContext can carry state from one filter to another.

func NewFlowContext

func NewFlowContext() FlowContext

type FlowFilterFunc

type FlowFilterFunc func(flow *flowpb.Flow, fc *FlowContext) bool

FlowFilterFunc is a function to filter on a condition in a flow. It returns true if the condition is true.

type FlowFilterImplementation

type FlowFilterImplementation interface {
	Match(flow *flowpb.Flow, fc *FlowContext) bool
	String(fc *FlowContext) string
}

func And

And returns true if all filters return true

func DNS

func DNS(query string, rcode uint32) FlowFilterImplementation

DNS matches on proxied DNS packets containing a specific value, if any

func Drop

Drop matches on drops

func FIN

FIN matches on TCP packets with FIN+ACK flags

func HTTP

func HTTP(code uint32, method, url string) FlowFilterImplementation

HTTP matches on proxied HTTP packets containing a specific value, if any

func ICMP

ICMP matches on ICMP messages of the specified type

func ICMPv6

func ICMPv6(typ uint32) FlowFilterImplementation

ICMPv6 matches on ICMPv6 messages of the specified type

func IP

func IP(srcIP, dstIP string) FlowFilterImplementation

IP matches on IP packets with specified source and destination IP

func L7Drop added in v0.9.0

func L7Drop() FlowFilterImplementation

L7Drop matches on drops reported by L7 proxied

func Or

Or returns true if any FlowFilterImplementation return true

func RST

RST matches on TCP packets with RST+ACK flags

func SYN

SYN matches on TCP packets with SYN flag

func SYNACK

func SYNACK() FlowFilterImplementation

SYNACK matches on TCP packets with SYN+ACK flags

func TCP

func TCP(srcPort, dstPort uint32) FlowFilterImplementation

TCP matches on TCP packets with the specified source and destination ports

func TCPFlags

func TCPFlags(syn, ack, fin, rst bool) FlowFilterImplementation

TCPFlags matches on TCP packets with the specified TCP flags

func UDP

func UDP(srcPort, dstPort int) FlowFilterImplementation

UDP matches on UDP packets with the specified source and destination ports

type FlowRequirement

type FlowRequirement struct {
	Filter            FlowFilterImplementation
	Msg               string
	SkipOnAggregation bool
}

type FlowSetRequirement

type FlowSetRequirement struct {
	First  FlowRequirement
	Middle []FlowRequirement
	Last   FlowRequirement
	Except []FlowRequirement
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL