net

package
v1.19.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressPort

type AddressPort struct {
	Address net.IP
	Port    int
}

type EntryState

type EntryState string
const (
	EntryStateEstablished    EntryState = "Established"
	EntryStateSent           EntryState = "Sent"
	EntryStateReceived       EntryState = "Received"
	EntryStateFinWait1       EntryState = "FinWait1"
	EntryStateFinWait2       EntryState = "FinWait2"
	EntryStateTimeWait       EntryState = "TimeWait"
	EntryStateClose          EntryState = "Close"
	EntryStateCloseWait      EntryState = "CloseWait"
	EntryStateLastAck        EntryState = "LastAck"
	EntryStateListen         EntryState = "Listen"
	EntryStateClosing        EntryState = "Closing"
	EntryStateNewSynReceived EntryState = "NewSynReceived"
	EntryStateBoundInactive  EntryState = "BoundInactive"
	EntryStateMaxStates      EntryState = "MaxStates"
)

Comes from net/tcp_states.h

type ProcNetEntries

type ProcNetEntries []ProcNetEntry

func ParseProcNetEntries

func ParseProcNetEntries(data string) (ProcNetEntries, error)

func (ProcNetEntries) FilterListen

func (pe ProcNetEntries) FilterListen() []AddressPort

type ProcNetEntry

type ProcNetEntry struct {
	LocalAddress  AddressPort
	RemoteAddress AddressPort
	State         EntryState
}

func ParseProcNetEntry

func ParseProcNetEntry(line string) (*ProcNetEntry, error)

Jump to

Keyboard shortcuts

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