36 FNET_COMP_PACKED_BEGIN
40 fnet_uint8_t addr[16];
41 fnet_uint16_t addr16[8];
42 fnet_uint32_t addr32[4];
53 #define FNET_IP6_ADDR_STR_SIZE sizeof("abcd:abcd:abcd:abcd:abcd:abcd:abcd:abcd") 60 #define FNET_IP6_HEAD_SIZE 40u 62 #define FNET_IP6_DEFAULT_MTU 1280u 70 #define FNET_IP6_ADDR_INIT(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16) \ 71 {{ (a1), (a2), (a3), (a4), (a5), (a6), (a7), (a8), (a9), (a10), (a11), (a12), (a13), (a14), (a15), (a16) }} 76 #define FNET_IP6_ADDR_ANY_INIT FNET_IP6_ADDR_INIT(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) 77 #define FNET_IP6_ADDR_LOOPBACK_INIT FNET_IP6_ADDR_INIT(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01) 78 #define FNET_IP6_ADDR_NODELOCAL_ALLNODES_INIT FNET_IP6_ADDR_INIT(0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01) 79 #define FNET_IP6_ADDR_INTFACELOCAL_ALLNODES_INIT FNET_IP6_ADDR_INIT(0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01) 80 #define FNET_IP6_ADDR_LINKLOCAL_ALLNODES_INIT FNET_IP6_ADDR_INIT(0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01) 81 #define FNET_IP6_ADDR_LINKLOCAL_ALLROUTERS_INIT FNET_IP6_ADDR_INIT(0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02) 82 #define FNET_IP6_ADDR_LINKLOCAL_ALLV2ROUTERS_INIT FNET_IP6_ADDR_INIT(0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16) 83 #define FNET_IP6_ADDR_LINKLOCAL_PREFIX_INIT FNET_IP6_ADDR_INIT(0xFE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) 94 #define FNET_IP6_ADDR_EQUAL(a, b) \ 95 ((fnet_memcmp(&(a)->addr[0], &(b)->addr[0], sizeof(fnet_ip6_addr_t)) == 0)?FNET_TRUE:FNET_FALSE) 98 #define FNET_IP6_ADDR_COPY(from_addr, to_addr) \ 99 (fnet_memcpy(&(to_addr)->addr[0], &(from_addr)->addr[0], sizeof(fnet_ip6_addr_t))) 102 #define FNET_IP6_ADDR_IS_UNSPECIFIED(a) \ 103 (((((a)->addr32[0]) == 0U) && \ 104 (((a)->addr32[1]) == 0U) && \ 105 (((a)->addr32[2]) == 0U) && \ 106 (((a)->addr32[3]) == 0U))?FNET_TRUE:FNET_FALSE) 109 #define FNET_IP6_ADDR_IS_LOOPBACK(a) \ 110 ((((a)->addr32[0]) == 0U) && \ 111 (((a)->addr32[1]) == 0U) && \ 112 (((a)->addr32[2]) == 0U) && \ 113 (((a)->addr32[3]) == FNET_NTOHL(1U))) 116 #define FNET_IP6_ADDR_IS_MULTICAST(a) ((((a)->addr[0]) == 0xffU)?FNET_TRUE:FNET_FALSE) 119 #define FNET_IP6_ADDR_IS_LINKLOCAL(a) \ 120 ((((a)->addr[0]) == 0xfeU) && ((((a)->addr[1]) & 0xc0U) == 0x80U)) 121 #define FNET_IP6_ADDR_IS_SITELOCAL(a) \ 122 ((((a)->addr[0]) == 0xfeU) && ((((a)->addr[1]) & 0xc0U) == 0xc0U)) 128-bit IPv6 address type.