diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-02-03 08:01:55 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-02-03 08:01:55 -0600 |
commit | d2dd063179ec9ab25b0db59573aa5231ba82ad93 (patch) | |
tree | e1daaf9acdcc41cfff736d7d56babbe1c59045d2 /apps/examples/udp | |
parent | 5facd80a972df125a152f2ac2493441c18985b51 (diff) | |
download | nuttx-d2dd063179ec9ab25b0db59573aa5231ba82ad93.tar.gz nuttx-d2dd063179ec9ab25b0db59573aa5231ba82ad93.tar.bz2 nuttx-d2dd063179ec9ab25b0db59573aa5231ba82ad93.zip |
Add netlib and application hooks for ICMPv6 auto-configuration (still incomplete
Diffstat (limited to 'apps/examples/udp')
-rw-r--r-- | apps/examples/udp/target.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 */ |