patacongo commented on a change in pull request #415: URL: https://github.com/apache/incubator-nuttx-apps/pull/415#discussion_r498310896
########## File path: netutils/netinit/netinit.c ########## @@ -357,6 +367,86 @@ static void netinit_set_macaddr(void) # define netinit_set_macaddr() #endif +#ifdef CONFIG_FSUTILS_IPCFG +/**************************************************************************** + * Name: netinit_get_ipaddrs + * + * Description: + * Setup IP addresses. + * + * For 6LoWPAN, the IP address derives from the MAC address. Setting it + * to any user provided value is asking for trouble. + * + ****************************************************************************/ + +static int netinit_get_ipaddrs(void) +{ +#ifdef CONFIG_NETINIT_DHCPC + bool use_dhcp = false; +#endif + bool use_static = false; +#ifdef CONFIG_NET_IPv4 + struct in_addr addr; + int ret; + + ret = ipcfg_read(NET_DEVNAME, &g_netconf); Review comment: There is no support for IPv6 in ipcfg_read/write at present. That would have to be extended first. There are some semi-standard IPv6 definitions (although many of them do not apply): https://www.thegeekdiary.com/understanding-the-network-interface-configuration-file-etc-sysconfig-network-scripts-ifcfg-eth/ https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-networkscripts-interfaces But it is not clear how to integrate IPv6 support into the binary interface without useless explosive growth since the binary form contains all possible settings. IPv6 support would require some additional design work. Certainly, if IPv6 support is added, that will delay this so that it misses the Window for the 10.0 release. We freeze that code in two days and we do not want any unstable code in the release. So, the options are IPv4 only for now (10.0) or with IPv6 support in 10.1. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org