[net][sal][netdev] Add IPv6 option configuration and feature support in SAL and netdev

Signed-off-by: chenyong <1521761801@qq.com>
This commit is contained in:
chenyong
2019-06-24 17:46:18 +08:00
parent c574c49b2f
commit 7d2ffe63e9
14 changed files with 713 additions and 99 deletions
@@ -25,6 +25,12 @@
#include <netdev.h>
#if (LWIP_VERSION < 0x2000000) && NETDEV_IPV6
#error "The lwIP version is not support IPV6, please disable netdev IPV6 configuration "
#elif (LWIP_VERSION > 0x2000000) && (NETDEV_IPV6 != LWIP_IPV6)
#error "IPV6 configuration error, Please check and synchronize netdev and lwip IPV6 configuration."
#endif
#if LWIP_VERSION < 0x2000000
#define SELWAIT_T int
#else
@@ -308,7 +314,11 @@ static const struct sal_netdb_ops lwip_netdb_ops =
static const struct sal_proto_family lwip_inet_family =
{
AF_INET,
#if LWIP_VERSION > 0x2000000
AF_INET6,
#else
AF_INET,
#endif
&lwip_socket_ops,
&lwip_netdb_ops,
};