ip

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseIPV4

func ParseIPV4(bpfVal uint32) string

func ParseIPV6

func ParseIPV6(bpfVal [16]uint8) string

Types

type ConnTrack

type ConnTrack struct {
	// contains filtered or unexported fields
}

func NewConnTrack

func NewConnTrack() (*ConnTrack, error)

func (*ConnTrack) UpdateRealPeerAddress

func (c *ConnTrack) UpdateRealPeerAddress(addr *SocketPair) bool

type SocketPair

type SocketPair struct {
	Family   uint32
	Role     enums.ConnectionRole
	SrcIP    string
	SrcPort  uint16
	DestIP   string
	DestPort uint16
}

func ParseSocket

func ParseSocket(pid, sockfd uint32) (*SocketPair, error)

func (*SocketPair) IsValid

func (s *SocketPair) IsValid() bool

func (*SocketPair) String

func (s *SocketPair) String() string

Jump to

Keyboard shortcuts

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