Skip to main content

Module network

Module network 

Source
Expand description

Network interface detection, IP resolution, Wi-Fi, and related helpers.

Structs§

WifiLink

Functions§

detect_active_interface_and_local_ip
Detects the local IP address and active network interface name.
detect_dns
Returns the list of configured DNS nameserver addresses.
detect_domain
Returns the configured DNS domain name.
detect_domain_search
Returns per-interface DNS search domain lists.
detect_networks
Builds the formatted list of network interfaces with IP addresses and RX/TX stats.
detect_public_ip
Fetches the public IP address via an external service (best-effort, 2s timeout).
detect_wifi
Detects the connected Wi-Fi network and link parameters.
format_bytes
Formats a byte count into human-readable form (KB, MB, GB, etc.)
lookup_pci_vendor
Looks up a PCI vendor name from /usr/share/hwdata/pci.ids (or fallback paths).
parse_domain_from_resolv_conf
Parses the domain directive (or first search entry as fallback) from /etc/resolv.conf content.
parse_iw_link_output
parse_netsh_output
parse_proc_net_route
parse_resolv_conf
parse_resolvectl_search
Parses resolvectl status --no-pager output into per-interface search domain strings.
parse_search_from_resolv_conf
Parses all entries from the search directive in /etc/resolv.conf content.