net

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Walk

func Walk(fn WalkFunc, list ...string) error

func Watch

func Watch(ctx context.Context, tick time.Duration, fn WatchFunc, list ...string) error

func WatchEventString

func WatchEventString(ev WatchEvent) string

Types

type NifDiag

type NifDiag struct{}

func (*NifDiag) Capture

func (n *NifDiag) Capture(ifName string, filters ...string) error

type NifList

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

func (*NifList) FindAddr

func (n *NifList) FindAddr(name string) (pcap.Interface, error)

func (*NifList) FindIf

func (n *NifList) FindIf(name string) (pcap.Interface, error)

func (*NifList) Len

func (n *NifList) Len() int

func (*NifList) Refresh

func (n *NifList) Refresh() error

type StatsStream

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

statsStream will handle the actual decoding of stats requests.

func (*StatsStream) Reassembled

func (s *StatsStream) Reassembled(reassemblies []tcpassembly.Reassembly)

Reassembled is called whenever new packet data is available for reading. Reassembly objects contain stream data IN ORDER.

func (*StatsStream) ReassemblyComplete

func (s *StatsStream) ReassemblyComplete()

ReassemblyComplete is called when the TCP assembler believes a stream has finished.

type StatsStreamFactory

type StatsStreamFactory struct{}

simpleStreamFactory implements tcpassembly.StreamFactory

func (*StatsStreamFactory) New

func (factory *StatsStreamFactory) New(net, transport gopacket.Flow) tcpassembly.Stream

New creates a new stream. It's called whenever the assembler sees a stream it isn't currently following.

type WalkFunc

type WalkFunc func(net.Interface, error) error

type WatchEvent

type WatchEvent uint
const (
	EventNull WatchEvent = iota
	EventCreate
	EventModify
	EventDelete
)

type WatchFunc

type WatchFunc func(string, WatchEvent, error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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