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.
Click to show internal directories.
Click to hide internal directories.