mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-24 05:58:43 +00:00
NET: Rename functions in apps/netutils/netlib to begin with netlib_ vs uip_
This commit is contained in:
parent
d8e69bb0c1
commit
e7fedfa4a5
35 changed files with 161 additions and 161 deletions
|
|
@ -105,23 +105,23 @@ int dhcpd_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
/* Then start the server */
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ int discover_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
|
@ -119,17 +119,17 @@ int discover_main(int argc, char *argv[])
|
|||
#else
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_IPADDR);
|
||||
#endif
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||
/* Set up the resolver */
|
||||
|
|
@ -138,7 +138,7 @@ int discover_main(int argc, char *argv[])
|
|||
|
||||
/* Get the MAC address of the NIC */
|
||||
|
||||
uip_getmacaddr("eth0", mac);
|
||||
netlib_getmacaddr("eth0", mac);
|
||||
|
||||
/* Set up the DHCPC modules */
|
||||
|
||||
|
|
@ -153,16 +153,16 @@ int discover_main(int argc, char *argv[])
|
|||
{
|
||||
struct dhcpc_state ds;
|
||||
(void)dhcpc_request(handle, &ds);
|
||||
uip_sethostaddr("eth1", &ds.ipaddr);
|
||||
netlib_sethostaddr("eth1", &ds.ipaddr);
|
||||
|
||||
if (ds.netmask.s_addr != 0)
|
||||
{
|
||||
uip_setnetmask("eth0", &ds.netmask);
|
||||
netlib_setnetmask("eth0", &ds.netmask);
|
||||
}
|
||||
|
||||
if (ds.default_router.s_addr != 0)
|
||||
{
|
||||
uip_setdraddr("eth0", &ds.default_router);
|
||||
netlib_setdraddr("eth0", &ds.default_router);
|
||||
}
|
||||
|
||||
if (ds.dnsaddr.s_addr != 0)
|
||||
|
|
|
|||
|
|
@ -96,23 +96,23 @@ static void fptd_netinit(void)
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
#endif /* CONFIG_EXAMPLES_FTPD_NONETINIT */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,23 +99,23 @@ int igmp_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
/* Not much of a test for now */
|
||||
/* Join the group */
|
||||
|
|
|
|||
|
|
@ -81,23 +81,23 @@ int nettest_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_NETTEST_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_NETTEST_SERVER
|
||||
recv_server();
|
||||
|
|
|
|||
|
|
@ -304,23 +304,23 @@ static void net_configure(void)
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -97,23 +97,23 @@ static void net_configure(void)
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -124,23 +124,23 @@ int sendmail_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
/* Then send the mail */
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ static int tcpecho_netsetup()
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
|
@ -131,17 +131,17 @@ static int tcpecho_netsetup()
|
|||
#else
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_TCPECHO_IPADDR);
|
||||
#endif
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_TCPECHO_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_TCPECHO_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC
|
||||
/* Set up the resolver */
|
||||
|
|
@ -150,7 +150,7 @@ static int tcpecho_netsetup()
|
|||
|
||||
/* Get the MAC address of the NIC */
|
||||
|
||||
uip_getmacaddr("eth0", mac);
|
||||
netlib_getmacaddr("eth0", mac);
|
||||
|
||||
/* Set up the DHCPC modules */
|
||||
|
||||
|
|
@ -170,16 +170,16 @@ static int tcpecho_netsetup()
|
|||
return ERROR;
|
||||
}
|
||||
|
||||
uip_sethostaddr("eth1", &ds.ipaddr);
|
||||
netlib_sethostaddr("eth1", &ds.ipaddr);
|
||||
|
||||
if (ds.netmask.s_addr != 0)
|
||||
{
|
||||
uip_setnetmask("eth0", &ds.netmask);
|
||||
netlib_setnetmask("eth0", &ds.netmask);
|
||||
}
|
||||
|
||||
if (ds.default_router.s_addr != 0)
|
||||
{
|
||||
uip_setdraddr("eth0", &ds.default_router);
|
||||
netlib_setdraddr("eth0", &ds.default_router);
|
||||
}
|
||||
|
||||
if (ds.dnsaddr.s_addr != 0)
|
||||
|
|
|
|||
|
|
@ -200,23 +200,23 @@ static void telnetd_netinit(void)
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
|||
|
|
@ -200,24 +200,24 @@ int thttp_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr(NET_DEVNAME, mac);
|
||||
netlib_setmacaddr(NET_DEVNAME, mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
message("Setup network addresses\n");
|
||||
addr.s_addr = HTONL(CONFIG_THTTPD_IPADDR);
|
||||
uip_sethostaddr(NET_DEVNAME, &addr);
|
||||
netlib_sethostaddr(NET_DEVNAME, &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_THTTPD_DRIPADDR);
|
||||
uip_setdraddr(NET_DEVNAME, &addr);
|
||||
netlib_setdraddr(NET_DEVNAME, &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_THTTPD_NETMASK);
|
||||
uip_setnetmask(NET_DEVNAME, &addr);
|
||||
netlib_setnetmask(NET_DEVNAME, &addr);
|
||||
|
||||
/* Initialize the NXFLAT binary loader */
|
||||
|
||||
|
|
|
|||
|
|
@ -69,17 +69,17 @@ int udp_main(int argc, char *argv[])
|
|||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_UDP_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_UDP_SERVER
|
||||
recv_server();
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ int uip_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
|
@ -139,17 +139,17 @@ int uip_main(int argc, char *argv[])
|
|||
#else
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_IPADDR);
|
||||
#endif
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_UIP_DHCPC
|
||||
/* Set up the resolver */
|
||||
|
|
@ -158,7 +158,7 @@ int uip_main(int argc, char *argv[])
|
|||
|
||||
/* Get the MAC address of the NIC */
|
||||
|
||||
uip_getmacaddr("eth0", mac);
|
||||
netlib_getmacaddr("eth0", mac);
|
||||
|
||||
/* Set up the DHCPC modules */
|
||||
|
||||
|
|
@ -173,16 +173,16 @@ int uip_main(int argc, char *argv[])
|
|||
{
|
||||
struct dhcpc_state ds;
|
||||
(void)dhcpc_request(handle, &ds);
|
||||
uip_sethostaddr("eth1", &ds.ipaddr);
|
||||
netlib_sethostaddr("eth1", &ds.ipaddr);
|
||||
|
||||
if (ds.netmask.s_addr != 0)
|
||||
{
|
||||
uip_setnetmask("eth0", &ds.netmask);
|
||||
netlib_setnetmask("eth0", &ds.netmask);
|
||||
}
|
||||
|
||||
if (ds.default_router.s_addr != 0)
|
||||
{
|
||||
uip_setdraddr("eth0", &ds.default_router);
|
||||
netlib_setdraddr("eth0", &ds.default_router);
|
||||
}
|
||||
|
||||
if (ds.dnsaddr.s_addr != 0)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ WD = ${shell pwd}
|
|||
TOPDIR = $(WD)/../..
|
||||
-include $(TOPDIR)/Make.defs
|
||||
|
||||
OBJS = host.o1 webclient.o1 uip_parsehttpurl.o1
|
||||
OBJS = host.o1 webclient.o1 netlib_parsehttpurl.o1
|
||||
BIN = wget
|
||||
|
||||
HOSTCFLAGS += -DCONFIG_WEBCLIENT_HOST=1
|
||||
|
|
|
|||
|
|
@ -125,23 +125,23 @@ int wget_main(int argc, char *argv[])
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_IPADDR);
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
/* Then start the server */
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ static int xmlrpc_netinit(void)
|
|||
mac[3] = 0xad;
|
||||
mac[4] = 0xbe;
|
||||
mac[5] = 0xef;
|
||||
uip_setmacaddr("eth0", mac);
|
||||
netlib_setmacaddr("eth0", mac);
|
||||
#endif
|
||||
|
||||
/* Set up our host address */
|
||||
|
|
@ -296,17 +296,17 @@ static int xmlrpc_netinit(void)
|
|||
#else
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_XMLRPC_IPADDR);
|
||||
#endif
|
||||
uip_sethostaddr("eth0", &addr);
|
||||
netlib_sethostaddr("eth0", &addr);
|
||||
|
||||
/* Set up the default router address */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_XMLRPC_DRIPADDR);
|
||||
uip_setdraddr("eth0", &addr);
|
||||
netlib_setdraddr("eth0", &addr);
|
||||
|
||||
/* Setup the subnet mask */
|
||||
|
||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_XMLRPC_NETMASK);
|
||||
uip_setnetmask("eth0", &addr);
|
||||
netlib_setnetmask("eth0", &addr);
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC
|
||||
/* Set up the resolver */
|
||||
|
|
@ -315,7 +315,7 @@ static int xmlrpc_netinit(void)
|
|||
|
||||
/* Get the MAC address of the NIC */
|
||||
|
||||
uip_getmacaddr("eth0", mac);
|
||||
netlib_getmacaddr("eth0", mac);
|
||||
|
||||
/* Set up the DHCPC modules */
|
||||
|
||||
|
|
@ -331,16 +331,16 @@ static int xmlrpc_netinit(void)
|
|||
{
|
||||
struct dhcpc_state ds;
|
||||
(void)dhcpc_request(handle, &ds);
|
||||
uip_sethostaddr("eth1", &ds.ipaddr);
|
||||
netlib_sethostaddr("eth1", &ds.ipaddr);
|
||||
|
||||
if (ds.netmask.s_addr != 0)
|
||||
{
|
||||
uip_setnetmask("eth0", &ds.netmask);
|
||||
netlib_setnetmask("eth0", &ds.netmask);
|
||||
}
|
||||
|
||||
if (ds.default_router.s_addr != 0)
|
||||
{
|
||||
uip_setdraddr("eth0", &ds.default_router);
|
||||
netlib_setdraddr("eth0", &ds.default_router);
|
||||
}
|
||||
|
||||
if (ds.dnsaddr.s_addr != 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue