Documentation ¶
Overview ¶
Package ebpf implements tracing network events with eBPF
Index ¶
- Constants
- type Batch
- type BindSyscallArgs
- type ClassificationProgram
- type Conn
- type ConnDirection
- type ConnFamily
- type ConnFlags
- type ConnStats
- type ConnTuple
- func (t ConnTuple) DestAddress() util.Address
- func (t ConnTuple) DestEndpoint() string
- func (t ConnTuple) Family() ConnFamily
- func (t *ConnTuple) SetFamily(family ConnFamily)
- func (t *ConnTuple) SetType(connType ConnType)
- func (t ConnTuple) SourceAddress() util.Address
- func (t ConnTuple) SourceEndpoint() string
- func (t ConnTuple) String() string
- func (t ConnTuple) Type() ConnType
- type ConnType
- type ConntrackTelemetry
- type ConntrackTuple
- func (t ConntrackTuple) DestAddress() util.Address
- func (t ConntrackTuple) DestEndpoint() string
- func (t ConntrackTuple) Family() ConnFamily
- func (t ConntrackTuple) SourceAddress() util.Address
- func (t ConntrackTuple) SourceEndpoint() string
- func (t ConntrackTuple) String() string
- func (t ConntrackTuple) Type() ConnType
- type PIDFD
- type PidTs
- type PortBinding
- type ProtocolStack
- type ProtocolStackWrapper
- type SkpConn
- type TCPState
- type TCPStats
- type Telemetry
- type UDPRecvSock
Constants ¶
const BatchSize = 0x4
const SizeofBatch = 0x1f0
const SizeofConn = 0x78
const TCPFailureConnRefused = 0x6f
const TCPFailureConnReset = 0x68
const TCPFailureConnTimeout = 0x6e
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type BindSyscallArgs ¶
type ClassificationProgram ¶
type ClassificationProgram = uint32
const ( ClassificationQueues ClassificationProgram = 0x2 ClassificationDBs ClassificationProgram = 0x3 ClassificationGRPC ClassificationProgram = 0x5 )
type ConnDirection ¶
type ConnDirection uint8
const ( Unknown ConnDirection = 0x0 Incoming ConnDirection = 0x1 Outgoing ConnDirection = 0x2 )
type ConnFamily ¶
type ConnFamily uint32
const ( IPv4 ConnFamily = 0x0 IPv6 ConnFamily = 0x2 )
func (ConnFamily) String ¶
func (c ConnFamily) String() string
type ConnStats ¶
type ConnStats struct { Sent_bytes uint64 Recv_bytes uint64 Sent_packets uint32 Recv_packets uint32 Timestamp uint64 Duration uint64 Cookie uint32 Protocol_stack ProtocolStack Flags uint8 Direction uint8 Pad_cgo_0 [6]byte }
func (ConnStats) ConnectionDirection ¶
func (cs ConnStats) ConnectionDirection() ConnDirection
ConnectionDirection returns the direction of the connection (incoming vs outgoing).
type ConnTuple ¶
type ConnTuple struct { Saddr_h uint64 Saddr_l uint64 Daddr_h uint64 Daddr_l uint64 Sport uint16 Dport uint16 Netns uint32 Pid uint32 Metadata uint32 }
func (ConnTuple) DestAddress ¶
DestAddress returns the destination address
func (ConnTuple) DestEndpoint ¶
DestEndpoint returns the destination address and source port joined
func (ConnTuple) Family ¶
func (t ConnTuple) Family() ConnFamily
Family returns whether a tuple is IPv4 or IPv6
func (*ConnTuple) SetFamily ¶
func (t *ConnTuple) SetFamily(family ConnFamily)
SetFamily sets the family (IPv4 or IPv6) for a tuple.
func (ConnTuple) SourceAddress ¶
SourceAddress returns the source address
func (ConnTuple) SourceEndpoint ¶
SourceEndpoint returns the source address and source port joined
type ConntrackTelemetry ¶
type ConntrackTelemetry struct {
Registers uint64
}
type ConntrackTuple ¶
type ConntrackTuple struct { Saddr_h uint64 Saddr_l uint64 Daddr_h uint64 Daddr_l uint64 Sport uint16 Dport uint16 Netns uint32 Metadata uint32 X_pad uint32 }
func (ConntrackTuple) DestAddress ¶
func (t ConntrackTuple) DestAddress() util.Address
DestAddress returns the destination address
func (ConntrackTuple) DestEndpoint ¶
func (t ConntrackTuple) DestEndpoint() string
DestEndpoint returns the destination address and source port joined
func (ConntrackTuple) Family ¶
func (t ConntrackTuple) Family() ConnFamily
Family returns whether a tuple is IPv4 or IPv6
func (ConntrackTuple) SourceAddress ¶
func (t ConntrackTuple) SourceAddress() util.Address
SourceAddress returns the source address
func (ConntrackTuple) SourceEndpoint ¶
func (t ConntrackTuple) SourceEndpoint() string
SourceEndpoint returns the source address and source port joined
func (ConntrackTuple) String ¶
func (t ConntrackTuple) String() string
func (ConntrackTuple) Type ¶
func (t ConntrackTuple) Type() ConnType
Type returns whether a tuple is TCP or UDP
type PortBinding ¶
type ProtocolStack ¶
type ProtocolStackWrapper ¶
type ProtocolStackWrapper struct { Stack ProtocolStack Updated uint64 }
type Telemetry ¶
type Telemetry struct { Tcp_failed_connect uint64 Tcp_sent_miscounts uint64 Unbatched_tcp_close uint64 Unbatched_udp_close uint64 Udp_sends_processed uint64 Udp_sends_missed uint64 Udp_dropped_conns uint64 Double_flush_attempts_close uint64 Double_flush_attempts_done uint64 Unsupported_tcp_failures uint64 Tcp_done_missing_pid uint64 Tcp_connect_failed_tuple uint64 Tcp_done_failed_tuple uint64 Tcp_finish_connect_failed_tuple uint64 Tcp_close_target_failures uint64 Tcp_done_connection_flush uint64 Tcp_close_connection_flush uint64 }