netstat

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoopFilter

func NoopFilter(*SockTableEntry) bool

Types

type FilterFn

type FilterFn func(*SockTableEntry) bool

type Process

type Process struct {
	Pid  int
	Name string
}

func (*Process) String

func (p *Process) String() string

type SockAddr

type SockAddr struct {
	IP   net.IP
	Port uint16
}

func (*SockAddr) String

func (s *SockAddr) String() string

type SockState

type SockState uint8

Linux Socket states

const (
	Established SockState = iota + 1
	SynSent
	SynRecv
	FinWait1
	FinWait2
	TimeWait
	Close
	CloseWait
	LastAck
	Listen
	Closing
)

type SockTableEntry

type SockTableEntry struct {
	Inode      string
	LocalAddr  *SockAddr
	RemoteAddr *SockAddr
	State      SockState
	UID        uint32
	Process    *Process
}

func TCPSocks

func TCPSocks(fn FilterFn) ([]SockTableEntry, error)

func TCPSocks4

func TCPSocks4(fn FilterFn) ([]SockTableEntry, error)

func TCPSocks6

func TCPSocks6(fn FilterFn) ([]SockTableEntry, error)

Jump to

Keyboard shortcuts

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