41 #ifndef LWIP_HDR_IP6_H 42 #define LWIP_HDR_IP6_H 61 #define IP6_NEXTH_HOPBYHOP 0 62 #define IP6_NEXTH_TCP 6 63 #define IP6_NEXTH_UDP 17 64 #define IP6_NEXTH_ENCAPS 41 65 #define IP6_NEXTH_ROUTING 43 66 #define IP6_NEXTH_FRAGMENT 44 67 #define IP6_NEXTH_ICMP6 58 68 #define IP6_NEXTH_NONE 59 69 #define IP6_NEXTH_DESTOPTS 60 70 #define IP6_NEXTH_UDPLITE 136 74 #ifdef PACK_STRUCT_USE_INCLUDES 92 #ifdef PACK_STRUCT_USE_INCLUDES 97 #define IP6_HBH_HLEN 8 98 #define IP6_PAD1_OPTION 0 99 #define IP6_PADN_ALERT_OPTION 1 100 #define IP6_ROUTER_ALERT_OPTION 5 101 #define IP6_ROUTER_ALERT_VALUE_MLD 0 102 #ifdef PACK_STRUCT_USE_INCLUDES 123 #ifdef PACK_STRUCT_USE_INCLUDES 128 #define IP6_FRAG_HLEN 8 129 #define IP6_FRAG_OFFSET_MASK 0xfff8 130 #define IP6_FRAG_MORE_FLAG 0x0001 131 #ifdef PACK_STRUCT_USE_INCLUDES 135 struct ip6_frag_hdr {
146 #ifdef PACK_STRUCT_USE_INCLUDES 150 #define IP6H_V(hdr) ((ntohl((hdr)->_v_tc_fl) >> 28) & 0x0f) 151 #define IP6H_TC(hdr) ((ntohl((hdr)->_v_tc_fl) >> 20) & 0xff) 152 #define IP6H_FL(hdr) (ntohl((hdr)->_v_tc_fl) & 0x000fffff) 153 #define IP6H_PLEN(hdr) (ntohs((hdr)->_plen)) 154 #define IP6H_NEXTH(hdr) ((hdr)->_nexth) 155 #define IP6H_NEXTH_P(hdr) ((u8_t *)(hdr) + 6) 156 #define IP6H_HOPLIM(hdr) ((hdr)->_hoplim) 158 #define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl = (htonl((((u32_t)(v)) << 28) | (((u32_t)(tc)) << 20) | (fl))) 159 #define IP6H_PLEN_SET(hdr, plen) (hdr)->_plen = htons(plen) 160 #define IP6H_NEXTH_SET(hdr, nexth) (hdr)->_nexth = (nexth) 161 #define IP6H_HOPLIM_SET(hdr, hl) (hdr)->_hoplim = (u8_t)(hl) 164 struct netif *ip6_route(
const ip6_addr_t *src,
const ip6_addr_t *dest);
167 err_t ip6_output(
struct pbuf *p,
const ip6_addr_t *src,
const ip6_addr_t *dest,
169 err_t ip6_output_if(
struct pbuf *p,
const ip6_addr_t *src,
const ip6_addr_t *dest,
171 err_t ip6_output_if_src(
struct pbuf *p,
const ip6_addr_t *src,
const ip6_addr_t *dest,
173 #if LWIP_NETIF_HWADDRHINT 174 err_t ip6_output_hinted(
struct pbuf *p,
const ip6_addr_t *src,
const ip6_addr_t *dest,
181 #define ip6_netif_get_local_ip(netif, dest) (((netif) != NULL) ? \ 182 ip6_select_source_address(netif, dest) : NULL) 185 void ip6_debug_print(
struct pbuf *p);
187 #define ip6_debug_print(p) #define PACK_STRUCT_STRUCT
#define PACK_STRUCT_FLD_8(x)
#define PACK_STRUCT_FIELD(x)
#define PACK_STRUCT_FLD_S(x)
#define PACK_STRUCT_BEGIN