Go to the documentation of this file.
   37 #ifndef LWIP_HDR_PROT_IP6_H 
   38 #define LWIP_HDR_PROT_IP6_H 
   40 #include "lwip/arch.h" 
   41 #include "lwip/ip6_addr.h" 
   49 #ifdef PACK_STRUCT_USE_INCLUDES 
   50 #  include "arch/bpstruct.h" 
   57 #ifdef PACK_STRUCT_USE_INCLUDES 
   58 #  include "arch/epstruct.h" 
   64 #define IP6_NEXTH_HOPBYHOP  0 
   65 #define IP6_NEXTH_TCP       6 
   66 #define IP6_NEXTH_UDP       17 
   67 #define IP6_NEXTH_ENCAPS    41 
   68 #define IP6_NEXTH_ROUTING   43 
   69 #define IP6_NEXTH_FRAGMENT  44 
   70 #define IP6_NEXTH_ICMP6     58 
   71 #define IP6_NEXTH_NONE      59 
   72 #define IP6_NEXTH_DESTOPTS  60 
   73 #define IP6_NEXTH_UDPLITE   136 
   76 #ifdef PACK_STRUCT_USE_INCLUDES 
   77 #  include "arch/bpstruct.h" 
   94 #ifdef PACK_STRUCT_USE_INCLUDES 
   95 #  include "arch/epstruct.h" 
   99 #define IP6_HBH_HLEN    8 
  100 #define IP6_PAD1_OPTION         0 
  101 #define IP6_PADN_ALERT_OPTION   1 
  102 #define IP6_ROUTER_ALERT_OPTION 5 
  103 #define IP6_ROUTER_ALERT_VALUE_MLD 0 
  104 #ifdef PACK_STRUCT_USE_INCLUDES 
  105 #  include "arch/bpstruct.h" 
  125 #ifdef PACK_STRUCT_USE_INCLUDES 
  126 #  include "arch/epstruct.h" 
  130 #define IP6_FRAG_HLEN    8 
  131 #define IP6_FRAG_OFFSET_MASK    0xfff8 
  132 #define IP6_FRAG_MORE_FLAG      0x0001 
  133 #ifdef PACK_STRUCT_USE_INCLUDES 
  134 #  include "arch/bpstruct.h" 
  148 #ifdef PACK_STRUCT_USE_INCLUDES 
  149 #  include "arch/epstruct.h" 
  152 #define IP6H_V(hdr)  ((lwip_ntohl((hdr)->_v_tc_fl) >> 28) & 0x0f) 
  153 #define IP6H_TC(hdr) ((lwip_ntohl((hdr)->_v_tc_fl) >> 20) & 0xff) 
  154 #define IP6H_FL(hdr) (lwip_ntohl((hdr)->_v_tc_fl) & 0x000fffff) 
  155 #define IP6H_PLEN(hdr) (lwip_ntohs((hdr)->_plen)) 
  156 #define IP6H_NEXTH(hdr) ((hdr)->_nexth) 
  157 #define IP6H_NEXTH_P(hdr) ((u8_t *)(hdr) + 6) 
  158 #define IP6H_HOPLIM(hdr) ((hdr)->_hoplim) 
  160 #define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl = (lwip_htonl((((u32_t)(v)) << 28) | (((u32_t)(tc)) << 20) | (fl))) 
  161 #define IP6H_PLEN_SET(hdr, plen) (hdr)->_plen = lwip_htons(plen) 
  162 #define IP6H_NEXTH_SET(hdr, nexth) (hdr)->_nexth = (nexth) 
  163 #define IP6H_HOPLIM_SET(hdr, hl) (hdr)->_hoplim = (u8_t)(hl) 
  
 
PACK_STRUCT_FLD_8(u8_t _nexth)
 
PACK_STRUCT_FLD_8(u8_t _nexth)
 
PACK_STRUCT_BEGIN struct ip6_addr_packed PACK_STRUCT_STRUCT
 
PACK_STRUCT_FLD_8(u8_t _nexth)
 
PACK_STRUCT_FIELD(u16_t _ra_opt_data)
 
typedefPACK_STRUCT_END struct ip6_addr_packed ip6_addr_p_t
 
#define PACK_STRUCT_BEGIN
 
PACK_STRUCT_FIELD(u32_t _v_tc_fl)
 
PACK_STRUCT_FLD_S(ip6_addr_p_t src)
 
PACK_STRUCT_FIELD(u32_t addr[4])
 
PACK_STRUCT_FIELD(u16_t _fragment_offset)