mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Second batch of changes (no problems)
This commit is contained in:
parent
caeb6b32fd
commit
aefddc3648
6 changed files with 30 additions and 0 deletions
|
|
@ -127,6 +127,11 @@ int dhcpd_main(int argc, char *argv[])
|
|||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_NETMASK);
|
||||
netlib_set_ipv4netmask("eth0", &addr);
|
||||
|
||||
/* New versions of netlib_set_ipvXaddr will not bring the network up,
|
||||
* So ensure the network is really up at this point. */
|
||||
|
||||
netlib_ifup("eth0");
|
||||
|
||||
/* Then start the server */
|
||||
|
||||
dhcpd_run();
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ int discover_main(int argc, char *argv[])
|
|||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_NETMASK);
|
||||
netlib_set_ipv4netmask("eth0", &addr);
|
||||
|
||||
/* New versions of netlib_set_ipvXaddr will not bring the network up,
|
||||
* So ensure the network is really up at this point. */
|
||||
|
||||
netlib_ifup("eth0");
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||
/* Get the MAC address of the NIC */
|
||||
|
||||
|
|
|
|||
|
|
@ -150,6 +150,11 @@ int sendmail_main(int argc, char *argv[])
|
|||
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_NETMASK);
|
||||
netlib_set_ipv4netmask("eth0", &addr);
|
||||
|
||||
/* New versions of netlib_set_ipvXaddr will not bring the network up,
|
||||
* So ensure the network is really up at this point. */
|
||||
|
||||
netlib_ifup("eth0");
|
||||
|
||||
/* Then send the mail */
|
||||
|
||||
net_ipaddr(addr.s_addr, 127, 0, 0, 1);
|
||||
|
|
|
|||
|
|
@ -143,6 +143,11 @@ static int tcpecho_netsetup()
|
|||
addr.s_addr = HTONL(CONFIG_EXAMPLES_TCPECHO_NETMASK);
|
||||
netlib_set_ipv4netmask("eth0", &addr);
|
||||
|
||||
/* New versions of netlib_set_ipvXaddr will not bring the network up,
|
||||
* So ensure the network is really up at this point. */
|
||||
|
||||
netlib_ifup("eth0");
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC
|
||||
/* Get the MAC address of the NIC */
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,11 @@ int udp_main(int argc, char *argv[])
|
|||
|
||||
#endif /* CONFIG_EXAMPLES_UDP_IPv6 */
|
||||
|
||||
/* New versions of netlib_set_ipvXaddr will not bring the network up,
|
||||
* So ensure the network is really up at this point. */
|
||||
|
||||
netlib_ifup("eth0");
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_UDP_SERVER
|
||||
recv_server();
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -358,6 +358,11 @@ static void nsh_netinit_configure(void)
|
|||
netlib_set_ipv4dnsaddr(&addr);
|
||||
#endif
|
||||
|
||||
/* New versions of netlib_set_ipvXaddr will not bring the network up,
|
||||
* So ensure the network is really up at this point. */
|
||||
|
||||
netlib_ifup("eth0");
|
||||
|
||||
#ifdef CONFIG_WIRELESS_WAPI
|
||||
/* Associate the wlan with an access point. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue