Documentation ¶
Index ¶
- type AbstractDecoder
- func (ad *AbstractDecoder) DeInitFunc() error
- func (ad *AbstractDecoder) Destroy() (name string, size int64)
- func (ad *AbstractDecoder) GetChan() <-chan []byte
- func (ad *AbstractDecoder) GetDescription() string
- func (ad *AbstractDecoder) GetName() string
- func (ad *AbstractDecoder) GetType() types.Type
- func (ad *AbstractDecoder) NumRecords() int64
- func (ad *AbstractDecoder) PostInitFunc() error
- func (ad *AbstractDecoder) SetWriter(w netio.AuditRecordWriter)
- type StreamDecoder
- func (sd *StreamDecoder) CanDecodeStream(client []byte, server []byte) bool
- func (sd *StreamDecoder) DeInitFunc() error
- func (sd *StreamDecoder) Destroy() (name string, size int64)
- func (sd *StreamDecoder) GetChan() <-chan []byte
- func (sd *StreamDecoder) GetDescription() string
- func (sd *StreamDecoder) GetName() string
- func (sd *StreamDecoder) GetReaderFactory() core.StreamDecoderFactory
- func (sd *StreamDecoder) GetType() types.Type
- func (sd *StreamDecoder) NumRecords() int64
- func (sd *StreamDecoder) PostInitFunc() error
- func (sd *StreamDecoder) SetWriter(w netio.AuditRecordWriter)
- func (sd *StreamDecoder) Transport() core.TransportProtocol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractDecoder ¶
type AbstractDecoder struct { // used to keep track of the number of generated audit records NumRecordsWritten int64 // Name of the decoder Name string // Description of the decoder Description string // Icon name for the decoder (for Maltego) Icon string // init functions PostInit func(decoder *AbstractDecoder) error DeInit func(decoder *AbstractDecoder) error // Writer for audit records Writer netio.AuditRecordWriter // Type of the audit records produced by this decoder Type types.Type }
AbstractDecoder implements custom logic to decode data from a TCP / UDP network conversation this structure has an optimized field order to avoid excessive padding.
func (*AbstractDecoder) DeInitFunc ¶
func (ad *AbstractDecoder) DeInitFunc() error
DeInitFunc is called prior to teardown.
func (*AbstractDecoder) Destroy ¶
func (ad *AbstractDecoder) Destroy() (name string, size int64)
Destroy closes and flushes all writers and calls deinit if set.
func (*AbstractDecoder) GetChan ¶
func (ad *AbstractDecoder) GetChan() <-chan []byte
GetChan returns a channel to receive serialized protobuf data from the decoder.
func (*AbstractDecoder) GetDescription ¶
func (ad *AbstractDecoder) GetDescription() string
GetDescription returns the description of the
func (*AbstractDecoder) GetName ¶
func (ad *AbstractDecoder) GetName() string
GetName returns the name of the
func (*AbstractDecoder) GetType ¶
func (ad *AbstractDecoder) GetType() types.Type
GetType returns the netcap type of the
func (*AbstractDecoder) NumRecords ¶
func (ad *AbstractDecoder) NumRecords() int64
NumRecords returns the number of written records.
func (*AbstractDecoder) PostInitFunc ¶
func (ad *AbstractDecoder) PostInitFunc() error
PostInitFunc is called after the decoder has been initialized.
func (*AbstractDecoder) SetWriter ¶
func (ad *AbstractDecoder) SetWriter(w netio.AuditRecordWriter)
SetWriter sets the netcap writer to use for the
type StreamDecoder ¶
type StreamDecoder struct { // used to keep track of the number of generated audit records NumRecordsWritten int64 // Name of the decoder Name string // Description of the decoder Description string // Icon name for the decoder (for Maltego) Icon string // init functions PostInit func(decoder *StreamDecoder) error DeInit func(decoder *StreamDecoder) error // Writer for audit records Writer netio.AuditRecordWriter // Type of the audit records produced by this decoder Type types.Type // canDecode checks whether the decoder can parse the protocol CanDecode func(client []byte, server []byte) bool // factory for stream readers Factory core.StreamDecoderFactory Typ core.TransportProtocol }
StreamDecoder implements custom logic to decode data from a TCP / UDP network conversation this structure has an optimized field order to avoid excessive padding.
func (*StreamDecoder) CanDecodeStream ¶
func (sd *StreamDecoder) CanDecodeStream(client []byte, server []byte) bool
CanDecodeStream invokes the canDecode function of the underlying decoder to determine whether the decoder can understand the protocol.
func (*StreamDecoder) DeInitFunc ¶
func (sd *StreamDecoder) DeInitFunc() error
DeInitFunc is called prior to teardown.
func (*StreamDecoder) Destroy ¶
func (sd *StreamDecoder) Destroy() (name string, size int64)
Destroy closes and flushes all writers and calls deinit if set.
func (*StreamDecoder) GetChan ¶
func (sd *StreamDecoder) GetChan() <-chan []byte
GetChan returns a channel to receive serialized protobuf data from the decoder.
func (*StreamDecoder) GetDescription ¶
func (sd *StreamDecoder) GetDescription() string
GetDescription returns the description of the
func (*StreamDecoder) GetName ¶
func (sd *StreamDecoder) GetName() string
GetName returns the name of the
func (*StreamDecoder) GetReaderFactory ¶
func (sd *StreamDecoder) GetReaderFactory() core.StreamDecoderFactory
GetReaderFactory returns a new stream reader for the decoder type.
func (*StreamDecoder) GetType ¶
func (sd *StreamDecoder) GetType() types.Type
GetType returns the netcap type of the
func (*StreamDecoder) NumRecords ¶
func (sd *StreamDecoder) NumRecords() int64
NumRecords returns the number of written records.
func (*StreamDecoder) PostInitFunc ¶
func (sd *StreamDecoder) PostInitFunc() error
PostInitFunc is called after the decoder has been initialized.
func (*StreamDecoder) SetWriter ¶
func (sd *StreamDecoder) SetWriter(w netio.AuditRecordWriter)
SetWriter sets the netcap writer to use for the
func (*StreamDecoder) Transport ¶
func (sd *StreamDecoder) Transport() core.TransportProtocol
Transport returns the transport protocol (Layer 4 in the OSI model)
Directories ¶
Path | Synopsis |
---|---|
Package packet Package decoder implements decoders to transform network packets into protocol buffers for various protocols
|
Package packet Package decoder implements decoders to transform network packets into protocol buffers for various protocols |