Versions in this module Expand all Collapse all v0 v0.1.1 Apr 19, 2026 v0.1.0 Apr 19, 2026 Changes in this version + var ErrNotEnoughFields = errors.New("gonetstat: not enough fields in the line") + func NoopFilter(*SockTabEntry) bool + type AcceptFn func(*SockTabEntry) bool + type Forwarder interface + Forward func(port string) error + StopForward func(port string) error + type Process struct + Name string + Pid int + func (p *Process) String() string + type SkState uint8 + const Close + const CloseWait + const Closing + const Established + const FinWait1 + const FinWait2 + const LastAck + const Listen + const SynRecv + const SynSent + const TimeWait + func (s SkState) String() string + type SockAddr struct + IP net.IP + Port uint16 + func (s *SockAddr) String() string + type SockTabEntry struct + LocalAddr *SockAddr + Process *Process + RemoteAddr *SockAddr + State SkState + UID uint32 + func TCP6Socks(accept AcceptFn) ([]SockTabEntry, error) + func TCPSocks(accept AcceptFn) ([]SockTabEntry, error) + func UDP6Socks(accept AcceptFn) ([]SockTabEntry, error) + func UDPSocks(accept AcceptFn) ([]SockTabEntry, error) + type Watcher struct + func NewWatcher(forwarder Forwarder, log log.Logger) *Watcher + func (w *Watcher) Run(ctx context.Context) error