Watt-32 tcp/ip  2.2 dev-rel.10
in6_pcb.h
Go to the documentation of this file.
1 
5 /* $FreeBSD: src/sys/netinet6/in6_pcb.h,v 1.8 2002/06/14 08:35:21 hsu Exp $ */
6 /* $KAME: in6_pcb.h,v 1.13 2001/02/06 09:16:53 itojun Exp $ */
7 
8 /*
9  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  * notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  * notice, this list of conditions and the following disclaimer in the
19  * documentation and/or other materials provided with the distribution.
20  * 3. Neither the name of the project nor the names of its contributors
21  * may be used to endorse or promote products derived from this software
22  * without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34  * SUCH DAMAGE.
35  *
36  */
37 
38 /*
39  * Copyright (c) 1982, 1986, 1990, 1993
40  * The Regents of the University of California. All rights reserved.
41  *
42  * Redistribution and use in source and binary forms, with or without
43  * modification, are permitted provided that the following conditions
44  * are met:
45  * 1. Redistributions of source code must retain the above copyright
46  * notice, this list of conditions and the following disclaimer.
47  * 2. Redistributions in binary form must reproduce the above copyright
48  * notice, this list of conditions and the following disclaimer in the
49  * documentation and/or other materials provided with the distribution.
50  * 3. All advertising materials mentioning features or use of this software
51  * must display the following acknowledgement:
52  * This product includes software developed by the University of
53  * California, Berkeley and its contributors.
54  * 4. Neither the name of the University nor the names of its contributors
55  * may be used to endorse or promote products derived from this software
56  * without specific prior written permission.
57  *
58  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
59  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
61  * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
62  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
63  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
64  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
65  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
66  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
67  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68  * SUCH DAMAGE.
69  *
70  * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
71  */
72 
73 #ifndef _NETINET6_IN6_PCB_H_
74 #define _NETINET6_IN6_PCB_H_
75 
76 #ifdef _KERNEL
77 
78 #ifndef __SYS_MBUF_H
79 #include <sys/mbuf.h>
80 #endif
81 
82 #define satosin6(sa) ((struct sockaddr_in6 *)(sa))
83 #define sin6tosa(sin6) ((struct sockaddr *)(sin6))
84 #define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa))
85 
86 void in6_pcbpurgeif0 __P((struct in6pcb *, struct ifnet *));
87 void in6_losing __P((struct inpcb *));
88 int in6_pcballoc __P((struct socket *, struct inpcbinfo *, struct thread *));
89 int in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct thread *));
90 int in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct thread *));
91 void in6_pcbdetach __P((struct inpcb *));
92 void in6_pcbdisconnect __P((struct inpcb *));
93 int in6_pcbladdr __P((struct inpcb *, struct sockaddr *,
94  struct in6_addr **));
95 struct inpcb *
96  in6_pcblookup_local __P((struct inpcbinfo *,
97  struct in6_addr *, u_int, int));
98 struct inpcb *
99  in6_pcblookup_hash __P((struct inpcbinfo *,
100  struct in6_addr *, u_int, struct in6_addr *,
101  u_int, int, struct ifnet *));
102 void in6_pcbnotify __P((struct inpcbhead *, struct sockaddr *,
103  u_int, const struct sockaddr *, u_int, int,
104  struct inpcb *(*)(struct inpcb *, int)));
105 struct inpcb *
106  in6_rtchange __P((struct inpcb *, int));
107 int in6_setpeeraddr __P((struct socket *so, struct sockaddr **nam));
108 int in6_setsockaddr __P((struct socket *so, struct sockaddr **nam));
109 int in6_mapped_sockaddr __P((struct socket *so, struct sockaddr **nam));
110 int in6_mapped_peeraddr __P((struct socket *so, struct sockaddr **nam));
111 struct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *,
112  struct ip6_pktopts *,
113  struct ip6_moptions *,
114  struct route_in6 *,
115  struct in6_addr *, int *));
116 int in6_selecthlim __P((struct in6pcb *, struct ifnet *));
117 int in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct thread *));
118 void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m));
119 #endif /* _KERNEL */
120 
121 #endif /* !_NETINET6_IN6_PCB_H_ */
Definition: if.h:84
Definition: in_pcb.h:61
Definition: in.h:153
Definition: if.h:130
Definition: mbuf.h:6
Definition: in6.h:395