66#ifndef _NETINET_IP6_H_
67#define _NETINET_IP6_H_
88#define ip6_vfc ip6_ctlun.ip6_un2_vfc
89#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
90#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
91#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
92#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
93#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
95#define IPV6_VERSION 0x60
96#define IPV6_VERSION_MASK 0xf0
98#if BYTE_ORDER == BIG_ENDIAN
99#define IPV6_FLOWINFO_MASK 0x0fffffff
100#define IPV6_FLOWLABEL_MASK 0x000fffff
102#if BYTE_ORDER == LITTLE_ENDIAN
103#define IPV6_FLOWINFO_MASK 0xffffff0f
104#define IPV6_FLOWLABEL_MASK 0xffff0f00
107#define IPV6_FLOWLABEL_LEN 20
109#define IPV6_TRAFFIC_CLASS(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xff)
110#define IPV6_DSCP(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xfc)
111#define IPV6_ECN(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0x03)
139#define IP6OPT_PAD1 0x00
140#define IP6OPT_PADN 0x01
141#define IP6OPT_JUMBO 0xC2
142#define IP6OPT_NSAP_ADDR 0xC3
143#define IP6OPT_TUNNEL_LIMIT 0x04
145#define IP6OPT_RTALERT 0x05
147#define IP6OPT_ROUTER_ALERT 0x05
149#define IP6OPT_RTALERT_LEN 4
150#define IP6OPT_RTALERT_MLD 0
151#define IP6OPT_RTALERT_RSVP 1
152#define IP6OPT_RTALERT_ACTNET 2
153#define IP6OPT_MINLEN 2
155#define IP6OPT_EID 0x8a
157#define IP6OPT_TYPE(o) ((o) & 0xC0)
158#define IP6OPT_TYPE_SKIP 0x00
159#define IP6OPT_TYPE_DISCARD 0x40
160#define IP6OPT_TYPE_FORCEICMP 0x80
161#define IP6OPT_TYPE_ICMP 0xC0
163#define IP6OPT_MUTABLE 0x20
177#define IP6OPT_JUMBO_LEN 6
203#if BYTE_ORDER == BIG_ENDIAN
204#define IP6_ALERT_MLD 0x0000
205#define IP6_ALERT_RSVP 0x0001
206#define IP6_ALERT_AN 0x0002
208#if BYTE_ORDER == LITTLE_ENDIAN
209#define IP6_ALERT_MLD 0x0000
210#define IP6_ALERT_RSVP 0x0100
211#define IP6_ALERT_AN 0x0200
242#if BYTE_ORDER == BIG_ENDIAN
243#define IP6F_OFF_MASK 0xfff8
244#define IP6F_RESERVED_MASK 0x0006
245#define IP6F_MORE_FRAG 0x0001
247#define IP6F_OFF_MASK 0xf8ff
248#define IP6F_RESERVED_MASK 0x0600
249#define IP6F_MORE_FRAG 0x0100
255#define IPV6_MAXHLIM 255
256#define IPV6_DEFHLIM 64
257#define IPV6_FRAGTTL 120
258#define IPV6_HLIMDEC 1
260#define IPV6_MMTU 1280
261#define IPV6_MAXPACKET 65535
262#define IPV6_MAXOPTHDR 2048
union ip6_hdr::@9 ip6_ctlun
struct ip6_hdr::@9::ip6_hdrctl ip6_un1
u_int8_t ip6oj_jumbo_len[4]
u_int8_t ip6on_src_nsap_len
u_int8_t ip6on_dst_nsap_len
u_int8_t ip6ot_encap_limit