net: Provide new way to configure network devices
This provides a new way to configure network interfaces based
on nvvars. A network interface can now be configured with variables
in the nv.dev.<ethname>.* namespace. There is a new network device
parameter "mode" which specifies the mode used to obtain IP settings.
The mode can be "dhcp", "static" or "disabled":

nv.dev.eth0.mode=dhcp
(ipaddr, netmask are ignored in this setting)

nv.dev.eth0.mode=static
nv.dev.eth0.ipaddr=192.168.0.17
nv.dev.eth0.netmask=255.255.0.0

nv.dev.eth0.mode=disabled

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e612a5c commit dfe2d162f3fc693bb95d3b67c674f2f264dc47e8
@Sascha Hauer Sascha Hauer authored on 23 Nov 2017
Showing 3 changed files
View
include/net.h
View
net/eth.c
View
net/ifup.c