diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-02-03 15:40:56 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-02-03 15:40:56 -0600 |
commit | 87bc48cc1efcedaae3bf1b176168ff3dc17637f7 (patch) | |
tree | 6953f9f33fcd7b75ec0019268bd13b3569099da8 /apps/nshlib | |
parent | be5a9dbe26d3d362a250d7fbff2923090a144032 (diff) | |
download | px4-nuttx-87bc48cc1efcedaae3bf1b176168ff3dc17637f7.tar.gz px4-nuttx-87bc48cc1efcedaae3bf1b176168ff3dc17637f7.tar.bz2 px4-nuttx-87bc48cc1efcedaae3bf1b176168ff3dc17637f7.zip |
ICMPv6: This completes coding of the ICMPv6 auto-configuration feature. It is not yet functional
Diffstat (limited to 'apps/nshlib')
-rw-r--r-- | apps/nshlib/Kconfig | 7 | ||||
-rw-r--r-- | apps/nshlib/nsh_netinit.c | 13 |
2 files changed, 8 insertions, 12 deletions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig index 8bcd5eda7..dc1001020 100644 --- a/apps/nshlib/Kconfig +++ b/apps/nshlib/Kconfig @@ -930,8 +930,7 @@ config NSH_NETMASK endif # NET_IPv4 -if NET_IPv6 -if !NET_ICMPv6_AUTOCONF +if NET_IPv6 && !NET_ICMPv6_AUTOCONF comment "Target IPv6 address" @@ -1023,8 +1022,6 @@ config NSH_IPv6ADDR_8 individually. This is the last of the 8-values. The default for all eight values is fc00::2. -endif # !NET_ICMPv6_AUTOCONF - comment "Router IPv6 address" config NSH_DRIPv6ADDR_1 @@ -1189,7 +1186,7 @@ config NSH_IPv6NETMASK_8 individually. This is the eighth of the 8-values. The default for all eight values is fe00::0. -endif #NET_IPv6 +endif #NET_IPv6 && !NET_ICMPv6_AUTOCONF endmenu # IP Address Configuration config NSH_DNS diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c index c2b8bf952..1c4722909 100644 --- a/apps/nshlib/nsh_netinit.c +++ b/apps/nshlib/nsh_netinit.c @@ -131,8 +131,7 @@ static sem_t g_notify_sem; #endif -#ifdef CONFIG_NET_IPv6 -#ifndef CONFIG_NET_ICMPv6_AUTOCONF +#if defined(CONFIG_NET_IPv6) && !defined(CONFIG_NET_ICMPv6_AUTOCONF) /* Host IPv6 address */ static const uint16_t g_ipv6_hostaddr[8] = @@ -146,7 +145,6 @@ static const uint16_t g_ipv6_hostaddr[8] = HTONS(CONFIG_NSH_IPv6ADDR_7), HTONS(CONFIG_NSH_IPv6ADDR_8), }; -#endif /* CONFIG_NET_ICMPv6_AUTOCONF */ /* Default routine IPv6 address */ @@ -175,7 +173,7 @@ static const uint16_t g_ipv6_netmask[8] = HTONS(CONFIG_NSH_IPv6NETMASK_7), HTONS(CONFIG_NSH_IPv6NETMASK_8), }; -#endif /* CONFIG_NET_IPv6 */ +#endif /* CONFIG_NET_IPv6 && !CONFIG_NET_ICMPv6_AUTOCONF*/ /**************************************************************************** * Private Function Prototypes @@ -260,13 +258,12 @@ static void nsh_netinit_configure(void) netlib_icmpv6_autoconfiguration(NET_DEVNAME); -#else +#else /* CONFIG_NET_ICMPv6_AUTOCONF */ /* Set up our fixed host address */ netlib_set_ipv6addr(NET_DEVNAME, (FAR const struct in6_addr *)g_ipv6_hostaddr); -#endif /* Set up the default router address */ @@ -277,7 +274,9 @@ static void nsh_netinit_configure(void) netlib_set_ipv6netmask(NET_DEVNAME, (FAR const struct in6_addr *)g_ipv6_netmask); -#endif + +#endif /* CONFIG_NET_ICMPv6_AUTOCONF */ +#endif /* CONFIG_NET_IPv6 */ #if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) /* Set up the resolver */ |