First batch of changes

This commit is contained in:
Sebastien Lorquet 2017-05-19 17:30:26 +02:00
parent 60ca4a1ef4
commit caeb6b32fd
11 changed files with 57 additions and 0 deletions

View File

@ -129,6 +129,11 @@ printf("NET1: Configuring %s\n", CONFIG_EXAMPLES_BRIDGE_NET1_IFNAME);
addr.s_addr = HTONL(CONFIG_EXAMPLES_BRIDGE_NET1_NETMASK);
netlib_set_ipv4netmask(CONFIG_EXAMPLES_BRIDGE_NET1_IFNAME, &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_BRIDGE_NET1_DHCPC
/* Get the MAC address of the NIC */

View File

@ -114,6 +114,12 @@ static void fptd_netinit(void)
addr.s_addr = HTONL(CONFIG_EXAMPLES_FTPD_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");
#endif /* CONFIG_EXAMPLES_FTPD_NONETINIT */
}

View File

@ -123,6 +123,11 @@ int igmp_main(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLES_IGMP_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");
/* Not much of a test for now */
/* Join the group */

View File

@ -325,6 +325,11 @@ static void net_configure(void)
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_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");
}
/****************************************************************************

View File

@ -118,6 +118,11 @@ static void net_configure(void)
addr.s_addr = HTONL(CONFIG_EXAMPLES_POLL_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");
}
/****************************************************************************

View File

@ -218,6 +218,11 @@ static void telnetd_netinit(void)
addr.s_addr = HTONL(CONFIG_EXAMPLES_TELNETD_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");
}
/****************************************************************************

View File

@ -254,6 +254,11 @@ int thttp_main(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLES_THTTPD_NETMASK);
netlib_set_ipv4netmask(NET_DEVNAME, &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_THTTPD_NXFLAT
/* Initialize the NXFLAT binary loader */

View File

@ -173,6 +173,12 @@ static void netest_initialize(void)
netlib_set_ipv4netmask("eth0", &addr);
#endif /* CONFIG_EXAMPLES_UDPBLASTER_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");
}
#endif /*CONFIG_EXAMPLES_UDPBLASTER_INIT */

View File

@ -140,6 +140,11 @@ int webserver_main(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLES_WEBSERVER_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_WEBSERVER_DHCPC
/* Get the MAC address of the NIC */

View File

@ -144,6 +144,11 @@ int wget_main(int argc, char *argv[])
addr.s_addr = HTONL(CONFIG_EXAMPLES_WGET_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 */
wget(CONFIG_EXAMPLES_WGET_URL, g_iobuffer, 512, callback, NULL);

View File

@ -308,6 +308,11 @@ static int xmlrpc_netinit(void)
addr.s_addr = HTONL(CONFIG_EXAMPLES_XMLRPC_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_XMLRPC_DHCPC
/* Get the MAC address of the NIC */