Documentation ¶
Index ¶
- Constants
- Variables
- type AppStats
- func (as *AppStats) DecLiveTcpStreams()
- func (as *AppStats) DumpStats() *AppStats
- func (as *AppStats) IncDroppedTcpStreams()
- func (as *AppStats) IncIgnoredLastAckCount()
- func (as *AppStats) IncIgnoredPacketsCount()
- func (as *AppStats) IncLiveTcpStreams()
- func (as *AppStats) IncMatchedPairs()
- func (as *AppStats) IncPacketsCount() uint64
- func (as *AppStats) IncReassembledTcpPayloadsCount()
- func (as *AppStats) IncTcpPacketsCount()
- func (as *AppStats) IncThrottledPackets()
- func (as *AppStats) IncTlsConnectionsCount()
- func (as *AppStats) SetStartTime(startTime time.Time)
- func (as *AppStats) UpdateProcessedBytes(size uint64)
- type BaseEntry
- type Capture
- type ConnectionInfo
- type CounterPair
- type Dissector
- type Emitter
- type Emitting
- type Entry
- type EntryWrapper
- type Extension
- type GenericMessage
- type OutputChannelItem
- type Protocol
- type ProtocolSummary
- type ReadProgress
- type RequestResponseMatcher
- type RequestResponsePair
- type SectionData
- type SerializableRegexp
- type TCP
- type TableData
- type TcpID
- type TcpReader
- type TcpReaderDataMsg
- type TcpStream
- type TcpStreamMap
- type TrafficFilteringOptions
Constants ¶
View Source
const ( TABLE string = "table" BODY string = "body" )
View Source
const UnknownNamespace = ""
Variables ¶
View Source
var UnknownIp = net.IP{0, 0, 0, 0}
View Source
var UnknownPort uint16 = 0
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"` IgnoredPacketsCount uint64 `json:"ignoredPacketsCount"` ReassembledTcpPayloadsCount uint64 `json:"reassembledTcpPayloadsCount"` TlsConnectionsCount uint64 `json:"tlsConnectionsCount"` MatchedPairs uint64 `json:"matchedPairs"` DroppedTcpStreams uint64 `json:"droppedTcpStreams"` LiveTcpStreams uint64 `json:"liveTcpStreams"` IgnoredLastAckCount uint64 `json:"ignoredLastAckCount"` ThrottledPackets uint64 `json:"throttledPackets"` }
func (*AppStats) DecLiveTcpStreams ¶
func (as *AppStats) DecLiveTcpStreams()
func (*AppStats) IncDroppedTcpStreams ¶
func (as *AppStats) IncDroppedTcpStreams()
func (*AppStats) IncIgnoredLastAckCount ¶
func (as *AppStats) IncIgnoredLastAckCount()
func (*AppStats) IncIgnoredPacketsCount ¶
func (as *AppStats) IncIgnoredPacketsCount()
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) IncThrottledPackets ¶
func (as *AppStats) IncThrottledPackets()
func (*AppStats) IncTlsConnectionsCount ¶
func (as *AppStats) IncTlsConnectionsCount()
func (*AppStats) SetStartTime ¶
func (*AppStats) UpdateProcessedBytes ¶
type BaseEntry ¶
type BaseEntry struct { Id string `json:"id"` Protocol Protocol `json:"proto,omitempty"` Capture Capture `json:"capture"` 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 *TCP `json:"src"` Destination *TCP `json:"dst"` IsOutgoing bool `json:"isOutgoing,omitempty"` Latency int64 `json:"latency"` }
type ConnectionInfo ¶
type Dissector ¶
type Dissector interface { Register(*Extension) GetProtocols() map[string]*Protocol Ping() Dissect(b *bufio.Reader, reader TcpReader, options *TrafficFilteringOptions) error Analyze(item *OutputChannelItem, resolvedSource string, resolvedDestination string, namespace string) *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 OutputChannel chan *OutputChannelItem }
func (*Emitting) Emit ¶
func (e *Emitting) Emit(item *OutputChannelItem)
type Entry ¶
type Entry struct { Id string `json:"id"` Protocol ProtocolSummary `json:"protocol"` Capture Capture `json:"capture"` Source *TCP `json:"src"` Destination *TCP `json:"dst"` Namespace string `json:"namespace"` 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"` }
type EntryWrapper ¶
type GenericMessage ¶
type OutputChannelItem ¶
type OutputChannelItem struct { // `Protocol` is modified in later stages of data propagation. Therefore, it's not a pointer. Protocol Protocol Capture Capture Timestamp int64 ConnectionInfo *ConnectionInfo Pair *RequestResponsePair Namespace string }
type Protocol ¶
type Protocol struct { ProtocolSummary 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"` Priority uint8 `json:"priority"` }
type ProtocolSummary ¶
type ProtocolSummary struct { Name string `json:"name"` Version string `json:"version"` Abbreviation string `json:"abbr"` }
func GetProtocolSummary ¶
func GetProtocolSummary(inputString string) *ProtocolSummary
func (*ProtocolSummary) ToString ¶
func (protocol *ProtocolSummary) ToString() string
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 SectionData ¶
type SerializableRegexp ¶
func CompileRegexToSerializableRegexp ¶
func CompileRegexToSerializableRegexp(expr string) (*SerializableRegexp, error)
func (*SerializableRegexp) MarshalText ¶
func (r *SerializableRegexp) MarshalText() ([]byte, error)
MarshalText is used by json.Marshal.
func (*SerializableRegexp) UnmarshalText ¶
func (r *SerializableRegexp) UnmarshalText(text []byte) error
UnmarshalText is by json.Unmarshal.
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 TcpStream ¶
type TcpStream interface { SetProtocol(protocol *Protocol) GetOrigin() Capture GetReqResMatchers() []RequestResponseMatcher GetIsTapTarget() bool GetIsClosed() bool }
type TcpStreamMap ¶
type TrafficFilteringOptions ¶
type TrafficFilteringOptions struct {
IgnoredUserAgents []string
}
Click to show internal directories.
Click to hide internal directories.