protocols

package
v0.0.0-...-701ea4a Latest Latest
Warning

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

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

Documentation

Overview

Package protocols provides the implementation of the network tracer protocols

Index

Constants

View Source
const (
	PostgresMaxTotalMessages = 0xb4
)

Variables

This section is empty.

Functions

func GetMap

func GetMap(mgr *manager.Manager, name string) (*ebpf.Map, error)

GetMap retrieves an eBPF map by name from the provided manager

func GetSketchQuantile

func GetSketchQuantile(sketch *ddsketch.DDSketch, percentile float64) float64

GetSketchQuantile returns the value at the given percentile in the sketch

func NSTimestampToFloat

func NSTimestampToFloat(ns uint64) float64

NSTimestampToFloat converts a nanosec timestamp into a float nanosecond timestamp truncated to a fixed precision

Types

type DispatcherProgramType

type DispatcherProgramType uint32
const (
	DispatcherKafkaProg DispatcherProgramType = 0x0
)

type ProgramType

type ProgramType uint32
const (
	ProgramHTTP ProgramType = 0x1

	ProgramHTTPTermination ProgramType = 0x2

	ProgramHTTP2HandleFirstFrame ProgramType = 0x3

	ProgramHTTP2FrameFilter ProgramType = 0x4

	ProgramHTTP2HeadersParser ProgramType = 0x5

	ProgramHTTP2DynamicTableCleaner ProgramType = 0x6

	ProgramHTTP2EOSParser ProgramType = 0x7

	ProgramHTTP2Termination ProgramType = 0x8

	ProgramKafka ProgramType = 0x9

	ProgramKafkaFetchResponsePartitionParserV0 ProgramType = 0xa

	ProgramKafkaFetchResponsePartitionParserV12 ProgramType = 0xb

	ProgramKafkaFetchResponseRecordBatchParserV0 ProgramType = 0xc

	ProgramKafkaFetchResponseRecordBatchParserV12 ProgramType = 0xd

	ProgramKafkaProduceResponsePartitionParserV0 ProgramType = 0xe

	ProgramKafkaProduceResponsePartitionParserV9 ProgramType = 0xf

	ProgramKafkaTermination ProgramType = 0x10

	ProgramPostgres ProgramType = 0x12

	ProgramPostgresHandleResponse ProgramType = 0x13

	ProgramPostgresParseMessage ProgramType = 0x14

	ProgramPostgresTermination ProgramType = 0x15

	ProgramRedis ProgramType = 0x16

	ProgramRedisTermination ProgramType = 0x17
)

type ProtocolType

type ProtocolType uint8

ProtocolType is an enum of supported protocols

const (
	// Unknown is the default value, protocol was not detected
	Unknown ProtocolType = iota
	// HTTP protocol
	HTTP
	// HTTP2 protocol
	HTTP2
	// Kafka protocol
	Kafka
	// TLS protocol
	TLS
	// Mongo protocol
	Mongo
	// Postgres protocol
	Postgres
	// AMQP protocol
	AMQP
	// Redis protocol
	Redis
	// MySQL protocol
	MySQL
	// GRPC protocol
	GRPC
)

func API

func API(protoNum uint8) ProtocolType

API layer of the protocol stack.

func Application

func Application(protoNum uint8) ProtocolType

Application layer of the protocol stack.

func Encryption

func Encryption(protoNum uint8) ProtocolType

Encryption layer of the protocol stack.

func (ProtocolType) String

func (p ProtocolType) String() string

String returns the string representation of the protocol

type Stack

type Stack struct {
	API         ProtocolType
	Application ProtocolType
	Encryption  ProtocolType
}

Stack is a set of protocols detected on a connection

func (*Stack) Contains

func (s *Stack) Contains(proto ProtocolType) bool

Contains returns true if the stack contains the given protocol

func (*Stack) IsUnknown

func (s *Stack) IsUnknown() bool

IsUnknown returns true if all protocol types are `Unknown`

func (*Stack) MergeWith

func (s *Stack) MergeWith(other Stack)

MergeWith merges the other stack into the current one

Directories

Path Synopsis
Package amqp provides a simple wrapper around 3rd party amqp client.
Package amqp provides a simple wrapper around 3rd party amqp client.
Package http contains the userspace portion of USM's HTTP monitoring code
Package http contains the userspace portion of USM's HTTP monitoring code
debugging
Package debugging provides a debugging view of the HTTP protocol.
Package debugging provides a debugging view of the HTTP protocol.
gotls/lookup
Package lookup provides a lookup table for the protocol package.
Package lookup provides a lookup table for the protocol package.
gotls/lookup/internal/testprogram
Package main provides a test program for generating lookup tables for TLS types
Package main provides a test program for generating lookup tables for TLS types
testutil
Package testutil provides utilities for testing the HTTP protocol.
Package testutil provides utilities for testing the HTTP protocol.
Package http2 provides a HTTP/2 implementation for the network package for supporting HTTP/2 and gRPC monitoring with USM.
Package http2 provides a HTTP/2 implementation for the network package for supporting HTTP/2 and gRPC monitoring with USM.
debugging
Package debugging provides debug-friendly representations of internal data structures
Package debugging provides debug-friendly representations of internal data structures
Package mongo provides a simple wrapper around 3rd party mongo client.
Package mongo provides a simple wrapper around 3rd party mongo client.
Package mysql provides a MySQL client to interact with a MySQL server.
Package mysql provides a MySQL client to interact with a MySQL server.
debugging
Package debugging provides debug-friendly representations of internal data structures
Package debugging provides debug-friendly representations of internal data structures
debugging
Package debugging provides debug-friendly representation of internal data structures
Package debugging provides debug-friendly representation of internal data structures
Package telemetry provides a way to collect metrics from eBPF programs.
Package telemetry provides a way to collect metrics from eBPF programs.
Package testutil provides general utilities for protocols UTs.
Package testutil provides general utilities for protocols UTs.
tls
Package tls contains definitions and methods related to tags parsed from the TLS handshake
Package tls contains definitions and methods related to tags parsed from the TLS handshake
gotls/testutil
Package testutil provides utilities for testing the TLS package.
Package testutil provides utilities for testing the TLS package.
gotls/testutil/gotls_client
Package main is a simple client for the gotls_server.
Package main is a simple client for the gotls_server.
gotls/testutil/gotls_server
Package main is a simple client for the gotls_server.
Package main is a simple client for the gotls_server.

Jump to

Keyboard shortcuts

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