📄 ip6_var.h
字号:
/* ip6_var.h - IPv6 internal structures and definitions *//* * Copyright (c) 2001-2005 Wind River Systems, Inc. * * The right to copy, distribute, modify or otherwise make use * of this software may be licensed only pursuant to the terms * of an applicable Wind River license agreement. *//* $KAME: ip6_var.h,v 1.130 2005/03/18 10:23:05 suz Exp $ *//* $KAME: ip6_var.h,v 1.127 2004/06/02 05:53:15 itojun Exp $ *//* $FreeBSD: src/sys/netinet6/ip6_var.h,v 1.2.2.3 2002/08/08 16:44:57 ume Exp $ *//* $KAME: ip6_var.h,v 1.62 2001/05/03 14:51:48 itojun Exp $ *//* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *//* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)ip_var.h 8.1 (Berkeley) 6/10/93 *//*modification history--------------------01n,10may05,kch Merged from Kame v 1.130.01m,28apr05,kch Virtualization changes.01l,19apr05,rp merged from comp_wn_ipv6_mld_interim-dev01k,07feb05,vvv _KERNEL cleanup01j,31jan05,niq virtual stack changes01i,02feb04,pas added queue.h for LIST_HEAD01h,20nov03,niq Remove copyright_wrs.h file inclusion01g,05nov03,cdw Removal of unnecessary _KERNEL guards.01f,04nov03,rlm Ran batch header path update for header re-org.01e,03nov03,rlm Removed wrn/coreip/ prefix from #includes for header re-org.01d,13aug03,nee Merging from label ACCORDION_BASE6_MERGE_BASELINE in accordion codeline to Base601c,10jun03,vvv include netVersion.h01b,01feb03,pas merge from FreeBSD 4.7 - removed ip6_mapped_addr_on*/#ifndef _NETINET6_IP6_VAR_H_#define _NETINET6_IP6_VAR_H_#ifdef __cplusplusextern "C" {#endif #include <netVersion.h>#include <netinet6/ip6.h>#include <sys/queue.h>/* * IP6 reassembly queue structure. Each fragment * being reassembled is attached to one of these structures. */struct ip6q { u_int32_t ip6q_head; u_int16_t ip6q_len; u_int8_t ip6q_nxt; /* ip6f_nxt in first fragment */ u_int8_t ip6q_hlim; struct ip6asfrag *ip6q_down; struct ip6asfrag *ip6q_up; u_int32_t ip6q_ident; u_int8_t ip6q_arrive; u_int8_t ip6q_ttl; struct in6_addr ip6q_src, ip6q_dst; struct ip6q *ip6q_next; struct ip6q *ip6q_prev; int ip6q_unfrglen; /* len of unfragmentable part */#ifdef notyet u_char *ip6q_nxtp;#endif int ip6q_nfrag; /* # of fragments */};struct ip6asfrag { u_int32_t ip6af_head; u_int16_t ip6af_len; u_int8_t ip6af_nxt; u_int8_t ip6af_hlim; /* must not override the above members during reassembling */ struct ip6asfrag *ip6af_down; struct ip6asfrag *ip6af_up; struct mbuf *ip6af_m; int ip6af_offset; /* offset in ip6af_m to next header */ int ip6af_frglen; /* fragmentable part length */ int ip6af_off; /* fragment offset */ u_int16_t ip6af_mff; /* more fragment bit in frag off */};#define IP6_REASS_MBUF(ip6af) (*(struct mbuf **)&((ip6af)->ip6af_m))struct ip6_moptions { struct ifnet *im6o_multicast_ifp; /* ifp for outgoing multicasts */ u_char im6o_multicast_hlim; /* hoplimit for outgoing multicasts */ u_char im6o_multicast_loop; /* 1 >= hear sends if a member */ LIST_HEAD(, in6_multi_mship) im6o_memberships;};/* * Control options for outgoing packets *//* Routing header related info */struct ip6po_rhinfo { struct ip6_rthdr *ip6po_rhi_rthdr; /* Routing header */ struct route_in6 ip6po_rhi_route; /* Route to the 1st hop */};#define ip6po_rthdr ip6po_rhinfo.ip6po_rhi_rthdr#define ip6po_route ip6po_rhinfo.ip6po_rhi_route#define ip6po_rthdr2 ip6po_rhinfo2.ip6po_rhi_rthdr#define ip6po_route2 ip6po_rhinfo2.ip6po_rhi_route/* Nexthop related info */struct ip6po_nhinfo { struct sockaddr *ip6po_nhi_nexthop; struct route_in6 ip6po_nhi_route; /* Route to the nexthop */};#define ip6po_nexthop ip6po_nhinfo.ip6po_nhi_nexthop#define ip6po_nextroute ip6po_nhinfo.ip6po_nhi_routestruct ip6_pktopts { int ip6po_hlim; /* Hoplimit for outgoing packets */ /* Outgoing IF/address information */ struct in6_pktinfo *ip6po_pktinfo; /* Next-hop address information */ struct ip6po_nhinfo ip6po_nhinfo; struct ip6_hbh *ip6po_hbh; /* Hop-by-Hop options header */ /* Destination options header (before a routing header) */ struct ip6_dest *ip6po_dest1; /* Routing header related info. */ struct ip6po_rhinfo ip6po_rhinfo;#ifdef MIP6 /* Mobile IPv6 type 2 Routing header. */ struct ip6po_rhinfo ip6po_rhinfo2; /* Home Address Destination option */ struct ip6_dest *ip6po_hoa;#endif /* MIP6 */ /* Destination options header (after a routing header) */ struct ip6_dest *ip6po_dest2; int ip6po_tclass; /* traffic class */ int ip6po_minmtu; /* fragment vs PMTU discovery policy */#define IP6PO_MINMTU_MCASTONLY -1 /* default; send at min MTU for multicast*/#define IP6PO_MINMTU_DISABLE 0 /* always perform pmtu disc */#define IP6PO_MINMTU_ALL 1 /* always send at min MTU */ int ip6po_prefer_tempaddr; /* whether temporary addresses are preferred as source address */#define IP6PO_TEMPADDR_SYSTEM -1 /* follow the system default */#define IP6PO_TEMPADDR_NOTPREFER 0 /* not prefer temporary address */#define IP6PO_TEMPADDR_PREFER 1 /* prefer temporary address */ int ip6po_flags;#if 0 /* parameters in this block is obsolete. do not reuse the values. */#define IP6PO_REACHCONF 0x01 /* upper-layer reachability confirmation. */#define IP6PO_MINMTU 0x02 /* use minimum MTU (IPV6_USE_MIN_MTU) */#endif#define IP6PO_DONTFRAG 0x04 /* disable fragmentation (IPV6_DONTFRAG) */#define IP6PO_USECOA 0x08 /* use care of address */#define IP6PO_NOTUSEBCE 0x10 /* Don't use */};/* * Control options for incoming packets */struct ip6stat { u_quad_t ip6s_total; /* total packets received */ u_quad_t ip6s_tooshort; /* packet too short */ u_quad_t ip6s_toosmall; /* not enough data */ u_quad_t ip6s_fragments; /* fragments received */ u_quad_t ip6s_fragdropped; /* frags dropped(dups, out of space) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -