From d2dd063179ec9ab25b0db59573aa5231ba82ad93 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 3 Feb 2015 08:01:55 -0600 Subject: Add netlib and application hooks for ICMPv6 auto-configuration (still incomplete --- apps/examples/udp/target.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps/examples/udp/target.c') diff --git a/apps/examples/udp/target.c b/apps/examples/udp/target.c index 711fe0d02..2d80ac0dc 100644 --- a/apps/examples/udp/target.c +++ b/apps/examples/udp/target.c @@ -58,6 +58,7 @@ ****************************************************************************/ #ifdef CONFIG_EXAMPLES_UDP_IPv6 +#ifdef CONFIG_NET_ICMPv6_AUTOCONF /* Our host IPv6 address */ static const uint16_t g_ipv6_hostaddr[8] = @@ -71,6 +72,7 @@ static const uint16_t g_ipv6_hostaddr[8] = HTONS(CONFIG_EXAMPLES_UDP_IPv6ADDR_7), HTONS(CONFIG_EXAMPLES_UDP_IPv6ADDR_8), }; +#endif /* Default routine IPv6 address */ @@ -116,10 +118,17 @@ int udp_main(int argc, char *argv[]) #endif { #ifdef CONFIG_EXAMPLES_UDP_IPv6 - /* Set up our host address */ +#ifdef CONFIG_NET_ICMPv6_AUTOCONF + /* Perform ICMPv6 auto-configuration */ + + netlib_icmpv6_autoconfiguration("eth0"); + +#else + /* Set up our fixed host address */ netlib_set_ipv6addr("eth0", (FAR const struct in6_addr *)g_ipv6_hostaddr); +#endif /* Set up the default router address */ -- cgit v1.2.3