sockdump

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Unlicense Imports: 13 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 Flags

type Flags struct {
	SegSize      uint
	SegsPerMsg   uint
	SegsInBuffer uint

	Format string

	Output string

	Sock string
}

func NewFlags

func NewFlags() *Flags

func (*Flags) SockPath

func (f *Flags) SockPath() (path [108]byte)

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