Nerves.Networking v0.6.0 Nerves.Networking.Subsystem
Implements an ethernet subsystem based on using the ip
and udhcpc
CLI.
Designed for embedded systems to provide simple ipv4 ethernet access.
This doesn’t rely on using udhcpc
as a daemon, but instead simply invokes
it to perform low level configuration, assuming the
Nerves.Networking
module handles daemon-level functionality like
DHCP renewal, etc.
Major Limitations:
- does not yet support ipv6
- horrible error checking for low level commands (assumes they work)
Summary
Functions
add an address to the interface
Makes a dhcp request on the specified interface with optional hostname, and
returns Dict
with standardized keys for the result of the DHCP request
clear the list of addresses for the interface
Initialize the ethernet subsystem
Set the link state of an interface up or down
Return the MAC address of the specified interface
set resolver configuration
set the router (default gateway) for the inteface
Types
Functions
Makes a dhcp request on the specified interface with optional hostname, and
returns Dict
with standardized keys for the result of the DHCP request.
Uses udhcpc
in non-daemon mode to handle dhcp.
Specs
flush_addresses(interface) :: :ok
clear the list of addresses for the interface
Specs
link_set(interface, :up | :down) :: :ok
Set the link state of an interface up or down
Return the MAC address of the specified interface
set resolver configuration
Specs
set_router(interface, ip_address) :: :ok
set the router (default gateway) for the inteface