ICMPv6: This completes coding of the ICMPv6 auto-configuration feature. It is not yet functional

This commit is contained in:
Gregory Nutt
2015-02-03 15:40:56 -06:00
parent 0ee67383d5
commit 6273eb0160
6 changed files with 35 additions and 29 deletions

View File

@@ -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 */