View Source VintageNet.IP.IPv4Config (vintage_net v0.13.5)
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 currently has no additional fields.
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_length
is 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.