Network utilities for mob_dev.
Summary
Functions
Returns the first LAN IP from a list of IP tuples, or nil.
Returns the first LAN IPv4 address found on this machine, or nil. Skips loopback. Matches 10.x, 192.168.x, and 172.16-31.x ranges.
Returns true if the IP tuple is a private LAN address (non-loopback).
Functions
@spec first_lan_ip([:inet.ip4_address()]) :: :inet.ip4_address() | nil
Returns the first LAN IP from a list of IP tuples, or nil.
@spec lan_ip() :: :inet.ip4_address() | nil
Returns the first LAN IPv4 address found on this machine, or nil. Skips loopback. Matches 10.x, 192.168.x, and 172.16-31.x ranges.
@spec lan_ip?(:inet.ip_address()) :: boolean()
Returns true if the IP tuple is a private LAN address (non-loopback).