netstat

package
v0.0.0-...-ded95ce Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package netstat returns the local machine's network connection table.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New("not implemented for GOOS=" + runtime.GOOS)

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Local, Remote netip.AddrPort
	Pid           int
	State         string // TODO: type?
}

type Table

type Table struct {
	Entries []Entry
}

Table contains local machine's TCP connection entries.

Currently only TCP (IPv4 and IPv6) are included.

func Get

func Get() (*Table, error)

Get returns the connection table.

It returns ErrNotImplemented if the table is not available for the current operating system.

Jump to

Keyboard shortcuts

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