network

package
v0.54.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "network_and_host_firewall"

ModuleName identifies this component module.

Variables

This section is empty.

Functions

func CollectLegacyInsecureServices

func CollectLegacyInsecureServices(ctx context.Context) *payload.LegacyInsecureServices

CollectLegacyInsecureServices reports telnet, rsh, rlogin and rexec hints from both places a machine can switch them on: systemd units, and inetd.

Asking systemd alone answered "none of these" on every machine without it — which is exactly the kind of machine old enough to still be running telnet. The inetd.conf lines were already being counted; nothing read what they said.

func CollectListenerPIDs

func CollectListenerPIDs(ctx context.Context) []int32

CollectListenerPIDs returns distinct PIDs that own a TCP LISTEN socket (bounded by maxListeners).

func CollectListeners

func CollectListeners(ctx context.Context, hn *payload.HostNetwork) []payload.Listener

CollectListeners lists TCP listeners via gopsutil net.Connections (same idea as psutil net_connections).

func CollectServices

func CollectServices(ctx context.Context) payload.ServicesBlock

CollectServices lists running services: systemd (D-Bus) when pid 1 is systemd, otherwise sysvinit (Debian/Ubuntu-style `service --status-all` parsing).

func CollectTcpWrappersFingerprint

func CollectTcpWrappersFingerprint(ctx context.Context) *payload.TcpWrappersFingerprint

CollectTcpWrappersFingerprint summarizes hosts.allow and hosts.deny (bounded lines).

func EnrichHostNetwork

func EnrichHostNetwork(ctx context.Context, hn *payload.HostNetwork)

EnrichHostNetwork adds resolver snapshot and link-layer flags (IPv6, promiscuous).

Types

This section is empty.

Jump to

Keyboard shortcuts

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