Documentation ¶
Overview ¶
Package bytematcher builds a matching engine from a set of signatures and performs concurrent matching against an input siegreader.Buffer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
Matcher matches byte signatures against the siegreader.Buffer.
func (*Matcher) Identify ¶
func (b *Matcher) Identify(name string, sb *siegreader.Buffer, exclude ...int) (chan core.Result, error)
Identify matches a Matcher's signatures against the input siegreader.Buffer. Results are passed on the returned channel.
Example:
ret := bm.Identify("", buf) for v := range ret { if v.Index() == 0 { fmt.Print("Success! It is signature 0!") } }
func (*Matcher) InspectTestTree ¶
InspectTestTree reports which signatures are linked to a given index in the test tree. This is used by the -log debug and -log slow options for sf.
type SignatureSet ¶
SignatureSet for a bytematcher is a slice of frames.Signature.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package frames describes the Frame interface.
|
Package frames describes the Frame interface. |
tests
Package tests exports shared frames and signatures for use by the other bytematcher packages
|
Package tests exports shared frames and signatures for use by the other bytematcher packages |
Package patterns describes the Pattern interface.
|
Package patterns describes the Pattern interface. |
tests
Package tests exports shared patterns for use by the other bytematcher packages
|
Package tests exports shared patterns for use by the other bytematcher packages |
Click to show internal directories.
Click to hide internal directories.