events

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConnectionID

func ParseConnectionID(connectionID uint64) (pid, socketFD uint32)

Types

type Event

type Event interface {
	GetConnectionID() uint64
	GetRandomID() uint64
	Timestamp() time.Time
}

type SocketCloseEvent

type SocketCloseEvent struct {
	ConnectionID uint64
	RandomID     uint64

	StartTime uint64
	EndTime   uint64
	PID       uint32
	SocketFD  uint32
	Success   uint32
}

func (*SocketCloseEvent) GetConnectionID

func (c *SocketCloseEvent) GetConnectionID() uint64

func (*SocketCloseEvent) GetRandomID

func (c *SocketCloseEvent) GetRandomID() uint64

func (*SocketCloseEvent) Timestamp

func (c *SocketCloseEvent) Timestamp() time.Time

type SocketConnectEvent

type SocketConnectEvent struct {
	ConID                 uint64
	RandomID              uint64
	StartTime             uint64
	EndTime               uint64
	PID                   uint32
	SocketFD              uint32
	FuncName              uint8
	Role                  uint8
	SocketFamily          uint8
	ConnectSuccess        uint8
	Pad0                  uint32
	RemoteAddrV4          uint32
	RemoteAddrPort        uint32
	RemoteAddrV6          [16]uint8
	LocalAddrV4           uint32
	LocalAddrPort         uint32
	LocalAddrV6           [16]uint8
	ConnTrackUpstreamIPl  uint64
	ConnTrackUpstreamIPh  uint64
	ConnTrackUpstreamPort uint32
}

func (*SocketConnectEvent) GetConnectionID

func (c *SocketConnectEvent) GetConnectionID() uint64

func (*SocketConnectEvent) GetRandomID

func (c *SocketConnectEvent) GetRandomID() uint64

func (*SocketConnectEvent) Timestamp

func (c *SocketConnectEvent) Timestamp() time.Time

type SocketDataUploadEvent

type SocketDataUploadEvent struct {
	Protocol     enums.ConnectionProtocol
	HaveReduce   uint8
	Direction0   enums.SocketDataDirection
	Finished     uint8
	Sequence0    uint16
	DataLen      uint16
	StartTime0   uint64
	EndTime0     uint64
	ConnectionID uint64
	RandomID     uint64
	DataID0      uint64
	TotalSize0   uint64
	Buffer       [2048]byte
}

func (*SocketDataUploadEvent) BufferData

func (s *SocketDataUploadEvent) BufferData() []byte

func (*SocketDataUploadEvent) BufferLen

func (s *SocketDataUploadEvent) BufferLen() int

func (*SocketDataUploadEvent) BufferStartPosition

func (s *SocketDataUploadEvent) BufferStartPosition() int

func (*SocketDataUploadEvent) DataID

func (s *SocketDataUploadEvent) DataID() uint64

func (*SocketDataUploadEvent) DataSequence

func (s *SocketDataUploadEvent) DataSequence() int

func (*SocketDataUploadEvent) Direction

func (*SocketDataUploadEvent) EndTime

func (s *SocketDataUploadEvent) EndTime() uint64

func (*SocketDataUploadEvent) GenerateConnectionID

func (s *SocketDataUploadEvent) GenerateConnectionID() string

func (*SocketDataUploadEvent) HaveReduceDataAfterChunk

func (s *SocketDataUploadEvent) HaveReduceDataAfterChunk() bool

func (*SocketDataUploadEvent) IsFinished

func (s *SocketDataUploadEvent) IsFinished() bool

func (*SocketDataUploadEvent) IsStart

func (s *SocketDataUploadEvent) IsStart() bool

func (*SocketDataUploadEvent) StartTime

func (s *SocketDataUploadEvent) StartTime() uint64

func (*SocketDataUploadEvent) TotalSize

func (s *SocketDataUploadEvent) TotalSize() uint64

type SocketDetailEvent

type SocketDetailEvent struct {
	ConnectionID uint64
	RandomID     uint64
	DataID0      uint64

	StartTime uint64
	EndTime   uint64

	L4Duration                    uint32
	L3Duration                    uint32
	L3LocalDuration               uint32
	L3OutputDuration              uint32
	L3ResolveMacDuration          uint32
	L3NetFilterDuration           uint32
	L2Duration                    uint32
	L2ReadySendDuration           uint32
	L2SendDuration                uint32
	L2PackageToQueueDuration      uint32
	L3TotalRcvDuration            uint32
	IfIndex                       uint32
	L4PackageRcvFromQueueDuration uint64
	L4TotalPackageSize            uint64
	L2EnterQueueCount             uint8
	L4PackageCount                uint8
	L4RetransmitPackageCount      uint8
	L3ResolveMacCount             uint8
	L3NetFilterCount              uint8
	FunctionName                  enums.SocketFunctionName
	Protocol                      enums.ConnectionProtocol
	SSL                           uint8
}

func (*SocketDetailEvent) DataID

func (d *SocketDetailEvent) DataID() uint64

func (*SocketDetailEvent) GetConnectionID

func (d *SocketDetailEvent) GetConnectionID() uint64

func (*SocketDetailEvent) GetRandomID

func (d *SocketDetailEvent) GetRandomID() uint64

func (*SocketDetailEvent) Timestamp

func (d *SocketDetailEvent) Timestamp() time.Time

type ZTunnelSocketMappingEvent added in v0.7.0

type ZTunnelSocketMappingEvent struct {
	OriginalSrcIP        uint32
	OriginalDestIP       uint32
	OriginalSrcPort      uint16
	OriginalDestPort     uint16
	LoadBalancedDestIP   uint32
	LoadBalancedDestPort uint16
	Pad0                 uint16
	Pad1                 uint32
}

Jump to

Keyboard shortcuts

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