galileo: Omit DHCP code when IPv6 is enabled

This commit is contained in:
Michael LeMay 2016-09-24 17:37:07 -07:00
parent ef78b44a86
commit 04446e8da5

View File

@ -44,9 +44,8 @@ const linkaddr_t linkaddr_null = { { 0, 0, 0, 0, 0, 0 } };
#define HOST_IP SUBNET_IP, 2 #define HOST_IP SUBNET_IP, 2
#define GATEWAY_IP SUBNET_IP, 1 #define GATEWAY_IP SUBNET_IP, 1
#define NAMESERVER_IP GATEWAY_IP #define NAMESERVER_IP GATEWAY_IP
#endif
PROCESS(dhcp_process, "DHCP"); PROCESS(dhcp_process, "DHCP");
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
@ -74,11 +73,14 @@ eth_init(void)
#endif #endif
process_start(&eth_process, NULL); process_start(&eth_process, NULL);
#if !NETSTACK_CONF_WITH_IPV6
/* Comment out the following line to disable DHCP and simply use the static /* Comment out the following line to disable DHCP and simply use the static
* IP configuration setup above. * IP configuration setup above.
*/ */
process_start(&dhcp_process, NULL); process_start(&dhcp_process, NULL);
#endif
} }
#if !NETSTACK_CONF_WITH_IPV6
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
PROCESS_THREAD(dhcp_process, ev, data) PROCESS_THREAD(dhcp_process, ev, data)
{ {
@ -123,3 +125,4 @@ dhcpc_unconfigured(const struct dhcpc_state *s)
printf("DHCP unconfigured.\n"); printf("DHCP unconfigured.\n");
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#endif