Second batch of changes (no problems)
This commit is contained in:
parent
caeb6b32fd
commit
aefddc3648
examples
nshlib
@ -127,6 +127,11 @@ int dhcpd_main(int argc, char *argv[])
|
|||||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DHCPD_NETMASK);
|
||||||
netlib_set_ipv4netmask("eth0", &addr);
|
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 */
|
/* Then start the server */
|
||||||
|
|
||||||
dhcpd_run();
|
dhcpd_run();
|
||||||
|
@ -134,6 +134,11 @@ int discover_main(int argc, char *argv[])
|
|||||||
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_NETMASK);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_DISCOVER_NETMASK);
|
||||||
netlib_set_ipv4netmask("eth0", &addr);
|
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
|
#ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC
|
||||||
/* Get the MAC address of the NIC */
|
/* 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);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_SENDMAIL_NETMASK);
|
||||||
netlib_set_ipv4netmask("eth0", &addr);
|
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 */
|
/* Then send the mail */
|
||||||
|
|
||||||
net_ipaddr(addr.s_addr, 127, 0, 0, 1);
|
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);
|
addr.s_addr = HTONL(CONFIG_EXAMPLES_TCPECHO_NETMASK);
|
||||||
netlib_set_ipv4netmask("eth0", &addr);
|
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
|
#ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC
|
||||||
/* Get the MAC address of the NIC */
|
/* Get the MAC address of the NIC */
|
||||||
|
|
||||||
|
@ -160,6 +160,11 @@ int udp_main(int argc, char *argv[])
|
|||||||
|
|
||||||
#endif /* CONFIG_EXAMPLES_UDP_IPv6 */
|
#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
|
#ifdef CONFIG_EXAMPLES_UDP_SERVER
|
||||||
recv_server();
|
recv_server();
|
||||||
#else
|
#else
|
||||||
|
@ -358,6 +358,11 @@ static void nsh_netinit_configure(void)
|
|||||||
netlib_set_ipv4dnsaddr(&addr);
|
netlib_set_ipv4dnsaddr(&addr);
|
||||||
#endif
|
#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
|
#ifdef CONFIG_WIRELESS_WAPI
|
||||||
/* Associate the wlan with an access point. */
|
/* Associate the wlan with an access point. */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user