View Source VintageNetEthernet (vintage_net_ethernet v0.11.2)

Support for common wired Ethernet interface configurations

Configurations for this technology are maps with a :type field set to VintageNetEthernet. The following additional fields are supported:

  • :ipv4 - IPv4 options. See VintageNet.IP.IPv4Config.
  • :dhcpd - DHCP daemon options if running a static IP configuration. See VintageNet.IP.DhcpdConfig.
  • :mac_address - A MAC address string or an MFArgs tuple. VintageNet will set the MAC address of the network interface to the value specified. If an MFArgs tuple is passed, VintageNet will apply it and use the return value as the address.

An example DHCP configuration is:

%{type: VintageNetEthernet, ipv4: %{method: :dhcp}}

An example static IP configuration is:

%{
  type: VintageNetEthernet,
  ipv4: %{
    method: :static,
    address: {192, 168, 0, 5},
    prefix_length: 24,
    gateway: {192, 168, 0, 1}
  }
}

Link to this section Summary

Link to this section Functions

Link to this function

quick_configure(ifname \\ "eth0")

View Source
@spec quick_configure(VintageNet.ifname()) :: :ok | {:error, term()}