mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
Rename IPv4 netlib functions and files to make room in the namespace for corresponding IPv6 functions and files
This commit is contained in:
@@ -129,17 +129,17 @@ int webserver_main(int argc, char *argv[])
|
||||
#else
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_WEBSERVER_IPADDR);
|
||||
#endif
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
netlib_set_ipv4addr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_WEBSERVER_DRIPADDR);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
netlib_set_dripv4addr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_WEBSERVER_NETMASK);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
netlib_set_ipv4netmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC
|
||||
/* Set up the resolver */
|
||||
@@ -163,16 +163,16 @@ int webserver_main(int argc, char *argv[])
|
||||
{
|
||||
struct dhcpc_state ds;
|
||||
(void)dhcpc_request(handle, &ds);
|
||||
netlib_sethostaddr("eth0", &ds.ipaddr);
|
||||
netlib_set_ipv4addr("eth0", &ds.ipaddr);
|
||||
|
||||
if (ds.netmask.s_addr != 0)
|
||||
{
|
||||
netlib_setnetmask("eth0", &ds.netmask);
|
||||
netlib_set_ipv4netmask("eth0", &ds.netmask);
|
||||
}
|
||||
|
||||
if (ds.default_router.s_addr != 0)
|
||||
{
|
||||
netlib_setdraddr("eth0", &ds.default_router);
|
||||
netlib_set_dripv4addr("eth0", &ds.default_router);
|
||||
}
|
||||
|
||||
if (ds.dnsaddr.s_addr != 0)
|
||||
|
Reference in New Issue
Block a user