sockdump

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const PCAP_LINK_TYPE = 147 // DLT_USER_0

Variables

This section is empty.

Functions

func HaveBPFLinkTracing

func HaveBPFLinkTracing() bool

Very hacky way to check whether tracing link is supported.

Types

type Config added in v0.1.1

type Config struct {
	Pid        uint32
	SegSize    uint32
	SegsPerMsg uint32
	SockPath   [108]byte
}

type Flags

type Flags struct {
	Pid          uint
	SegSize      uint
	SegsPerMsg   uint
	SegsInBuffer uint

	Format string

	Output string

	Sock string
}

func NewFlags

func NewFlags() *Flags

func (*Flags) Config added in v0.1.1

func (f *Flags) Config() Config

type Output

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

func NewOutput

func NewOutput(format, output string, segSize uint) (*Output, error)

func (*Output) Close

func (o *Output) Close() error

func (*Output) Output

func (o *Output) Output(pkt *Packet)

type Packet

type Packet struct {
	Pid     uint32
	PeerPid uint32
	Len     uint32
	Flags   uint32
	Comm    [16]byte
	Path    [108]byte
	Data    [1024 * 50]byte
}

Jump to

Keyboard shortcuts

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