nerves_network_interface v0.4.4 Nerves.NetworkInterface.Worker

Working for NetworkInterface. See Nerves.NetworkInterface for more details.

Link to this section Summary

Types

Command to be sent to the port

Arguments for a command

Interface name

Setup options

Interface settings

Status response

t()

State of the GenServer

Link to this section Types

Link to this type command()
command() :: :ifup | :ifdown | :setup | :settings | :interfaces

Command to be sent to the port.

Link to this type command_arguments()
command_arguments() :: {ifname(), options()} | ifname()

Arguments for a command

Link to this type ifname()
ifname() :: String.t()

Interface name

Link to this type ip_address()
ip_address() :: binary()
Link to this type options()
options() :: map()

Setup options.

Link to this type port_resp()
port_resp() :: any() | no_return()
Link to this type settings()
settings() :: %{ipv4_address: ip_address(), ipv4_broadcast: ip_address(), ipv4_gateway: ip_address(), ipv4_subnet_mask: ip_address()}

Interface settings

Link to this type stats()
stats() :: %{collisions: number(), multicast: number(), rx_bytes: number(), rx_dropped: number(), rx_errors: number(), rx_packets: number(), tx_bytes: number(), tx_dropped: number(), tx_errors: number(), tx_packets: number()}
Link to this type status()
status() :: %{ifname: ifname(), type: :ethernet, index: number(), is_broadcast: boolean(), is_lower_up: boolean(), is_multicast: boolean(), is_up: boolean(), is_running: boolean(), mac_address: mac_address(), mac_broadcast: mac_address(), mtu: number(), operstate: :up | :down, stats: stats()}

Status response

Link to this type t()
t() :: %Nerves.NetworkInterface.Worker{port: port()}

State of the GenServer

Link to this section Functions

Link to this function ifdown(ifname)
ifdown(ifname()) :: :ok
Link to this function ifup(ifname)
ifup(ifname()) :: :ok
Link to this function interfaces()
interfaces() :: [ifname()]
Link to this function settings(ifname)
settings(ifname()) :: {:ok, settings()}
Link to this function setup(ifname, options)
setup(ifname(), Keyword.t() | options()) :: :ok
Link to this function start_link()
start_link() :: GenServer.on_start()
Link to this function status(ifname)
status(ifname()) :: {:ok, status()}
Link to this function stop()
stop() :: :ok