FreeBSD kernel IPv4 code
ip6.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ip6_hdr
 
struct  ip6_ext
 
struct  ip6_hbh
 
struct  ip6_dest
 
struct  ip6_opt
 
struct  ip6_opt_jumbo
 
struct  ip6_opt_nsap
 
struct  ip6_opt_tunnel
 
struct  ip6_opt_router
 
struct  ip6_rthdr
 
struct  ip6_rthdr0
 
struct  ip6_frag
 

Macros

#define ip6_vfc   ip6_ctlun.ip6_un2_vfc
 
#define ip6_flow   ip6_ctlun.ip6_un1.ip6_un1_flow
 
#define ip6_plen   ip6_ctlun.ip6_un1.ip6_un1_plen
 
#define ip6_nxt   ip6_ctlun.ip6_un1.ip6_un1_nxt
 
#define ip6_hlim   ip6_ctlun.ip6_un1.ip6_un1_hlim
 
#define ip6_hops   ip6_ctlun.ip6_un1.ip6_un1_hlim
 
#define IPV6_VERSION   0x60
 
#define IPV6_VERSION_MASK   0xf0
 
#define IPV6_FLOWINFO_MASK   0x0fffffff /* flow info (28 bits) */
 
#define IPV6_FLOWLABEL_MASK   0x000fffff /* flow label (20 bits) */
 
#define IPV6_FLOWLABEL_LEN   20
 
#define IPV6_TRAFFIC_CLASS(ip6)   ((ntohl((ip6)->ip6_flow) >> 20) & 0xff)
 
#define IPV6_DSCP(ip6)   ((ntohl((ip6)->ip6_flow) >> 20) & 0xfc)
 
#define IPV6_ECN(ip6)   ((ntohl((ip6)->ip6_flow) >> 20) & 0x03)
 
#define IP6OPT_PAD1   0x00 /* 00 0 00000 */
 
#define IP6OPT_PADN   0x01 /* 00 0 00001 */
 
#define IP6OPT_JUMBO   0xC2 /* 11 0 00010 = 194 */
 
#define IP6OPT_NSAP_ADDR   0xC3 /* 11 0 00011 */
 
#define IP6OPT_TUNNEL_LIMIT   0x04 /* 00 0 00100 */
 
#define IP6OPT_ROUTER_ALERT   0x05 /* 00 0 00101 (RFC3542, recommended) */
 
#define IP6OPT_RTALERT_LEN   4
 
#define IP6OPT_RTALERT_MLD   0 /* Datagram contains an MLD message */
 
#define IP6OPT_RTALERT_RSVP   1 /* Datagram contains an RSVP message */
 
#define IP6OPT_RTALERT_ACTNET   2 /* contains an Active Networks msg */
 
#define IP6OPT_MINLEN   2
 
#define IP6OPT_EID   0x8a /* 10 0 01010 */
 
#define IP6OPT_TYPE(o)   ((o) & 0xC0)
 
#define IP6OPT_TYPE_SKIP   0x00
 
#define IP6OPT_TYPE_DISCARD   0x40
 
#define IP6OPT_TYPE_FORCEICMP   0x80
 
#define IP6OPT_TYPE_ICMP   0xC0
 
#define IP6OPT_MUTABLE   0x20
 
#define IP6OPT_JUMBO_LEN   6
 
#define IP6_ALERT_MLD   0x0000
 
#define IP6_ALERT_RSVP   0x0001
 
#define IP6_ALERT_AN   0x0002
 
#define IP6F_OFF_MASK   0xfff8 /* mask out offset from _offlg */
 
#define IP6F_RESERVED_MASK   0x0006 /* reserved bits in ip6f_offlg */
 
#define IP6F_MORE_FRAG   0x0001 /* more-fragments flag */
 
#define IPV6_MAXHLIM   255 /* maximum hoplimit */
 
#define IPV6_DEFHLIM   64 /* default hlim */
 
#define IPV6_FRAGTTL   120 /* ttl for fragment packets, in slowtimo tick */
 
#define IPV6_HLIMDEC   1 /* subtracted when forwarding */
 
#define IPV6_MMTU   1280 /* minimal MTU and reassembly. 1024 + 256 */
 
#define IPV6_MAXPACKET   65535 /* ip6 max packet size without Jumbo payload*/
 
#define IPV6_MAXOPTHDR   2048 /* max option header size, 256 64-bit words */
 

Variables

struct ip6_hdr __packed
 

Macro Definition Documentation

◆ IP6_ALERT_AN

#define IP6_ALERT_AN   0x0002

Definition at line 206 of file ip6.h.

◆ IP6_ALERT_MLD

#define IP6_ALERT_MLD   0x0000

Definition at line 204 of file ip6.h.

◆ IP6_ALERT_RSVP

#define IP6_ALERT_RSVP   0x0001

Definition at line 205 of file ip6.h.

◆ ip6_flow

#define ip6_flow   ip6_ctlun.ip6_un1.ip6_un1_flow

Definition at line 89 of file ip6.h.

◆ ip6_hlim

#define ip6_hlim   ip6_ctlun.ip6_un1.ip6_un1_hlim

Definition at line 92 of file ip6.h.

◆ ip6_hops

#define ip6_hops   ip6_ctlun.ip6_un1.ip6_un1_hlim

Definition at line 93 of file ip6.h.

◆ ip6_nxt

#define ip6_nxt   ip6_ctlun.ip6_un1.ip6_un1_nxt

Definition at line 91 of file ip6.h.

◆ ip6_plen

#define ip6_plen   ip6_ctlun.ip6_un1.ip6_un1_plen

Definition at line 90 of file ip6.h.

◆ ip6_vfc

#define ip6_vfc   ip6_ctlun.ip6_un2_vfc

Definition at line 88 of file ip6.h.

◆ IP6F_MORE_FRAG

#define IP6F_MORE_FRAG   0x0001 /* more-fragments flag */

Definition at line 245 of file ip6.h.

◆ IP6F_OFF_MASK

#define IP6F_OFF_MASK   0xfff8 /* mask out offset from _offlg */

Definition at line 243 of file ip6.h.

◆ IP6F_RESERVED_MASK

#define IP6F_RESERVED_MASK   0x0006 /* reserved bits in ip6f_offlg */

Definition at line 244 of file ip6.h.

◆ IP6OPT_EID

#define IP6OPT_EID   0x8a /* 10 0 01010 */

Definition at line 155 of file ip6.h.

◆ IP6OPT_JUMBO

#define IP6OPT_JUMBO   0xC2 /* 11 0 00010 = 194 */

Definition at line 141 of file ip6.h.

◆ IP6OPT_JUMBO_LEN

#define IP6OPT_JUMBO_LEN   6

Definition at line 177 of file ip6.h.

◆ IP6OPT_MINLEN

#define IP6OPT_MINLEN   2

Definition at line 153 of file ip6.h.

◆ IP6OPT_MUTABLE

#define IP6OPT_MUTABLE   0x20

Definition at line 163 of file ip6.h.

◆ IP6OPT_NSAP_ADDR

#define IP6OPT_NSAP_ADDR   0xC3 /* 11 0 00011 */

Definition at line 142 of file ip6.h.

◆ IP6OPT_PAD1

#define IP6OPT_PAD1   0x00 /* 00 0 00000 */

Definition at line 139 of file ip6.h.

◆ IP6OPT_PADN

#define IP6OPT_PADN   0x01 /* 00 0 00001 */

Definition at line 140 of file ip6.h.

◆ IP6OPT_ROUTER_ALERT

#define IP6OPT_ROUTER_ALERT   0x05 /* 00 0 00101 (RFC3542, recommended) */

Definition at line 147 of file ip6.h.

◆ IP6OPT_RTALERT_ACTNET

#define IP6OPT_RTALERT_ACTNET   2 /* contains an Active Networks msg */

Definition at line 152 of file ip6.h.

◆ IP6OPT_RTALERT_LEN

#define IP6OPT_RTALERT_LEN   4

Definition at line 149 of file ip6.h.

◆ IP6OPT_RTALERT_MLD

#define IP6OPT_RTALERT_MLD   0 /* Datagram contains an MLD message */

Definition at line 150 of file ip6.h.

◆ IP6OPT_RTALERT_RSVP

#define IP6OPT_RTALERT_RSVP   1 /* Datagram contains an RSVP message */

Definition at line 151 of file ip6.h.

◆ IP6OPT_TUNNEL_LIMIT

#define IP6OPT_TUNNEL_LIMIT   0x04 /* 00 0 00100 */

Definition at line 143 of file ip6.h.

◆ IP6OPT_TYPE

#define IP6OPT_TYPE (   o)    ((o) & 0xC0)

Definition at line 157 of file ip6.h.

◆ IP6OPT_TYPE_DISCARD

#define IP6OPT_TYPE_DISCARD   0x40

Definition at line 159 of file ip6.h.

◆ IP6OPT_TYPE_FORCEICMP

#define IP6OPT_TYPE_FORCEICMP   0x80

Definition at line 160 of file ip6.h.

◆ IP6OPT_TYPE_ICMP

#define IP6OPT_TYPE_ICMP   0xC0

Definition at line 161 of file ip6.h.

◆ IP6OPT_TYPE_SKIP

#define IP6OPT_TYPE_SKIP   0x00

Definition at line 158 of file ip6.h.

◆ IPV6_DEFHLIM

#define IPV6_DEFHLIM   64 /* default hlim */

Definition at line 256 of file ip6.h.

◆ IPV6_DSCP

#define IPV6_DSCP (   ip6)    ((ntohl((ip6)->ip6_flow) >> 20) & 0xfc)

Definition at line 110 of file ip6.h.

◆ IPV6_ECN

#define IPV6_ECN (   ip6)    ((ntohl((ip6)->ip6_flow) >> 20) & 0x03)

Definition at line 111 of file ip6.h.

◆ IPV6_FLOWINFO_MASK

#define IPV6_FLOWINFO_MASK   0x0fffffff /* flow info (28 bits) */

Definition at line 99 of file ip6.h.

◆ IPV6_FLOWLABEL_LEN

#define IPV6_FLOWLABEL_LEN   20

Definition at line 107 of file ip6.h.

◆ IPV6_FLOWLABEL_MASK

#define IPV6_FLOWLABEL_MASK   0x000fffff /* flow label (20 bits) */

Definition at line 100 of file ip6.h.

◆ IPV6_FRAGTTL

#define IPV6_FRAGTTL   120 /* ttl for fragment packets, in slowtimo tick */

Definition at line 257 of file ip6.h.

◆ IPV6_HLIMDEC

#define IPV6_HLIMDEC   1 /* subtracted when forwarding */

Definition at line 258 of file ip6.h.

◆ IPV6_MAXHLIM

#define IPV6_MAXHLIM   255 /* maximum hoplimit */

Definition at line 255 of file ip6.h.

◆ IPV6_MAXOPTHDR

#define IPV6_MAXOPTHDR   2048 /* max option header size, 256 64-bit words */

Definition at line 262 of file ip6.h.

◆ IPV6_MAXPACKET

#define IPV6_MAXPACKET   65535 /* ip6 max packet size without Jumbo payload*/

Definition at line 261 of file ip6.h.

◆ IPV6_MMTU

#define IPV6_MMTU   1280 /* minimal MTU and reassembly. 1024 + 256 */

Definition at line 260 of file ip6.h.

◆ IPV6_TRAFFIC_CLASS

#define IPV6_TRAFFIC_CLASS (   ip6)    ((ntohl((ip6)->ip6_flow) >> 20) & 0xff)

Definition at line 109 of file ip6.h.

◆ IPV6_VERSION

#define IPV6_VERSION   0x60

Definition at line 95 of file ip6.h.

◆ IPV6_VERSION_MASK

#define IPV6_VERSION_MASK   0xf0

Definition at line 96 of file ip6.h.

Variable Documentation

◆ __packed

struct ip6_frag __packed