Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProtocolNames = []string{
"unknown",
"http",
"mysql",
"redis",
"pgsql",
"thrift",
"mongodb",
}
Protocol names
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol uint16
Protocol identifier.
type ProtocolData ¶
type ProtocolData interface{}
ProtocolData interface to represent an upper protocol private data. Used with types like HttpStream, MysqlStream, etc.
type ProtocolPlugin ¶
type ProtocolPlugin interface { // Called to initialize the Plugin Init(test_mode bool, results chan common.MapStr) error // Called to return the configured ports GetPorts() []int // Called when payload data is available for parsing. Parse(pkt *Packet, tcptuple *common.TcpTuple, dir uint8, private ProtocolData) ProtocolData // Called when the FIN flag is seen in the TCP stream. ReceivedFin(tcptuple *common.TcpTuple, dir uint8, private ProtocolData) ProtocolData // Called when a packets are missing from the tcp // stream. GapInStream(tcptuple *common.TcpTuple, dir uint8, nbytes int, private ProtocolData) (priv ProtocolData, drop bool) }
Functions to be exported by a protocol plugin
type Protocols ¶
type Protocols struct {
// contains filtered or unexported fields
}
list of protocol plugins
var Protos Protocols
Singleton of Protocols type.
func (Protocols) Get ¶
func (protocols Protocols) Get(proto Protocol) ProtocolPlugin
func (Protocols) GetAll ¶ added in v1.0.0
func (protocols Protocols) GetAll() map[Protocol]ProtocolPlugin
func (Protocols) Register ¶
func (protos Protocols) Register(proto Protocol, plugin ProtocolPlugin)
Click to show internal directories.
Click to hide internal directories.