These examples all set the IP address of eth1 is DHCP is enabled. That can't be right???
This commit is contained in:
parent
e5cbc23202
commit
ffbfe4d365
@ -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
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user