MCPcopy Index your code
hub / github.com/dreadl0ck/netcap / DecoderAPI

Interface DecoderAPI

decoder/core/api.go:28–65  ·  view source on GitHub ↗

DecoderAPI describes functionality of a decoder.

Source from the content-addressed store, hash-verified

26
27// DecoderAPI describes functionality of a decoder.
28type DecoderAPI interface {
29
30 // PostInitFunc is called after the decoder has been initialized
31 PostInitFunc() error
32
33 // DeInitFunc is called prior to teardown
34 DeInitFunc() error
35
36 // GetName returns the name of the decoder
37 GetName() string
38
39 // SetWriter sets the netcap writer to use for the decoder
40 SetWriter(io.AuditRecordWriter)
41
42 // GetWriter returns the current writer
43 GetWriter() io.AuditRecordWriter
44
45 // GetType returns the netcap type of the decoder
46 GetType() types.Type
47
48 // GetDescription returns the description of the decoder
49 GetDescription() string
50
51 // GetChan returns a channel to receive serialized audit records from the decoder
52 GetChan() <-chan []byte
53
54 // Destroy initiates teardown
55 Destroy() (string, int64)
56
57 // NumRecords returns the number of processed audit records
58 NumRecords() int64
59
60 // FlushCurrentState writes the current state of accumulating records to disk
61 // without clearing the in-memory state. This is used during live capture
62 // to periodically make data visible while continuing to track state.
63 // Returns the number of records flushed.
64 FlushCurrentState() int64
65}

Callers 44

InitAbstractDecodersFunction · 0.65
InitDecodersFunction · 0.65
InitPacketDecodersFunction · 0.65
workerMethod · 0.65
statsMethod · 0.65
printTreeViewMethod · 0.65
initFunction · 0.65
InitAbstractDecodersFunction · 0.65
initFunction · 0.65

Implementers 2

Decoderdecoder/packet/packet_decoder.go
GoPacketDecoderdecoder/packet/gopacket_decoder.go

Calls

no outgoing calls

Tested by

no test coverage detected