diff options
| author | chenyong <[email protected]> | 2019-06-24 13:56:42 +0800 |
|---|---|---|
| committer | chenyong <[email protected]> | 2019-06-24 17:46:18 +0800 |
| commit | 7d2ffe63e91a46380d04d4245fec56d6ba0d25f8 (patch) | |
| tree | 8485d1c158c9e542ab383436056bc68a3cb7dcc2 /components/net/sal_socket/impl | |
| parent | c574c49b2fe81ad2ee6f4ba7f3f61c978bea0497 (diff) | |
[net][sal][netdev] Add IPv6 option configuration and feature support in SAL and netdev
Signed-off-by: chenyong <[email protected]>
Diffstat (limited to 'components/net/sal_socket/impl')
| -rw-r--r-- | components/net/sal_socket/impl/af_inet_lwip.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/net/sal_socket/impl/af_inet_lwip.c b/components/net/sal_socket/impl/af_inet_lwip.c index 95e7633635..e53aa845cc 100644 --- a/components/net/sal_socket/impl/af_inet_lwip.c +++ b/components/net/sal_socket/impl/af_inet_lwip.c @@ -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, }; |
