types

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name of the parameter that defins the network interface a TC program is attached to.
	IfaceParam = "iface"
)
View Source
const (

	// Prefix used to mark tracer map created with GADGET_TRACER_MAP() defined in
	// include/gadget/buffer.h.
	TracerMapPrefix = "gadget_map_tracer_"
)

Keep this aligned with include/gadget/macros.h

Variables

This section is empty.

Functions

func GetGadgetIdentByPrefix added in v0.24.0

func GetGadgetIdentByPrefix(spec *ebpf.CollectionSpec, prefix string) ([]string, error)

GetGadgetIdentByPrefix returns the strings generated by GADGET_ macros.

func Populate added in v0.27.0

Populate fills the metadata from its ebpf spec

func Validate added in v0.27.0

Types

type Event

type Event struct {
	// Do not use eventtypes.Event because we don't want to have the timestamp column.
	eventtypes.CommonData

	// Type indicates the kind of this event
	Type eventtypes.EventType `json:"type"`

	// Message when Type is ERR, WARN, DEBUG or INFO
	Message string `json:"message,omitempty"`

	L3Endpoints []L3Endpoint      `json:"l3endpoints,omitempty"`
	L4Endpoints []L4Endpoint      `json:"l4endpoints,omitempty"`
	Timestamps  []eventtypes.Time `json:"timestamps,omitempty"`

	MountNsID uint64 `json:"-"`
	NetNsID   uint64 `json:"-"`

	// Blob is used to save data to be sent to the client.
	// [0] is used for bpf event
	// [1] is used for fixed-size members
	// [1+] is used for variable size members
	Blob [][]byte `json:"blob,omitempty"`
}

type L3Endpoint added in v0.21.0

type L3Endpoint struct {
	eventtypes.L3Endpoint
	Name string
}

type L4Endpoint added in v0.21.0

type L4Endpoint struct {
	eventtypes.L4Endpoint
	Name string
}

Jump to

Keyboard shortcuts

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