unixdump

package
v0.0.0-...-5a97dfb Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotEnoughData = errors.New("not enough data")

ErrNotEnoughData not enough data

Functions

func NumCPU

func NumCPU() (int, error)

NumCPU returns the count of CPUs in the CPU affinity mask of the pid 1 process

Types

type Options

type Options struct {
	CommFilters   []string
	PidFilter     int
	SocketFilters []string
	EventHandler  func(event UnixEvent)
	PCAPOutput    bool
}

Options contains the parameters of UnixDump

type UnixDump

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

UnixDump is the main UnixDump structure

func NewUnixDump

func NewUnixDump(options Options) (*UnixDump, error)

NewUnixDump creates a new UnixDump instance

func (*UnixDump) Start

func (e *UnixDump) Start() error

Start hooks on the requested symbols and begins tracing

func (*UnixDump) Stop

func (e *UnixDump) Stop() error

Stop shuts down UnixDump

type UnixEvent

type UnixEvent struct {
	PID       uint32
	PeerPID   uint32
	PacketLen uint32
	SocketLen uint32
	Comm      string
	Socket    string
	Data      []byte
}

UnixEvent holds the content of a captured unix message

func (UnixEvent) String

func (ue UnixEvent) String() string

func (*UnixEvent) UnmarshallBinary

func (ue *UnixEvent) UnmarshallBinary(data []byte) error

UnmarshallBinary unmarshall a UnixEvent from its binary representation

Jump to

Keyboard shortcuts

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