diagnostic

package
v0.0.0-...-d220a22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSrc

func IsSrc(ctx *layerContext, tcp *layers.TCP) bool

src address of first TCP SYN

func ProcessEthernet

func ProcessEthernet(ctx *Context, eth *layers.Ethernet) error

func ProcessIPv4

func ProcessIPv4(ctx *Context, ip4 *layers.IPv4) error

func ProcessIPv6

func ProcessIPv6(ctx *Context, ip6 *layers.IPv6) error

func ProcessLoopback

func ProcessLoopback(ctx *Context, loop *layers.Loopback) error

func ProcessTCPFlow

func ProcessTCPFlow(ctx *Context) error

Flow

func ProcessUDP

func ProcessUDP(ctx *Context, udp *layers.UDP) error

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func NewContext

func NewContext(ci *gopacket.CaptureInfo) *Context

func (*Context) Finalize

func (c *Context) Finalize()

func (*Context) GetLayerContext

func (c *Context) GetLayerContext(l gopacket.LayerType) (*layerContext, error)

func (*Context) IsClosePkt

func (c *Context) IsClosePkt(l gopacket.LayerType) (bool, error)

func (*Context) IsOpenPkt

func (c *Context) IsOpenPkt(l gopacket.LayerType) (bool, error)

type FlowInfo

type FlowInfo struct {
	Addr     string `json:"address"`
	DupBytes uint64 `json:"-"` // Missed packets?
	OooBytes uint64 `json:"-"`
	HdrBytes uint64 `json:"-"`
	PayBytes uint64 `json:"-"`
	FlowHash uint64 `json:"-"`

	WinSize uint32 `json:"winSize"`

	DupPackets     uint64        `json:"-"`
	Packets        uint64        `json:"packets"`
	Bps            uint64        `json:"-"`
	Per            uint64        `json:"-"`
	Pps            uint64        `json:"pps"`
	Rtt            time.Duration `json:"-"`
	PrettyBps      string        `json:"bps"`
	PrettyHdrBytes string        `json:"hdrBytes"`
	PrettyPayBytes string        `json:"appBytes"`
	PrettyRtt      string        `json:"rtt"`
	// contains filtered or unexported fields
}

type LayerInfo

type LayerInfo struct {
	Dur       time.Duration `json:"-"`
	Dst       FlowInfo      `json:"dstFlow"` // Flow information for packets originating from destination
	Src       FlowInfo      `json:"srcFlow"` // Flow information for packets originating from source
	PrettyDur string        `json:"duration"`
}

type TcpDiagnostic

type TcpDiagnostic struct {
}

func (*TcpDiagnostic) ProcessLayer

func (t *TcpDiagnostic) ProcessLayer(ctx *Context, lyr gopacket.DecodingLayer) error

Packet func ProcessTCP(ctx *Context, tcp *layers.TCP) error {

type TraceTable

type TraceTable struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*TraceTable) GetLayerInfo

func (t *TraceTable) GetLayerInfo(ctx *Context, lt gopacket.LayerType) (*LayerInfo, error)

func (*TraceTable) Update

func (t *TraceTable) Update(ctx *Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL