ebpf

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetManagerInstance

func GetManagerInstance() *filtersManager

func NewPerfReader

func NewPerfReader(log logr.Logger, rd *perf.Reader, parser eventParserFunc) *perfReader

Types

type NetstateEvent

type NetstateEvent struct {
	NetNs uint32
	PID   uint32
	TS    uint64
	Comm  [16]byte
	// SrcAddr is the local address.
	SrcAddr net.IP
	// DstAddr is the remote address.
	DstAddr net.IP
	// Last state is the state transition - should probably be changed to somthing more useful
	LastState uint16
	// Last state is the state transition - should probably be changed to somthing more useful
	NewState uint16
	// AddrFam is the address family, 2 is AF_INET (IPv4), 10 is AF_INET6 (IPv6).
	AddrFam uint32
	// SrcPort is the local port (uint16 in C struct).
	// Note, network byte order is big-endian.
	SrcPort uint16
	// DstPort is the remote port (uint16 in C struct).
	// Note, network byte order is big-endian.
	DstPort uint16
}

type NetstateFilter

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

func (*NetstateFilter) Close

func (o *NetstateFilter) Close() error

func (*NetstateFilter) Events

func (o *NetstateFilter) Events() <-chan *proto.Event

func (*NetstateFilter) Load

func (o *NetstateFilter) Load(log logr.Logger) (err error)

type OpenFileEvent

type OpenFileEvent struct {
	NetNs uint32
	PID   uint32
	TS    uint64
	Comm  [16]byte
	Path  [200]byte
	Ret   int32
}

type OpenFilesFilter

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

func (*OpenFilesFilter) Close

func (o *OpenFilesFilter) Close() error

func (*OpenFilesFilter) Events

func (o *OpenFilesFilter) Events() <-chan *proto.Event

func (*OpenFilesFilter) Load

func (o *OpenFilesFilter) Load(log logr.Logger) (err error)

type RenameEvent

type RenameEvent struct {
	NetNs   uint32
	PID     uint32
	TS      uint64
	Syscall uint32
	Comm    [16]byte
	Oldname [200]byte
	Newname [200]byte
	Ret     int32
}

type RenameLinkFilter

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

func (*RenameLinkFilter) Close

func (o *RenameLinkFilter) Close() error

func (*RenameLinkFilter) Events

func (o *RenameLinkFilter) Events() <-chan *proto.Event

func (*RenameLinkFilter) Load

func (o *RenameLinkFilter) Load(log logr.Logger) (err error)

type TCPState

type TCPState uint16

TCPState represents the state of a TCP connection.

const (
	TCP_ESTABLISHED TCPState = iota + 1
	TCP_SYN_SENT
	TCP_SYN_RECV
	TCP_FIN_WAIT1
	TCP_FIN_WAIT2
	TCP_TIME_WAIT
	TCP_CLOSE
	TCP_CLOSE_WAIT
	TCP_LAST_ACK
	TCP_LISTEN
	TCP_CLOSING /* Now a valid state */
)

https://github.com/torvalds/linux/blob/5924bbecd0267d87c24110cbe2041b5075173a25/include/net/tcp_states.h#L16

Jump to

Keyboard shortcuts

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