Skip to content

Network

Index

network::local_ip

Print the local IPv4 address used for outbound traffic. Output: stdout — local IP address (e.g. "192.168.1.42") shellcheck disable=SC2120 # called with no args by callers, shellcheck can't see all call sites

Function has no arguments.

network::local_network

Print the local network CIDR range (one of the RFC-1918 private ranges). Dies if the local IP does not fall within any known private range. Output: stdout — CIDR range (e.g. "192.168.0.0/16")

Function has no arguments.