netstat

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: BSD-3-Clause Imports: 3 Imported by: 2

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 netaddr.IPPort
	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