in6_pcb.h revision 180427
1139826Simp/*- 253541Sshin * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 353541Sshin * All rights reserved. 453541Sshin * 553541Sshin * Redistribution and use in source and binary forms, with or without 653541Sshin * modification, are permitted provided that the following conditions 753541Sshin * are met: 853541Sshin * 1. Redistributions of source code must retain the above copyright 953541Sshin * notice, this list of conditions and the following disclaimer. 1053541Sshin * 2. Redistributions in binary form must reproduce the above copyright 1153541Sshin * notice, this list of conditions and the following disclaimer in the 1253541Sshin * documentation and/or other materials provided with the distribution. 1353541Sshin * 3. Neither the name of the project nor the names of its contributors 1453541Sshin * may be used to endorse or promote products derived from this software 1553541Sshin * without specific prior written permission. 1653541Sshin * 1753541Sshin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 1853541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1953541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2053541Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2153541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2253541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2353541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2453541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2553541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2653541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2753541Sshin * SUCH DAMAGE. 2853541Sshin * 29174510Sobrien * $KAME: in6_pcb.h,v 1.13 2001/02/06 09:16:53 itojun Exp $ 3053541Sshin */ 3153541Sshin 32139826Simp/*- 3353541Sshin * Copyright (c) 1982, 1986, 1990, 1993 3453541Sshin * The Regents of the University of California. All rights reserved. 3553541Sshin * 3653541Sshin * Redistribution and use in source and binary forms, with or without 3753541Sshin * modification, are permitted provided that the following conditions 3853541Sshin * are met: 3953541Sshin * 1. Redistributions of source code must retain the above copyright 4053541Sshin * notice, this list of conditions and the following disclaimer. 4153541Sshin * 2. Redistributions in binary form must reproduce the above copyright 4253541Sshin * notice, this list of conditions and the following disclaimer in the 4353541Sshin * documentation and/or other materials provided with the distribution. 4453541Sshin * 4. Neither the name of the University nor the names of its contributors 4553541Sshin * may be used to endorse or promote products derived from this software 4653541Sshin * without specific prior written permission. 4753541Sshin * 4853541Sshin * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 4953541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 5053541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 5153541Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 5253541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 5353541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 5453541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 5553541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 5653541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 5753541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 5853541Sshin * SUCH DAMAGE. 5953541Sshin * 6053541Sshin * @(#)in_pcb.h 8.1 (Berkeley) 6/10/93 61174510Sobrien * $FreeBSD: head/sys/netinet6/in6_pcb.h 180427 2008-07-10 13:31:11Z bz $ 6253541Sshin */ 6353541Sshin 6453541Sshin#ifndef _NETINET6_IN6_PCB_H_ 6553541Sshin#define _NETINET6_IN6_PCB_H_ 6653541Sshin 6755205Speter#ifdef _KERNEL 6853541Sshin#define satosin6(sa) ((struct sockaddr_in6 *)(sa)) 6953541Sshin#define sin6tosa(sin6) ((struct sockaddr *)(sin6)) 7053541Sshin#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa)) 7153541Sshin 72157978Srwatsonvoid in6_pcbpurgeif0 __P((struct inpcbinfo *, struct ifnet *)); 7353541Sshinvoid in6_losing __P((struct inpcb *)); 74127505Spjdint in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct ucred *)); 75127505Spjdint in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct ucred *)); 7653541Sshinvoid in6_pcbdetach __P((struct inpcb *)); 7753541Sshinvoid in6_pcbdisconnect __P((struct inpcb *)); 78157373Srwatsonvoid in6_pcbfree __P((struct inpcb *)); 7953541Sshinint in6_pcbladdr __P((struct inpcb *, struct sockaddr *, 8053541Sshin struct in6_addr **)); 8153541Sshinstruct inpcb * 8253541Sshin in6_pcblookup_local __P((struct inpcbinfo *, 83180427Sbz struct in6_addr *, u_short, int, 84180427Sbz struct ucred *)); 8553541Sshinstruct inpcb * 8653541Sshin in6_pcblookup_hash __P((struct inpcbinfo *, 8753541Sshin struct in6_addr *, u_int, struct in6_addr *, 8853541Sshin u_int, int, struct ifnet *)); 89133192Srwatsonvoid in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr *, 90125776Sume u_int, const struct sockaddr *, u_int, int, void *, 9198211Shsu struct inpcb *(*)(struct inpcb *, int))); 9298211Shsustruct inpcb * 9398211Shsu in6_rtchange __P((struct inpcb *, int)); 94102218Struckmanstruct sockaddr * 95102218Struckman in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p)); 96102218Struckmanstruct sockaddr * 97102218Struckman in6_v4mapsin6_sockaddr __P((in_port_t port, struct in_addr *addr_p)); 98169462Srwatsonint in6_getpeeraddr __P((struct socket *so, struct sockaddr **nam)); 99169462Srwatsonint in6_getsockaddr __P((struct socket *so, struct sockaddr **nam)); 10053541Sshinint in6_mapped_sockaddr __P((struct socket *so, struct sockaddr **nam)); 10153541Sshinint in6_mapped_peeraddr __P((struct socket *so, struct sockaddr **nam)); 10262587Sitojunint in6_selecthlim __P((struct in6pcb *, struct ifnet *)); 103127505Spjdint in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct ucred *)); 10462587Sitojunvoid init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m)); 10555205Speter#endif /* _KERNEL */ 10653541Sshin 10753541Sshin#endif /* !_NETINET6_IN6_PCB_H_ */ 108