Merge pull request #1121 from uknoblic/ip64
ip64: Streamlined configuration parameters
This commit is contained in:
commit
db60906e99
|
@ -40,4 +40,9 @@
|
|||
|
||||
#define IP64_CONF_ETH_DRIVER ip64_tap_driver
|
||||
|
||||
/*
|
||||
* In contrast to the mandatory parameters above, IP64_CONF_DHCP is an
|
||||
* optional configuration parameter. The default value is set in ip64.h
|
||||
*/
|
||||
/* #define IP64_CONF_DHCP 1 */
|
||||
#endif /* IP64_CONF_H */
|
||||
|
|
|
@ -188,7 +188,7 @@ ip64_init(void)
|
|||
|
||||
PRINTF("ip64_init\n");
|
||||
IP64_ETH_DRIVER.init();
|
||||
#if IP64_CONF_DHCP
|
||||
#if IP64_DHCP
|
||||
ip64_ipv4_dhcp_init();
|
||||
#endif /* IP64_CONF_DHCP */
|
||||
|
||||
|
@ -894,14 +894,14 @@ ip64_hostaddr_is_configured(void)
|
|||
static void
|
||||
interface_init(void)
|
||||
{
|
||||
IP64_CONF_UIP_FALLBACK_INTERFACE.init();
|
||||
IP64_UIP_FALLBACK_INTERFACE.init();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
interface_output(void)
|
||||
{
|
||||
PRINTF("ip64: interface_output len %d\n", uip_len);
|
||||
IP64_CONF_UIP_FALLBACK_INTERFACE.output();
|
||||
IP64_UIP_FALLBACK_INTERFACE.output();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
const struct uip_fallback_interface ip64_uip_fallback_interface = {
|
||||
|
|
|
@ -71,7 +71,18 @@ extern uint16_t ip64_packet_buffer_maxlen;
|
|||
#define IP64_INPUT IP64_CONF_INPUT
|
||||
#endif /* IP64_CONF_INPUT */
|
||||
|
||||
#ifndef IP64_CONF_UIP_FALLBACK_INTERFACE
|
||||
#error IP64_CONF_UIP_FALLBACK_INTERFACE must be #defined in ip64-conf.h
|
||||
#else /* IP64_CONF_UIP_FALLBACK_INTERFACE */
|
||||
#define IP64_UIP_FALLBACK_INTERFACE IP64_CONF_UIP_FALLBACK_INTERFACE
|
||||
#endif /* IP64_CONF_UIP_FALLBACK_INTERFACE */
|
||||
|
||||
#ifdef IP64_CONF_DHCP
|
||||
#define IP64_DHCP IP64_CONF_DHCP
|
||||
#else /* IP64_CONF_DHCP */
|
||||
/* Enable DHCP per default */
|
||||
#define IP64_DHCP 1
|
||||
#endif /* IP64_CONF_DHCP */
|
||||
|
||||
#endif /* IP64_H */
|
||||
|
||||
|
|
Loading…
Reference in a new issue