This is a helper module for VintageNet.Technology implementations that use IPv4.
IPv4 configuration is specified under the :ipv4 key in the configuration map.
Fields include:
:method-:dhcp,:static, or:disabled
The :dhcp method supports the following optional field:
:dhcp_request_options- a list of additional DHCP option names (strings) to request from the DHCP server beyond udhcpc's defaults. Each entry is passed through to udhcpc as-O <entry>. Either symbolic names ("wpad", "sipsrv") or numeric option codes ("252") are accepted; what's recognized depends on the busybox version in use. Defaults to[]. Values that the DHCP server returns are parsed byVintageNet.DHCP.Optionsand exposed via the["interface", ifname, "dhcp_options"]property. Requesting additional options changes the contents of the DHCP request, which some networks use to classify or segment clients (for example, fingerprint-based VLAN assignment), so only opt in to options you actually need.
The :static method uses the following fields:
:address- the IP address:prefix_length- the number of bits in the IP address to use for the subnet (e.g., 24):netmask- either this orprefix_lengthis used to determine the subnet. If you have a choice, useprefix_length:gateway- the default gateway for this interface (optional):name_servers- a list of DNS servers (optional):domain- DNS search domain (optional)
Configuration normalization converts :netmask to :prefix_length.
Summary
Functions
Add IPv4 configuration commands for supporting static and dynamic IP addressing
Normalize the IPv4 parameters in a configuration.
Functions
@spec add_config(VintageNet.Interface.RawConfig.t(), map(), keyword()) :: VintageNet.Interface.RawConfig.t()
Add IPv4 configuration commands for supporting static and dynamic IP addressing
Normalize the IPv4 parameters in a configuration.