match

package
v1.3.5-alpha0802 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSuricataRuleLoader added in v1.2.7

func RegisterSuricataRuleLoader(h SuricataRuleLoaderType)

Types

type Group added in v1.2.7

type Group struct {
	HTTPMatcher     []*sync.Pool
	OrdinaryMatcher []*sync.Pool
	// contains filtered or unexported fields
}

Group is a group of rules

func NewGroup added in v1.2.7

func NewGroup(opt ...GroupOption) *Group

func (*Group) FeedFrame added in v1.2.7

func (g *Group) FeedFrame(raw []byte)

func (*Group) FeedHTTPFlow added in v1.2.7

func (g *Group) FeedHTTPFlow(src, dst string, srcPort, dstPort int, req *http.Request, rsp *http.Response)

func (*Group) FeedHTTPFlowBytes added in v1.2.7

func (g *Group) FeedHTTPFlowBytes(req, rsp []byte)

func (*Group) FeedHTTPRequestBytes added in v1.2.7

func (g *Group) FeedHTTPRequestBytes(reqBytes []byte)

func (*Group) FeedHTTPResponseBytes added in v1.2.7

func (g *Group) FeedHTTPResponseBytes(rsp []byte)

func (*Group) LoadRule added in v1.2.7

func (g *Group) LoadRule(r *rule.Rule)

func (*Group) LoadRules added in v1.2.7

func (g *Group) LoadRules(r ...*rule.Rule)

func (*Group) LoadRulesWithQuery added in v1.2.7

func (g *Group) LoadRulesWithQuery(query string) error

func (*Group) SetLoader added in v1.2.7

func (g *Group) SetLoader(loader SuricataRuleLoaderType)

func (*Group) Wait added in v1.2.7

func (g *Group) Wait()

type GroupOption added in v1.2.7

type GroupOption func(group *Group)

func WithGroupOnMatchedCallback added in v1.2.7

func WithGroupOnMatchedCallback(cb func(packet gopacket.Packet, match *rule.Rule)) GroupOption

type HttpFlow added in v1.2.7

type HttpFlow struct {
	ReqInstance *http.Request
	Src         string
	SrcPort     int
	Dst         string
	DstPort     int
	Req         []byte
	Rsp         []byte
	// contains filtered or unexported fields
}

func (*HttpFlow) ToRequestPacket added in v1.2.7

func (h *HttpFlow) ToRequestPacket() []gopacket.Packet

type Matcher

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

func New

func New(r *rule.Rule) *Matcher

func (*Matcher) Match

func (m *Matcher) Match(flow []byte) bool

func (*Matcher) MatchHTTPFlow added in v1.2.7

func (m *Matcher) MatchHTTPFlow(flow *HttpFlow) bool

func (*Matcher) MatchPackage added in v1.2.7

func (m *Matcher) MatchPackage(pk gopacket.Packet) bool

type SuricataRuleLoaderType added in v1.2.7

type SuricataRuleLoaderType func(query string) (chan *rule.Rule, error)

Jump to

Keyboard shortcuts

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