Subversion Repositories SvarDOS

Rev

Rev 616 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
207 mateuszvis 1
/*!\file netinet6/in6_pcb.h
2
 *
3
 */
4
 
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
#define	satosin6(sa)	((struct sockaddr_in6 *)(sa))
78
#define	sin6tosa(sin6)	((struct sockaddr *)(sin6))
79
#define	ifatoia6(ifa)	((struct in6_ifaddr *)(ifa))
80
 
81
void	in6_pcbpurgeif0 __P((struct in6pcb *, struct ifnet *));
82
void	in6_losing __P((struct inpcb *));
83
int	in6_pcballoc __P((struct socket *, struct inpcbinfo *, struct thread *));
84
int	in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct thread *));
85
int	in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct thread *));
86
void	in6_pcbdetach __P((struct inpcb *));
87
void	in6_pcbdisconnect __P((struct inpcb *));
88
int	in6_pcbladdr __P((struct inpcb *, struct sockaddr *,
89
			  struct in6_addr **));
90
struct	inpcb *
91
	in6_pcblookup_local __P((struct inpcbinfo *,
92
				 struct in6_addr *, u_int, int));
93
struct	inpcb *
94
	in6_pcblookup_hash __P((struct inpcbinfo *,
95
				struct in6_addr *, u_int, struct in6_addr *,
96
				u_int, int, struct ifnet *));
97
void	in6_pcbnotify __P((struct inpcbhead *, struct sockaddr *,
98
			   u_int, const struct sockaddr *, u_int, int,
99
			   struct inpcb *(*)(struct inpcb *, int)));
100
struct inpcb *
101
	in6_rtchange __P((struct inpcb *, int));
102
int	in6_setpeeraddr __P((struct socket *so, struct sockaddr **nam));
103
int	in6_setsockaddr __P((struct socket *so, struct sockaddr **nam));
104
int	in6_mapped_sockaddr __P((struct socket *so, struct sockaddr **nam));
105
int	in6_mapped_peeraddr __P((struct socket *so, struct sockaddr **nam));
106
struct	in6_addr *in6_selectsrc __P((struct sockaddr_in6 *,
107
				     struct ip6_pktopts *,
108
				     struct ip6_moptions *,
109
				     struct route_in6 *,
110
				     struct in6_addr *, int *));
111
int	in6_selecthlim __P((struct in6pcb *, struct ifnet *));
112
int	in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct thread *));
113
void	init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m));
114
#endif /* _KERNEL */
115
 
116
#endif /* !_NETINET6_IN6_PCB_H_ */