ip6.h revision 45916cd2fec6e79bca5dee0421bd39e3c2910d1e
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* ip6.h - Common structures and definitions as defined by
* advanced BSD API.
*/
#ifndef _NETINET_IP6_H
#define _NETINET_IP6_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
struct ip6_hdr {
union {
struct ip6_hdrctl {
/* 8 bits tclass, and */
/* 20 bits flow-ID */
} ip6_un1;
/* top 4 bits of tclass */
} ip6_ctlun;
};
/* top 4 bits of tclass */
/* Hop-by-Hop options header */
struct ip6_hbh {
/* followed by options */
};
/* Destination options header */
struct ip6_dest {
/* followed by options */
};
typedef struct ip6_dest ip6_dest_t;
/* Routing header */
struct ip6_rthdr {
/* followed by routing type specific data */
};
typedef struct ip6_rthdr ip6_rthdr_t;
/* Type 0 Routing header */
struct ip6_rthdr0 {
};
typedef struct ip6_rthdr0 ip6_rthdr0_t;
/* Fragment header */
struct ip6_frag {
};
typedef struct ip6_frag ip6_frag_t;
/* ip6f_offlg field related constants (in network byte order) */
#ifdef _BIG_ENDIAN
#else
#endif
/* IPv6 options */
struct ip6_opt {
};
/*
* The high-order 3 bits of the option type define the behavior
* when processing an unknown option and whether or not the option
* content changes in flight.
*/
#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 IP6_MAX_OPT_LENGTH 255
/* Jumbo Payload Option */
struct ip6_opt_jumbo {
};
#define IP6OPT_JUMBO_LEN 6
/* NSAP Address Option */
struct ip6_opt_nsap {
/* Followed by source NSAP */
/* Followed by destination NSAP */
};
/* Tunnel Limit Option */
struct ip6_opt_tunnel {
};
/* Router Alert Option */
struct ip6_opt_router {
};
/* Router alert values (in network byte order) */
#ifdef _BIG_ENDIAN
#define IP6_ALERT_MLD 0x0000
#define IP6_ALERT_RSVP 0x0001
#define IP6_ALERT_AN 0x0002
#else
#define IP6_ALERT_MLD 0x0000
#define IP6_ALERT_RSVP 0x0100
#define IP6_ALERT_AN 0x0200
#endif
/* Binding Update Option */
struct ip6_opt_binding_update {
/* Followed by sub-options */
};
/* Binding Update Flags */
/* Binding Ack Option */
struct ip6_opt_binding_ack {
/* Followed by sub-options */
};
/* Binding Request Option */
struct ip6_opt_binding_request {
/* Followed by sub-options */
};
/* Home Address Option */
struct ip6_opt_home_address {
/* Followed by sub-options */
};
/* Labeled Security Option */
struct ip6_opt_labeled_security {
/* Followed by sub-options */
};
#define IP6LS_DOI_V4 0 /* IPv4 transition */
#ifdef __cplusplus
}
#endif
#endif /* _NETINET_IP6_H */