winnet

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Overview

Package winnet provides socket enumeration for Windows via iphlpapi.dll. It is placed in builtins/internal/ to isolate the unsafe.Pointer DLL call from the allowedsymbols checker, which cannot evaluate build tags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SocketEntry

type SocketEntry struct {
	Proto      string // "tcp4", "tcp6", "udp4", "udp6"
	State      string // human-readable state name
	LocalIP    string
	LocalPort  uint16
	RemoteIP   string
	RemotePort uint16
}

SocketEntry holds the parsed fields for one Windows socket.

func Collect

func Collect() ([]SocketEntry, error)

Collect returns an error on non-Windows platforms; ss_windows.go is only compiled on Windows so this stub is never called in practice.

Jump to

Keyboard shortcuts

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