Documentation
¶
Index ¶
- Constants
- type AppStats
- func (as *AppStats) DecLiveTcpStreams()
- func (as *AppStats) DumpStats() *AppStats
- func (as *AppStats) IncDnsPacketsCount()
- func (as *AppStats) IncDroppedTcpStreams()
- func (as *AppStats) IncLiveTcpStreams()
- func (as *AppStats) IncMatchedPairs()
- func (as *AppStats) IncPacketsCount() uint64
- func (as *AppStats) IncReassembledTcpPayloadsCount()
- func (as *AppStats) IncTcpPacketsCount()
- func (as *AppStats) IncTlsConnectionsCount()
- func (as *AppStats) SetStartTime(startTime time.Time)
- func (as *AppStats) UpdateProcessedBytes(size uint64)
- type BaseEntry
- type ConnectionInfo
- type CounterPair
- type Dissector
- type Emitter
- type Emitting
- type Entry
- type EntryWrapper
- type Extension
- type GenericMessage
- type Node
- type OutputChannelItem
- type Protocol
- type ReadProgress
- type RequestResponseMatcher
- type RequestResponsePair
- type Resolution
- type SectionData
- type TableData
- type TcpID
- type TcpReader
- type TcpReaderDataMsg
- type TcpStream
- type TcpStreamMap
Constants ¶
View Source
const ( TABLE string = "table" BODY string = "body" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppStats ¶
type AppStats struct {
StartTime time.Time `json:"-"`
ProcessedBytes uint64 `json:"processedBytes"`
PacketsCount uint64 `json:"packetsCount"`
TcpPacketsCount uint64 `json:"tcpPacketsCount"`
DnsPacketsCount uint64 `json:"dnsPacketsCount"`
ReassembledTcpPayloadsCount uint64 `json:"reassembledTcpPayloadsCount"`
TlsConnectionsCount uint64 `json:"tlsConnectionsCount"`
MatchedPairs uint64 `json:"matchedPairs"`
DroppedTcpStreams uint64 `json:"droppedTcpStreams"`
LiveTcpStreams uint64 `json:"liveTcpStreams"`
}
func (*AppStats) DecLiveTcpStreams ¶
func (as *AppStats) DecLiveTcpStreams()
func (*AppStats) IncDnsPacketsCount ¶
func (as *AppStats) IncDnsPacketsCount()
func (*AppStats) IncDroppedTcpStreams ¶
func (as *AppStats) IncDroppedTcpStreams()
func (*AppStats) IncLiveTcpStreams ¶
func (as *AppStats) IncLiveTcpStreams()
func (*AppStats) IncMatchedPairs ¶
func (as *AppStats) IncMatchedPairs()
func (*AppStats) IncPacketsCount ¶
func (*AppStats) IncReassembledTcpPayloadsCount ¶
func (as *AppStats) IncReassembledTcpPayloadsCount()
func (*AppStats) IncTcpPacketsCount ¶
func (as *AppStats) IncTcpPacketsCount()
func (*AppStats) IncTlsConnectionsCount ¶
func (as *AppStats) IncTlsConnectionsCount()
func (*AppStats) SetStartTime ¶
func (*AppStats) UpdateProcessedBytes ¶
type BaseEntry ¶
type BaseEntry struct {
Id string `json:"id"`
Stream string `json:"stream"`
Worker string `json:"worker"`
Protocol Protocol `json:"proto,omitempty"`
Tls bool `json:"tls"`
Summary string `json:"summary,omitempty"`
SummaryQuery string `json:"summaryQuery,omitempty"`
Status int `json:"status"`
StatusQuery string `json:"statusQuery"`
Method string `json:"method,omitempty"`
MethodQuery string `json:"methodQuery,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Source *Resolution `json:"src"`
Destination *Resolution `json:"dst"`
Outgoing bool `json:"outgoing"`
RequestSize int `json:"requestSize"`
ResponseSize int `json:"responseSize"`
ElapsedTime int64 `json:"elapsedTime"`
Passed bool `json:"passed"`
Failed bool `json:"failed"`
}
{Worker}/{Id} uniquely identifies an item
type ConnectionInfo ¶
type Dissector ¶
type Dissector interface {
Register(*Extension)
Dissect(b *bufio.Reader, reader TcpReader) error
Analyze(item *OutputChannelItem, resolvedSource *Resolution, resolvedDestination *Resolution) *Entry
Summarize(entry *Entry) *BaseEntry
Represent(request map[string]interface{}, response map[string]interface{}) (object []byte, err error)
Macros() map[string]string
NewResponseRequestMatcher() RequestResponseMatcher
}
type Emitter ¶
type Emitter interface {
Emit(item *OutputChannelItem)
}
type Emitting ¶
type Emitting struct {
AppStats *AppStats
Stream TcpStream
OutputChannel chan *OutputChannelItem
}
func (*Emitting) Emit ¶
func (e *Emitting) Emit(item *OutputChannelItem)
type Entry ¶
type Entry struct {
Id string `json:"id"`
Index int64 `json:"index"`
Stream string `json:"stream"`
Worker string `json:"worker"`
Node *Node `json:"node"`
Protocol Protocol `json:"protocol"`
Tls bool `json:"tls"`
Source *Resolution `json:"src"`
Destination *Resolution `json:"dst"`
Outgoing bool `json:"outgoing"`
Timestamp int64 `json:"timestamp"`
StartTime time.Time `json:"startTime"`
Request map[string]interface{} `json:"request"`
Response map[string]interface{} `json:"response"`
RequestSize int `json:"requestSize"`
ResponseSize int `json:"responseSize"`
ElapsedTime int64 `json:"elapsedTime"`
Passed bool `json:"passed"`
Failed bool `json:"failed"`
}
{Worker}/{Stream}-{Index} uniquely identifies an item
type EntryWrapper ¶
type GenericMessage ¶
type OutputChannelItem ¶
type OutputChannelItem struct {
Index int64
Stream string
Protocol Protocol
Timestamp int64
ConnectionInfo *ConnectionInfo
Pair *RequestResponsePair
}
{Stream}-{Index} uniquely identifies an item `Protocol` is modified in later stages of data propagation. Therefore, it's not a pointer.
type Protocol ¶
type Protocol struct {
Name string `json:"name"`
Version string `json:"version"`
Abbreviation string `json:"abbr"`
LongName string `json:"longName"`
Macro string `json:"macro"`
BackgroundColor string `json:"backgroundColor"`
ForegroundColor string `json:"foregroundColor"`
FontSize int8 `json:"fontSize"`
ReferenceLink string `json:"referenceLink"`
Ports []string `json:"ports"`
Layer4 string `json:"layer4"`
Priority uint8 `json:"priority"`
}
type ReadProgress ¶
type ReadProgress struct {
// contains filtered or unexported fields
}
func (*ReadProgress) Current ¶
func (p *ReadProgress) Current() (n int)
func (*ReadProgress) Feed ¶
func (p *ReadProgress) Feed(n int)
func (*ReadProgress) Reset ¶
func (p *ReadProgress) Reset()
type RequestResponseMatcher ¶
type RequestResponsePair ¶
type RequestResponsePair struct {
Request GenericMessage `json:"request"`
Response GenericMessage `json:"response"`
}
type Resolution ¶
type SectionData ¶
type TcpReader ¶
type TcpReader interface {
Read(p []byte) (int, error)
GetReqResMatcher() RequestResponseMatcher
GetIsClient() bool
GetReadProgress() *ReadProgress
GetParent() TcpStream
GetTcpID() *TcpID
GetCounterPair() *CounterPair
GetCaptureTime() time.Time
GetEmitter() Emitter
GetIsClosed() bool
}
type TcpReaderDataMsg ¶
type TcpReaderDataMsg interface {
GetBytes() []byte
GetTimestamp() time.Time
GetCaptureInfo() gopacket.CaptureInfo
}
type TcpStreamMap ¶
Click to show internal directories.
Click to hide internal directories.