Uses logic from apps/fsutils/ipcfg to obtain the IP address configuration from a file, if available. This only effects the behavior of netinit if CONFIG_FSUTILS_IPCFG is selected and if an IP configuration file is available on a file system. Otherwise, it reverts to the preceding behavior.
Also adds definitions to apps/include/fsutils/ipcfg.h to formalize a bit encoding of the prototype which was already in use, but not documented.
Also fixes some bad assertions (duplication of PR #420) and makes use of variable names consistent in ipcfg.h comments and in ipcfg_text implementation.
apps/netutils/dhcpd/dhcpd.c: Fix unused const variable
dhcpd.c:273:29: warning: 'g_anyipaddr' defined but not used [-Wunused-const-variable=]
static const uint8_t g_anyipaddr[4] = {0, 0, 0, 0};
apps/netutils/dhcpd: Make dhcpd interface configurable
apps/netutils/dhcpd: Lease address directly if hit in address range
apps/netutils/netinit: Initialize dhcpc_state
update the addresses only on request success
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro
Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Squashed commit of the following:
apps/nshlib: Remove NSH initialization. Now uses the common apps/netutils/netinit logic (which was cloned from nshlib to begin with).
apps/netutils/netinit: Clone network initialization logic from NSH to this directory so that it can be available for general use.