l7_req

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BPF_L7_PROTOCOL_UNKNOWN = iota
	BPF_L7_PROTOCOL_HTTP
	BPF_L7_PROTOCOL_AMQP
	BPF_L7_PROTOCOL_POSTGRES
	BPF_L7_PROTOCOL_HTTP2
)

match with values in l7_req.c

View Source
const (
	L7_PROTOCOL_HTTP     = "HTTP"
	L7_PROTOCOL_HTTP2    = "HTTP2"
	L7_PROTOCOL_AMQP     = "AMQP"
	L7_PROTOCOL_POSTGRES = "POSTGRES"
	L7_PROTOCOL_UNKNOWN  = "UNKNOWN"
)

for user space

View Source
const (
	BPF_METHOD_UNKNOWN = iota
	BPF_METHOD_GET
	BPF_METHOD_POST
	BPF_METHOD_PUT
	BPF_METHOD_PATCH
	BPF_METHOD_DELETE
	BPF_METHOD_HEAD
	BPF_METHOD_CONNECT
	BPF_METHOD_OPTIONS
	BPF_METHOD_TRACE
)

match with values in l7_req.c, order is important

View Source
const (
	BPF_HTTP2_METHOD_UNKNOWN = iota
	BPF_HTTP2_METHOD_CLIENT
	BPF_HTTP2_METHOD_SERVER
)
View Source
const (
	BPF_AMQP_METHOD_UNKNOWN = iota
	BPF_AMQP_METHOD_PUBLISH
	BPF_AMQP_METHOD_DELIVER
)

match with values in l7_req.c, order is important

View Source
const (
	BPF_POSTGRES_METHOD_UNKNOWN = iota
	BPF_POSTGRES_METHOD_STATEMENT_CLOSE_OR_CONN_TERMINATE
	BPF_POSTGRES_METHOD_SIMPLE_QUERY
)

match with values in l7_req.c, order is important

View Source
const (
	GET     = "GET"
	POST    = "POST"
	PUT     = "PUT"
	PATCH   = "PATCH"
	DELETE  = "DELETE"
	HEAD    = "HEAD"
	CONNECT = "CONNECT"
	OPTIONS = "OPTIONS"
	TRACE   = "TRACE"
)

for http, user space

View Source
const (
	PUBLISH = "PUBLISH"
	DELIVER = "DELIVER"
)

for rabbitmq, user space

View Source
const (
	CLOSE_OR_TERMINATE = "CLOSE_OR_TERMINATE"
	SIMPLE_QUERY       = "SIMPLE_QUERY"
)

for postgres, user space

View Source
const (
	CLIENT_FRAME = "CLIENT_FRAME"
	SERVER_FRAME = "SERVER_FRAME"
)

for http2, user space

View Source
const L7_EVENT = "l7_event"

Variables

View Source
var L7BpfProgsAndMaps bpfObjects

Functions

func DeployAndWait

func DeployAndWait(parentCtx context.Context, ch chan interface{})

returns when program is detached

func LoadBpfObjects added in v0.2.0

func LoadBpfObjects()

Types

type HTTPMethodConversion

type HTTPMethodConversion uint32

Custom type for the enumeration

func (HTTPMethodConversion) String

func (e HTTPMethodConversion) String() string

String representation of the enumeration values

type Http2MethodConversion added in v0.3.0

type Http2MethodConversion uint32

Custom type for the enumeration

func (Http2MethodConversion) String added in v0.3.0

func (e Http2MethodConversion) String() string

String representation of the enumeration values

type L7Event

type L7Event struct {
	Fd                  uint64
	Pid                 uint32
	Status              uint32
	Duration            uint64
	Protocol            string // L7_PROTOCOL_HTTP
	Tls                 bool   // Whether request was encrypted
	Method              string
	Payload             [1024]uint8
	PayloadSize         uint32 // How much of the payload was copied
	PayloadReadComplete bool   // Whether the payload was copied completely
	Failed              bool   // Request failed
	WriteTimeNs         uint64 // start time of write syscall
}

for user space

func (L7Event) Type

func (e L7Event) Type() string

type L7ProtocolConversion

type L7ProtocolConversion uint32

Custom type for the enumeration

func (L7ProtocolConversion) String

func (e L7ProtocolConversion) String() string

String representation of the enumeration values

type PostgresMethodConversion

type PostgresMethodConversion uint32

Custom type for the enumeration

func (PostgresMethodConversion) String

func (e PostgresMethodConversion) String() string

String representation of the enumeration values

type RabbitMQMethodConversion

type RabbitMQMethodConversion uint32

Custom type for the enumeration

func (RabbitMQMethodConversion) String

func (e RabbitMQMethodConversion) String() string

String representation of the enumeration values

Jump to

Keyboard shortcuts

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