ip6_var.h revision 147744
162587Sitojun/*	$FreeBSD: head/sys/netinet6/ip6_var.h 147744 2005-07-02 23:13:31Z thompsa $	*/
278064Sume/*	$KAME: ip6_var.h,v 1.62 2001/05/03 14:51:48 itojun Exp $	*/
362587Sitojun
4139826Simp/*-
553541Sshin * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
653541Sshin * All rights reserved.
753541Sshin *
853541Sshin * Redistribution and use in source and binary forms, with or without
953541Sshin * modification, are permitted provided that the following conditions
1053541Sshin * are met:
1153541Sshin * 1. Redistributions of source code must retain the above copyright
1253541Sshin *    notice, this list of conditions and the following disclaimer.
1353541Sshin * 2. Redistributions in binary form must reproduce the above copyright
1453541Sshin *    notice, this list of conditions and the following disclaimer in the
1553541Sshin *    documentation and/or other materials provided with the distribution.
1653541Sshin * 3. Neither the name of the project nor the names of its contributors
1753541Sshin *    may be used to endorse or promote products derived from this software
1853541Sshin *    without specific prior written permission.
1953541Sshin *
2053541Sshin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
2153541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2253541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2353541Sshin * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
2453541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2553541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2653541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2753541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2853541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2953541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3053541Sshin * SUCH DAMAGE.
3153541Sshin */
3253541Sshin
33139826Simp/*-
3453541Sshin * Copyright (c) 1982, 1986, 1993
3553541Sshin *	The Regents of the University of California.  All rights reserved.
3653541Sshin *
3753541Sshin * Redistribution and use in source and binary forms, with or without
3853541Sshin * modification, are permitted provided that the following conditions
3953541Sshin * are met:
4053541Sshin * 1. Redistributions of source code must retain the above copyright
4153541Sshin *    notice, this list of conditions and the following disclaimer.
4253541Sshin * 2. Redistributions in binary form must reproduce the above copyright
4353541Sshin *    notice, this list of conditions and the following disclaimer in the
4453541Sshin *    documentation and/or other materials provided with the distribution.
4553541Sshin * 4. Neither the name of the University nor the names of its contributors
4653541Sshin *    may be used to endorse or promote products derived from this software
4753541Sshin *    without specific prior written permission.
4853541Sshin *
4953541Sshin * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5053541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5153541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5253541Sshin * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
5353541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5453541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5553541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5653541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5753541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5853541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5953541Sshin * SUCH DAMAGE.
6053541Sshin *
6153541Sshin *	@(#)ip_var.h	8.1 (Berkeley) 6/10/93
6253541Sshin */
6353541Sshin
6453541Sshin#ifndef _NETINET6_IP6_VAR_H_
6553541Sshin#define _NETINET6_IP6_VAR_H_
6653541Sshin
6753541Sshin/*
6853541Sshin * IP6 reassembly queue structure.  Each fragment
6953541Sshin * being reassembled is attached to one of these structures.
7053541Sshin */
7153541Sshinstruct	ip6q {
7262587Sitojun	u_int32_t	ip6q_head;
7362587Sitojun	u_int16_t	ip6q_len;
7462587Sitojun	u_int8_t	ip6q_nxt;	/* ip6f_nxt in first fragment */
7562587Sitojun	u_int8_t	ip6q_hlim;
7662587Sitojun	struct ip6asfrag *ip6q_down;
7762587Sitojun	struct ip6asfrag *ip6q_up;
7862587Sitojun	u_int32_t	ip6q_ident;
7962587Sitojun	u_int8_t	ip6q_arrive;
8062587Sitojun	u_int8_t	ip6q_ttl;
8162587Sitojun	struct in6_addr	ip6q_src, ip6q_dst;
8262587Sitojun	struct ip6q	*ip6q_next;
8362587Sitojun	struct ip6q	*ip6q_prev;
8462587Sitojun	int		ip6q_unfrglen;	/* len of unfragmentable part */
8562587Sitojun#ifdef notyet
8662587Sitojun	u_char		*ip6q_nxtp;
8762587Sitojun#endif
88121345Sume	int		ip6q_nfrag;	/* # of fragments */
8953541Sshin};
9053541Sshin
9153541Sshinstruct	ip6asfrag {
9262587Sitojun	u_int32_t	ip6af_head;
9362587Sitojun	u_int16_t	ip6af_len;
9462587Sitojun	u_int8_t	ip6af_nxt;
9562587Sitojun	u_int8_t	ip6af_hlim;
9653541Sshin	/* must not override the above members during reassembling */
9762587Sitojun	struct ip6asfrag *ip6af_down;
9862587Sitojun	struct ip6asfrag *ip6af_up;
9962587Sitojun	struct mbuf	*ip6af_m;
10062587Sitojun	int		ip6af_offset;	/* offset in ip6af_m to next header */
10162587Sitojun	int		ip6af_frglen;	/* fragmentable part length */
10262587Sitojun	int		ip6af_off;	/* fragment offset */
10362587Sitojun	u_int16_t	ip6af_mff;	/* more fragment bit in frag off */
10453541Sshin};
10553541Sshin
10653541Sshin#define IP6_REASS_MBUF(ip6af) (*(struct mbuf **)&((ip6af)->ip6af_m))
10753541Sshin
10853541Sshinstruct	ip6_moptions {
10953541Sshin	struct	ifnet *im6o_multicast_ifp; /* ifp for outgoing multicasts */
11053541Sshin	u_char	im6o_multicast_hlim;	/* hoplimit for outgoing multicasts */
11153541Sshin	u_char	im6o_multicast_loop;	/* 1 >= hear sends if a member */
11260938Sjake	LIST_HEAD(, in6_multi_mship) im6o_memberships;
11353541Sshin};
11453541Sshin
11553541Sshin/*
11653541Sshin * Control options for outgoing packets
11753541Sshin */
11853541Sshin
11953541Sshin/* Routing header related info */
12053541Sshinstruct	ip6po_rhinfo {
12153541Sshin	struct	ip6_rthdr *ip6po_rhi_rthdr; /* Routing header */
12253541Sshin	struct	route_in6 ip6po_rhi_route; /* Route to the 1st hop */
12353541Sshin};
12462587Sitojun#define ip6po_rthdr	ip6po_rhinfo.ip6po_rhi_rthdr
12562587Sitojun#define ip6po_route	ip6po_rhinfo.ip6po_rhi_route
12653541Sshin
127121472Sume/* Nexthop related info */
128121472Sumestruct	ip6po_nhinfo {
129121472Sume	struct	sockaddr *ip6po_nhi_nexthop;
130121472Sume	struct	route_in6 ip6po_nhi_route; /* Route to the nexthop */
131121472Sume};
132121472Sume#define ip6po_nexthop	ip6po_nhinfo.ip6po_nhi_nexthop
133121472Sume#define ip6po_nextroute	ip6po_nhinfo.ip6po_nhi_route
134121472Sume
13553541Sshinstruct	ip6_pktopts {
13653541Sshin	struct	mbuf *ip6po_m;	/* Pointer to mbuf storing the data */
13778064Sume	int	ip6po_hlim;	/* Hoplimit for outgoing packets */
13878064Sume
13978064Sume	/* Outgoing IF/address information */
14078064Sume	struct	in6_pktinfo *ip6po_pktinfo;
14178064Sume
142121472Sume	/* Next-hop address information */
143121472Sume	struct	ip6po_nhinfo ip6po_nhinfo;
144121472Sume
14553541Sshin	struct	ip6_hbh *ip6po_hbh; /* Hop-by-Hop options header */
14678064Sume
14778064Sume	/* Destination options header (before a routing header) */
14878064Sume	struct	ip6_dest *ip6po_dest1;
14978064Sume
15078064Sume	/* Routing header related info. */
15178064Sume	struct	ip6po_rhinfo ip6po_rhinfo;
15278064Sume
15378064Sume	/* Destination options header (after a routing header) */
15478064Sume	struct	ip6_dest *ip6po_dest2;
155121472Sume
156121472Sume	int	ip6po_tclass;	/* traffic class */
157121472Sume
158121472Sume	int	ip6po_minmtu;  /* fragment vs PMTU discovery policy */
159121472Sume#define IP6PO_MINMTU_MCASTONLY	-1 /* default; send at min MTU for multicast*/
160121472Sume#define IP6PO_MINMTU_DISABLE	 0 /* always perform pmtu disc */
161121472Sume#define IP6PO_MINMTU_ALL	 1 /* always send at min MTU */
162121472Sume
163121472Sume	int	ip6po_prefer_tempaddr;  /* whether temporary addresses are
164121472Sume					   preferred as source address */
165121472Sume#define IP6PO_TEMPADDR_SYSTEM	-1 /* follow the system default */
166121472Sume#define IP6PO_TEMPADDR_NOTPREFER 0 /* not prefer temporary address */
167121472Sume#define IP6PO_TEMPADDR_PREFER	 1 /* prefer temporary address */
168121472Sume
169121472Sume	int ip6po_flags;
170121472Sume#if 0	/* parameters in this block is obsolete. do not reuse the values. */
171121472Sume#define IP6PO_REACHCONF	0x01	/* upper-layer reachability confirmation. */
172121472Sume#define IP6PO_MINMTU	0x02	/* use minimum MTU (IPV6_USE_MIN_MTU) */
173121472Sume#endif
174121472Sume#define IP6PO_DONTFRAG	0x04	/* disable fragmentation (IPV6_DONTFRAG) */
175121472Sume#define IP6PO_USECOA	0x08	/* use care of address */
176121472Sume
177121472Sume	int	needfree;	/* members dynamically allocated */
17853541Sshin};
17953541Sshin
18078064Sume/*
18178064Sume * Control options for incoming packets
18278064Sume */
18378064Sume
18453541Sshinstruct	ip6stat {
18562587Sitojun	u_quad_t ip6s_total;		/* total packets received */
18662587Sitojun	u_quad_t ip6s_tooshort;		/* packet too short */
18762587Sitojun	u_quad_t ip6s_toosmall;		/* not enough data */
18862587Sitojun	u_quad_t ip6s_fragments;	/* fragments received */
18962587Sitojun	u_quad_t ip6s_fragdropped;	/* frags dropped(dups, out of space) */
19062587Sitojun	u_quad_t ip6s_fragtimeout;	/* fragments timed out */
19162587Sitojun	u_quad_t ip6s_fragoverflow;	/* fragments that exceeded limit */
19262587Sitojun	u_quad_t ip6s_forward;		/* packets forwarded */
19362587Sitojun	u_quad_t ip6s_cantforward;	/* packets rcvd for unreachable dest */
19462587Sitojun	u_quad_t ip6s_redirectsent;	/* packets forwarded on same net */
19562587Sitojun	u_quad_t ip6s_delivered;	/* datagrams delivered to upper level*/
19662587Sitojun	u_quad_t ip6s_localout;		/* total ip packets generated here */
19762587Sitojun	u_quad_t ip6s_odropped;		/* lost packets due to nobufs, etc. */
19862587Sitojun	u_quad_t ip6s_reassembled;	/* total packets reassembled ok */
199120913Sume	u_quad_t ip6s_fragmented;	/* datagrams successfully fragmented */
20062587Sitojun	u_quad_t ip6s_ofragments;	/* output fragments created */
20162587Sitojun	u_quad_t ip6s_cantfrag;		/* don't fragment flag was set, etc. */
20262587Sitojun	u_quad_t ip6s_badoptions;	/* error in option processing */
20362587Sitojun	u_quad_t ip6s_noroute;		/* packets discarded due to no route */
20462587Sitojun	u_quad_t ip6s_badvers;		/* ip6 version != 6 */
20562587Sitojun	u_quad_t ip6s_rawout;		/* total raw ip packets generated */
20662587Sitojun	u_quad_t ip6s_badscope;		/* scope error */
20762587Sitojun	u_quad_t ip6s_notmember;	/* don't join this multicast group */
20862587Sitojun	u_quad_t ip6s_nxthist[256];	/* next header history */
20962587Sitojun	u_quad_t ip6s_m1;		/* one mbuf */
21062587Sitojun	u_quad_t ip6s_m2m[32];		/* two or more mbuf */
21162587Sitojun	u_quad_t ip6s_mext1;		/* one ext mbuf */
21262587Sitojun	u_quad_t ip6s_mext2m;		/* two or more ext mbuf */
21362587Sitojun	u_quad_t ip6s_exthdrtoolong;	/* ext hdr are not continuous */
21462587Sitojun	u_quad_t ip6s_nogif;		/* no match gif found */
21562587Sitojun	u_quad_t ip6s_toomanyhdr;	/* discarded due to too many headers */
21662587Sitojun
21762587Sitojun	/*
21862587Sitojun	 * statistics for improvement of the source address selection
21962587Sitojun	 * algorithm:
22062587Sitojun	 * XXX: hardcoded 16 = # of ip6 multicast scope types + 1
22162587Sitojun	 */
22262587Sitojun	/* number of times that address selection fails */
22362587Sitojun	u_quad_t ip6s_sources_none;
22462587Sitojun	/* number of times that an address on the outgoing I/F is chosen */
22562587Sitojun	u_quad_t ip6s_sources_sameif[16];
22662587Sitojun	/* number of times that an address on a non-outgoing I/F is chosen */
22762587Sitojun	u_quad_t ip6s_sources_otherif[16];
22862587Sitojun	/*
22962587Sitojun	 * number of times that an address that has the same scope
23062587Sitojun	 * from the destination is chosen.
23162587Sitojun	 */
23262587Sitojun	u_quad_t ip6s_sources_samescope[16];
23362587Sitojun	/*
23462587Sitojun	 * number of times that an address that has a different scope
23562587Sitojun	 * from the destination is chosen.
23662587Sitojun	 */
23762587Sitojun	u_quad_t ip6s_sources_otherscope[16];
238108470Sschweikh	/* number of times that a deprecated address is chosen */
23962587Sitojun	u_quad_t ip6s_sources_deprecated[16];
24062587Sitojun
24162587Sitojun	u_quad_t ip6s_forward_cachehit;
24262587Sitojun	u_quad_t ip6s_forward_cachemiss;
243122077Sume
244122077Sume	/* number of times that each rule of source selection is applied. */
245122077Sume	u_quad_t ip6s_sources_rule[16];
24653541Sshin};
24753541Sshin
24853541Sshin#ifdef _KERNEL
24978064Sume/*
25078064Sume * IPv6 onion peeling state.
25178064Sume * it will be initialized when we come into ip6_input().
25278064Sume * XXX do not make it a kitchen sink!
25378064Sume */
25478064Sumestruct ip6aux {
25578064Sume	u_int32_t ip6a_flags;
25678064Sume#define IP6A_SWAP	0x01		/* swapped home/care-of on packet */
25778064Sume#define IP6A_HASEEN	0x02		/* HA was present */
25878064Sume#define IP6A_BRUID	0x04		/* BR Unique Identifier was present */
25978064Sume#define IP6A_RTALERTSEEN 0x08		/* rtalert present */
26078064Sume
26178064Sume	/* ip6.ip6_src */
26278064Sume	struct in6_addr ip6a_careof;	/* care-of address of the peer */
26378064Sume	struct in6_addr ip6a_home;	/* home address of the peer */
26478064Sume	u_int16_t	ip6a_bruid;	/* BR unique identifier */
26578064Sume
26678064Sume	/* ip6.ip6_dst */
26778064Sume	struct in6_ifaddr *ip6a_dstia6;	/* my ifaddr that matches ip6_dst */
26878064Sume
26978064Sume	/* rtalert */
27078064Sume	u_int16_t ip6a_rtalert;		/* rtalert option value */
27178064Sume
27278064Sume	/*
27378064Sume	 * decapsulation history will be here.
27478064Sume	 * with IPsec it may not be accurate.
27578064Sume	 */
27678064Sume};
27778064Sume#endif
27878064Sume
27978064Sume#ifdef _KERNEL
28053541Sshin/* flags passed to ip6_output as last parameter */
28153541Sshin#define	IPV6_DADOUTPUT		0x01	/* DAD */
28253541Sshin#define	IPV6_FORWARDING		0x02	/* most of IPv6 header exists */
28362587Sitojun#define	IPV6_MINMTU		0x04	/* use minimum MTU (IPV6_USE_MIN_MTU) */
28453541Sshin
285147744Sthompsa#ifdef __NO_STRICT_ALIGNMENT
286147744Sthompsa#define IP6_HDR_ALIGNED_P(ip)	1
287147744Sthompsa#else
288147744Sthompsa#define IP6_HDR_ALIGNED_P(ip)	((((intptr_t) (ip)) & 3) == 0)
289147744Sthompsa#endif
290147744Sthompsa
29153541Sshinextern struct	ip6stat ip6stat;	/* statistics */
29253541Sshinextern int	ip6_defhlim;		/* default hop limit */
29353541Sshinextern int	ip6_defmcasthlim;	/* default multicast hop limit */
29453541Sshinextern int	ip6_forwarding;		/* act as router? */
29553541Sshinextern int	ip6_forward_srcrt;	/* forward src-routed? */
29653541Sshinextern int	ip6_gif_hlim;		/* Hop limit for gif encap packet */
29753541Sshinextern int	ip6_use_deprecated;	/* allow deprecated addr as source */
29853541Sshinextern int	ip6_rr_prune;		/* router renumbering prefix
29953541Sshin					 * walk list every 5 sec.    */
30078064Sumeextern int	ip6_v6only;
30153541Sshin
30262587Sitojunextern struct socket *ip6_mrouter; 	/* multicast routing daemon */
30353541Sshinextern int	ip6_sendredirects;	/* send IP redirects when forwarding? */
30453541Sshinextern int	ip6_maxfragpackets; /* Maximum packets in reassembly queue */
305121345Sumeextern int	ip6_maxfrags;	/* Maximum fragments in reassembly queue */
30653541Sshinextern int	ip6_sourcecheck;	/* Verify source interface */
30753541Sshinextern int	ip6_sourcecheck_interval; /* Interval between log messages */
30853541Sshinextern int	ip6_accept_rtadv;	/* Acts as a host not a router */
30953541Sshinextern int	ip6_keepfaith;		/* Firewall Aided Internet Translator */
31053541Sshinextern int	ip6_log_interval;
31153541Sshinextern time_t	ip6_log_time;
31253541Sshinextern int	ip6_hdrnestlimit; /* upper limit of # of extension headers */
31353541Sshinextern int	ip6_dad_count;		/* DupAddrDetectionTransmits */
31453541Sshin
31562587Sitojunextern int ip6_auto_flowlabel;
31678064Sumeextern int ip6_auto_linklocal;
31753541Sshin
31878064Sumeextern int   ip6_anonportmin;		/* minimum ephemeral port */
31978064Sumeextern int   ip6_anonportmax;		/* maximum ephemeral port */
32078064Sumeextern int   ip6_lowportmin;		/* minimum reserved port */
32178064Sumeextern int   ip6_lowportmax;		/* maximum reserved port */
32278064Sume
32378064Sumeextern int	ip6_use_tempaddr; /* whether to use temporary addresses. */
324122077Sumeextern int	ip6_prefer_tempaddr; /* whether to prefer temporary addresses
325122077Sume					in the source address selection */
32678064Sume
327134383Sandreextern	struct pfil_head inet6_pfil_hook;	/* packet filter hooks */
328120386Ssam
32953541Sshinextern struct	pr_usrreqs rip6_usrreqs;
33062587Sitojunstruct sockopt;
33153541Sshin
33262587Sitojunstruct inpcb;
33362587Sitojun
33453541Sshinint	icmp6_ctloutput __P((struct socket *, struct sockopt *sopt));
33553541Sshin
33678064Sumestruct in6_ifaddr;
33753541Sshinvoid	ip6_init __P((void));
33853541Sshinvoid	ip6_input __P((struct mbuf *));
33978064Sumestruct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *));
34078064Sumevoid	ip6_freepcbopts __P((struct ip6_pktopts *));
34153541Sshinvoid	ip6_freemoptions __P((struct ip6_moptions *));
34253541Sshinint	ip6_unknown_opt __P((u_int8_t *, struct mbuf *, int));
34353541Sshinchar *	ip6_get_prevhdr __P((struct mbuf *, int));
34462587Sitojunint	ip6_nexthdr __P((struct mbuf *, int, int, int *));
34562587Sitojunint	ip6_lasthdr __P((struct mbuf *, int, int, int *));
34678064Sume
347121673Sumestruct ip6aux *ip6_addaux __P((struct mbuf *));
348121673Sumestruct ip6aux *ip6_findaux __P((struct mbuf *));
34978064Sumevoid	ip6_delaux __P((struct mbuf *));
35078064Sume
35153541Sshinint	ip6_mforward __P((struct ip6_hdr *, struct ifnet *, struct mbuf *));
35253541Sshinint	ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *,
35353541Sshin				 u_int32_t *));
354121674Sumevoid	ip6_savecontrol __P((struct inpcb *, struct mbuf *, struct mbuf **));
35578064Sumevoid	ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *,
35678064Sume			     u_int32_t *));
35753541Sshinint	ip6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
35853541Sshin
35953541Sshinvoid	ip6_forward __P((struct mbuf *, int));
36053541Sshin
36153541Sshinvoid	ip6_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in6 *));
36253541Sshinint	ip6_output __P((struct mbuf *, struct ip6_pktopts *,
36378064Sume			struct route_in6 *,
36478064Sume			int,
365105194Ssam			struct ip6_moptions *, struct ifnet **,
366105194Ssam			struct inpcb *));
367120913Sumeint	ip6_ctloutput __P((struct socket *, struct sockopt *));
368121578Sumeint	ip6_raw_ctloutput __P((struct socket *, struct sockopt *));
36978064Sumevoid	init_ip6pktopts __P((struct ip6_pktopts *));
370121472Sumeint	ip6_setpktoptions __P((struct mbuf *, struct ip6_pktopts *,
371121472Sume			       struct ip6_pktopts *, int, int, int));
372121472Sumevoid	ip6_clearpktopts __P((struct ip6_pktopts *, int));
37362587Sitojunstruct ip6_pktopts *ip6_copypktopts __P((struct ip6_pktopts *, int));
37453541Sshinint	ip6_optlen __P((struct inpcb *));
37553541Sshin
37653541Sshinint	route6_input __P((struct mbuf **, int *, int));
37753541Sshin
37853541Sshinvoid	frag6_init __P((void));
37953541Sshinint	frag6_input __P((struct mbuf **, int *, int));
38053541Sshinvoid	frag6_slowtimo __P((void));
38153541Sshinvoid	frag6_drain __P((void));
38253541Sshin
38353541Sshinvoid	rip6_init __P((void));
384120913Sumeint	rip6_input __P((struct mbuf **, int *, int));
38562587Sitojunvoid	rip6_ctlinput __P((int, struct sockaddr *, void *));
386120913Sumeint	rip6_ctloutput __P((struct socket *, struct sockopt *));
38753541Sshinint	rip6_output __P((struct mbuf *, ...));
38853541Sshinint	rip6_usrreq __P((struct socket *,
38983366Sjulian	    int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *));
39053541Sshin
39153541Sshinint	dest6_input __P((struct mbuf **, int *, int));
39253541Sshinint	none_input __P((struct mbuf **, int *, int));
393120639Sume
394122077Sumestruct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *,
395122077Sume	struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *,
396122077Sume	struct in6_addr *, int *));
397122077Sumeint in6_selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *,
398122077Sume	struct ip6_moptions *, struct route_in6 *, struct ifnet **,
399122077Sume	struct rtentry **, int));
400120639Sumeu_int32_t ip6_randomid __P((void));
401120649Sumeu_int32_t ip6_randomflowlabel __P((void));
40253541Sshin#endif /* _KERNEL */
40353541Sshin
40453541Sshin#endif /* !_NETINET6_IP6_VAR_H_ */
405