12b54eeaimp/*-
24736ccfpfg * SPDX-License-Identifier: BSD-3-Clause
34736ccfpfg *
4cad2014shin * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5cad2014shin * All rights reserved.
6cad2014shin *
7cad2014shin * Redistribution and use in source and binary forms, with or without
8cad2014shin * modification, are permitted provided that the following conditions
9cad2014shin * are met:
10cad2014shin * 1. Redistributions of source code must retain the above copyright
11cad2014shin *    notice, this list of conditions and the following disclaimer.
12cad2014shin * 2. Redistributions in binary form must reproduce the above copyright
13cad2014shin *    notice, this list of conditions and the following disclaimer in the
14cad2014shin *    documentation and/or other materials provided with the distribution.
15cad2014shin * 3. Neither the name of the project nor the names of its contributors
16cad2014shin *    may be used to endorse or promote products derived from this software
17cad2014shin *    without specific prior written permission.
18cad2014shin *
19cad2014shin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20cad2014shin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21cad2014shin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22cad2014shin * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23cad2014shin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24cad2014shin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25cad2014shin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26cad2014shin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27cad2014shin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28cad2014shin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29cad2014shin * SUCH DAMAGE.
30cad2014shin *
310d684d9obrien *	$KAME: ip6protosw.h,v 1.25 2001/09/26 06:13:03 keiichi Exp $
32cad2014shin */
33cad2014shin
34cad2014shin/*-
35cad2014shin * Copyright (c) 1982, 1986, 1993
36cad2014shin *	The Regents of the University of California.  All rights reserved.
37cad2014shin *
38cad2014shin * Redistribution and use in source and binary forms, with or without
39cad2014shin * modification, are permitted provided that the following conditions
40cad2014shin * are met:
41cad2014shin * 1. Redistributions of source code must retain the above copyright
42cad2014shin *    notice, this list of conditions and the following disclaimer.
43cad2014shin * 2. Redistributions in binary form must reproduce the above copyright
44cad2014shin *    notice, this list of conditions and the following disclaimer in the
45cad2014shin *    documentation and/or other materials provided with the distribution.
467e6cabdimp * 3. Neither the name of the University nor the names of its contributors
47cad2014shin *    may be used to endorse or promote products derived from this software
48cad2014shin *    without specific prior written permission.
49cad2014shin *
50cad2014shin * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
51cad2014shin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
52cad2014shin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
53cad2014shin * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
54cad2014shin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
55cad2014shin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
56cad2014shin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
57cad2014shin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
58cad2014shin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
59cad2014shin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
60cad2014shin * SUCH DAMAGE.
61cad2014shin *
62cad2014shin *	@(#)protosw.h	8.1 (Berkeley) 6/2/93
630d684d9obrien *	BSDI protosw.h,v 2.3 1996/10/11 16:02:40 pjd Exp
640d684d9obrien * $FreeBSD$
65cad2014shin */
66cad2014shin
67cad2014shin#ifndef _NETINET6_IP6PROTOSW_H_
68cad2014shin#define _NETINET6_IP6PROTOSW_H_
69cad2014shin
70cad2014shin/*
71cad2014shin * Protocol switch table for IPv6.
72cad2014shin * All other definitions should refer to sys/protosw.h
73cad2014shin */
74cad2014shin
755f4e854itojunstruct mbuf;
765f4e854itojunstruct sockaddr;
775f4e854itojunstruct socket;
785f4e854itojunstruct domain;
795596676julianstruct thread;
805f4e854itojunstruct ip6_hdr;
81832f8d2umestruct icmp6_hdr;
82832f8d2umestruct in6_addr;
835f4e854itojunstruct pr_usrreqs;
84cad2014shin
85cad2014shin/*
86cad2014shin * argument type for the last arg of pr_ctlinput().
87cad2014shin * should be consulted only with AF_INET6 family.
88832f8d2ume *
89cb2c154ume * IPv6 ICMP IPv6 [exthdrs] finalhdr payload
90832f8d2ume * ^    ^    ^              ^
91832f8d2ume * |    |    ip6c_ip6       ip6c_off
92832f8d2ume * |    ip6c_icmp6
93832f8d2ume * ip6c_m
94832f8d2ume *
95832f8d2ume * ip6c_finaldst usually points to ip6c_ip6->ip6_dst.  if the original
96832f8d2ume * (internal) packet carries a routing header, it may point the final
97d9c9113pfg * destination address in the routing header.
98832f8d2ume *
99832f8d2ume * ip6c_src: ip6c_ip6->ip6_src + scope info + flowlabel in ip6c_ip6
100832f8d2ume *	(beware of flowlabel, if you try to compare it against others)
101832f8d2ume * ip6c_dst: ip6c_finaldst + scope info
102cad2014shin */
103cad2014shinstruct ip6ctlparam {
1045f4e854itojun	struct mbuf *ip6c_m;		/* start of mbuf chain */
105832f8d2ume	struct icmp6_hdr *ip6c_icmp6;	/* icmp6 header of target packet */
1065f4e854itojun	struct ip6_hdr *ip6c_ip6;	/* ip6 header of target packet */
1075f4e854itojun	int ip6c_off;			/* offset of the target proto header */
108832f8d2ume	struct sockaddr_in6 *ip6c_src;	/* srcaddr w/ additional info */
109832f8d2ume	struct sockaddr_in6 *ip6c_dst;	/* (final) dstaddr w/ additional info */
110832f8d2ume	struct in6_addr *ip6c_finaldst;	/* final destination address */
111832f8d2ume	void *ip6c_cmdarg;		/* control command dependent data */
112832f8d2ume	u_int8_t ip6c_nxt;		/* final next header field */
113cad2014shin};
114cad2014shin
1155d8547edarrenr#ifdef _KERNEL
1167727a3ckevloextern struct protosw inet6sw[];
1175d8547edarrenr#endif
1185d8547edarrenr
119cad2014shin#endif /* !_NETINET6_IP6PROTOSW_H_ */
120