From f7400fbcb275cbb3b75f1aef2af1459b794432de Mon Sep 17 00:00:00 2001 From: arvinzzz Date: Sat, 18 Dec 2021 19:35:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0newlib=E5=AF=B9ipv6?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充业务中需要的ipv6相关宏定义 close: #I4M1DB Signed-off-by: arvinzzz Change-Id: I6835fb0673874ed8efff01c8e4f79c2d64ea0d46 --- kal/libc/newlib/porting/include/netinet/in.h | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/kal/libc/newlib/porting/include/netinet/in.h b/kal/libc/newlib/porting/include/netinet/in.h index d49f46b7..968de836 100644 --- a/kal/libc/newlib/porting/include/netinet/in.h +++ b/kal/libc/newlib/porting/include/netinet/in.h @@ -194,6 +194,30 @@ struct ip_mreq { }; #endif +#define IPV6_ADDRFORM 1 +#define IPV6_CHECKSUM 7 +#define IPV6_NEXTHOP 9 +#define IPV6_AUTHHDR 10 +#define IPV6_UNICAST_HOPS 16 +#define IPV6_MULTICAST_IF 17 +#define IPV6_MULTICAST_HOPS 18 +#define IPV6_MULTICAST_LOOP 19 +#define IPV6_JOIN_GROUP 20 +#define IPV6_LEAVE_GROUP 21 +#define IPV6_V6ONLY 26 +#define IPV6_JOIN_ANYCAST 27 +#define IPV6_LEAVE_ANYCAST 28 +#define IPV6_IPSEC_POLICY 34 + +#define IN6ADDR_ANY_INIT {{{ 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00 }}} +#define IN6ADDR_LOOPBACK_INIT {{{ 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x01 }}} + struct in6_addr { union { uint8_t __s6_addr[16];