diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-17 07:21:55 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-17 07:21:55 -0600 |
commit | e7f2b413e8291873d51792c56e629f9a127641ad (patch) | |
tree | 365df98d0abbefa65e8d060dc955dd287c2d5862 | |
parent | 4d15bcb63e0f5c613a424b564d704f13f858e960 (diff) | |
download | px4-nuttx-e7f2b413e8291873d51792c56e629f9a127641ad.tar.gz px4-nuttx-e7f2b413e8291873d51792c56e629f9a127641ad.tar.bz2 px4-nuttx-e7f2b413e8291873d51792c56e629f9a127641ad.zip |
These examples all set the IP address of eth1 is DHCP is enabled. That can't be right???
-rw-r--r-- | apps/examples/dhcpd/Makefile.host | 1 | ||||
-rw-r--r-- | apps/examples/discover/discover_main.c | 2 | ||||
-rw-r--r-- | apps/examples/tcpecho/tcpecho_main.c | 4 | ||||
-rw-r--r-- | apps/examples/webserver/webserver_main.c | 2 | ||||
-rw-r--r-- | apps/examples/xmlrpc/xmlrpc_main.c | 2 |
5 files changed, 5 insertions, 6 deletions
diff --git a/apps/examples/dhcpd/Makefile.host b/apps/examples/dhcpd/Makefile.host index 9c074f42b..cf70c0924 100644 --- a/apps/examples/dhcpd/Makefile.host +++ b/apps/examples/dhcpd/Makefile.host @@ -41,7 +41,6 @@ OBJS = host.o1 dhcpd.o1 BIN = dhcpd HOSTCFLAGS += -DCONFIG_NETUTILS_DHCPD_HOST=1 -HOSTCFLAGS += -DCONFIG_NETUTILS_DHCPD_INTERFACE=\"eth1\" HOSTCFLAGS += -DHAVE_SO_REUSEADDR=1 HOSTCFLAGS += -DHAVE_SO_BROADCAST=1 diff --git a/apps/examples/discover/discover_main.c b/apps/examples/discover/discover_main.c index 85938d03a..d79cf8542 100644 --- a/apps/examples/discover/discover_main.c +++ b/apps/examples/discover/discover_main.c @@ -157,7 +157,7 @@ int discover_main(int argc, char *argv[]) { struct dhcpc_state ds; (void)dhcpc_request(handle, &ds); - netlib_sethostaddr("eth1", &ds.ipaddr); + netlib_sethostaddr("eth0", &ds.ipaddr); if (ds.netmask.s_addr != 0) { diff --git a/apps/examples/tcpecho/tcpecho_main.c b/apps/examples/tcpecho/tcpecho_main.c index 7dbb9dd72..34ca3c063 100644 --- a/apps/examples/tcpecho/tcpecho_main.c +++ b/apps/examples/tcpecho/tcpecho_main.c @@ -170,7 +170,7 @@ static int tcpecho_netsetup() return ERROR; } - netlib_sethostaddr("eth1", &ds.ipaddr); + netlib_sethostaddr("eth0", &ds.ipaddr); if (ds.netmask.s_addr != 0) { @@ -364,7 +364,7 @@ static int tcpecho_server(void) ****************************************************************************/ /**************************************************************************** - * discover_main + * tcpecho_main ****************************************************************************/ #ifdef CONFIG_BUILD_KERNEL diff --git a/apps/examples/webserver/webserver_main.c b/apps/examples/webserver/webserver_main.c index 30f805c22..f9c029325 100644 --- a/apps/examples/webserver/webserver_main.c +++ b/apps/examples/webserver/webserver_main.c @@ -163,7 +163,7 @@ int webserver_main(int argc, char *argv[]) { struct dhcpc_state ds; (void)dhcpc_request(handle, &ds); - netlib_sethostaddr("eth1", &ds.ipaddr); + netlib_sethostaddr("eth0", &ds.ipaddr); if (ds.netmask.s_addr != 0) { diff --git a/apps/examples/xmlrpc/xmlrpc_main.c b/apps/examples/xmlrpc/xmlrpc_main.c index f6c278f8b..a93c89fc7 100644 --- a/apps/examples/xmlrpc/xmlrpc_main.c +++ b/apps/examples/xmlrpc/xmlrpc_main.c @@ -331,7 +331,7 @@ static int xmlrpc_netinit(void) { struct dhcpc_state ds; (void)dhcpc_request(handle, &ds); - netlib_sethostaddr("eth1", &ds.ipaddr); + netlib_sethostaddr("eth0", &ds.ipaddr); if (ds.netmask.s_addr != 0) { |