1 #ifndef _NETINET_IP6_H_
2 #define _NETINET_IP6_H_
3 #define IN6_ARE_ADDR_EQUAL(a, b) \
4 (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
9 u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */
10 u_int16_t ip6_un1_plen; /* payload length */
11 u_int8_t ip6_un1_nxt; /* next header */
12 u_int8_t ip6_un1_hlim; /* hop limit */
14 u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
16 struct in6_addr ip6_src; /* source address */
17 struct in6_addr ip6_dst; /* destination address */
19 #define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
20 #define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
24 u_int8_t icmp6_type; /* type field */
25 u_int8_t icmp6_code; /* code field */
26 u_int16_t icmp6_cksum; /* checksum field */
28 u_int32_t icmp6_un_data32[1]; /* type-specific field */
29 u_int16_t icmp6_un_data16[2]; /* type-specific field */
30 u_int8_t icmp6_un_data8[4]; /* type-specific field */
35 u_int8_t ip6h_nxt; /* next header */
36 u_int8_t ip6h_len; /* length in units of 8 octets */
37 /* followed by options */
40 u_int8_t ip6r_nxt; /* next header */
41 u_int8_t ip6r_len; /* length in units of 8 octets */
42 u_int8_t ip6r_type; /* routing type */
43 u_int8_t ip6r_segleft; /* segments left */
44 /* followed by routing type specific data */
47 u_int8_t ip6f_nxt; /* next header */
48 u_int8_t ip6f_reserved; /* reserved field */
49 u_int16_t ip6f_offlg; /* offset, reserved, and flag */
50 u_int32_t ip6f_ident; /* identification */
52 #define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */
53 #define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
58 #endif /* _NETINET_IP6_H_ */