Documentation ¶
Index ¶
Constants ¶
View Source
const ( BPF_EVENT_TCP_ESTABLISHED = iota + 1 BPF_EVENT_TCP_CONNECT_FAILED BPF_EVENT_TCP_LISTEN BPF_EVENT_TCP_LISTEN_CLOSED BPF_EVENT_TCP_CLOSED )
match with values in tcp_state.c
View Source
const ( EVENT_TCP_ESTABLISHED = "EVENT_TCP_ESTABLISHED" EVENT_TCP_CONNECT_FAILED = "EVENT_TCP_CONNECT_FAILED" EVENT_TCP_LISTEN = "EVENT_TCP_LISTEN" EVENT_TCP_LISTEN_CLOSED = "EVENT_TCP_LISTEN_CLOSED" EVENT_TCP_CLOSED = "EVENT_TCP_CLOSED" )
for user space
View Source
const TCP_CONNECT_EVENT = "tcp_connect_event"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BpfTcpEvent ¶ added in v0.5.1
type BpfTcpEvent struct { Fd uint64 Timestamp uint64 Type uint32 Pid uint32 SPort uint16 DPort uint16 SAddr [16]byte DAddr [16]byte }
padding to match the kernel struct
type TcpConnectEvent ¶
type TcpConnectEvent struct { Fd uint64 Timestamp uint64 Type_ string Pid uint32 SPort uint16 DPort uint16 SAddr string DAddr string }
for user space
func (TcpConnectEvent) Type ¶
func (e TcpConnectEvent) Type() string
type TcpStateConfig ¶ added in v0.5.1
type TcpStateConfig struct {
BpfMapSize uint32 // specified in terms of os page size
}
type TcpStateConversion ¶
type TcpStateConversion uint32
Custom type for the enumeration
func (TcpStateConversion) String ¶
func (e TcpStateConversion) String() string
String representation of the enumeration values
type TcpStateProg ¶ added in v0.5.1
type TcpStateProg struct {
// contains filtered or unexported fields
}
var TcpState *TcpStateProg
func InitTcpStateProg ¶ added in v0.5.1
func InitTcpStateProg(conf *TcpStateConfig) *TcpStateProg
func (*TcpStateProg) Attach ¶ added in v0.5.1
func (tsp *TcpStateProg) Attach()
func (*TcpStateProg) Close ¶ added in v0.5.1
func (tsp *TcpStateProg) Close()
func (*TcpStateProg) Consume ¶ added in v0.5.1
func (tsp *TcpStateProg) Consume(ctx context.Context, ch chan interface{})
returns when program is detached
func (*TcpStateProg) InitMaps ¶ added in v0.5.1
func (tsp *TcpStateProg) InitMaps()
func (*TcpStateProg) Load ¶ added in v0.5.1
func (tsp *TcpStateProg) Load()
Loads bpf programs into kernel
Click to show internal directories.
Click to hide internal directories.