in6_pcb.c (194907) | in6_pcb.c (195699) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 61 */ 62 63#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 47 unchanged lines hidden (view full) --- 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 * 60 * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 61 */ 62 63#include <sys/cdefs.h> |
64__FBSDID("$FreeBSD: head/sys/netinet6/in6_pcb.c 194907 2009-06-24 21:00:25Z rwatson $"); | 64__FBSDID("$FreeBSD: head/sys/netinet6/in6_pcb.c 195699 2009-07-14 22:48:30Z rwatson $"); |
65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_ipsec.h" 69 70#include <sys/param.h> 71#include <sys/systm.h> 72#include <sys/malloc.h> --- 17 unchanged lines hidden (view full) --- 90#include <net/route.h> 91 92#include <netinet/in.h> 93#include <netinet/in_var.h> 94#include <netinet/in_systm.h> 95#include <netinet/tcp_var.h> 96#include <netinet/ip6.h> 97#include <netinet/ip_var.h> | 65 66#include "opt_inet.h" 67#include "opt_inet6.h" 68#include "opt_ipsec.h" 69 70#include <sys/param.h> 71#include <sys/systm.h> 72#include <sys/malloc.h> --- 17 unchanged lines hidden (view full) --- 90#include <net/route.h> 91 92#include <netinet/in.h> 93#include <netinet/in_var.h> 94#include <netinet/in_systm.h> 95#include <netinet/tcp_var.h> 96#include <netinet/ip6.h> 97#include <netinet/ip_var.h> |
98#include <netinet/vinet.h> | |
99 100#include <netinet6/ip6_var.h> 101#include <netinet6/nd6.h> 102#include <netinet/in_pcb.h> 103#include <netinet6/in6_pcb.h> 104#include <netinet6/scope6_var.h> | 98 99#include <netinet6/ip6_var.h> 100#include <netinet6/nd6.h> 101#include <netinet/in_pcb.h> 102#include <netinet6/in6_pcb.h> 103#include <netinet6/scope6_var.h> |
105#include <netinet6/vinet6.h> | |
106 107#include <security/mac/mac_framework.h> 108 109struct in6_addr zeroin6_addr; 110 111int 112in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam, 113 struct ucred *cred) 114{ | 104 105#include <security/mac/mac_framework.h> 106 107struct in6_addr zeroin6_addr; 108 109int 110in6_pcbbind(register struct inpcb *inp, struct sockaddr *nam, 111 struct ucred *cred) 112{ |
115 INIT_VNET_INET6(inp->inp_vnet); 116 INIT_VNET_INET(inp->inp_vnet); | |
117 struct socket *so = inp->inp_socket; 118 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)NULL; 119 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; 120 u_short lport = 0; 121 int error, wild = 0, reuseport = (so->so_options & SO_REUSEPORT); 122 123 INP_INFO_WLOCK_ASSERT(pcbinfo); 124 INP_WLOCK_ASSERT(inp); --- 161 unchanged lines hidden (view full) --- 286 * slightly different version for T/TCP. (This is more than 287 * a bit of a kludge, but cleaning up the internal interfaces would 288 * have forced minor changes in every protocol). 289 */ 290int 291in6_pcbladdr(register struct inpcb *inp, struct sockaddr *nam, 292 struct in6_addr *plocal_addr6) 293{ | 113 struct socket *so = inp->inp_socket; 114 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)NULL; 115 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; 116 u_short lport = 0; 117 int error, wild = 0, reuseport = (so->so_options & SO_REUSEPORT); 118 119 INP_INFO_WLOCK_ASSERT(pcbinfo); 120 INP_WLOCK_ASSERT(inp); --- 161 unchanged lines hidden (view full) --- 282 * slightly different version for T/TCP. (This is more than 283 * a bit of a kludge, but cleaning up the internal interfaces would 284 * have forced minor changes in every protocol). 285 */ 286int 287in6_pcbladdr(register struct inpcb *inp, struct sockaddr *nam, 288 struct in6_addr *plocal_addr6) 289{ |
294 INIT_VNET_INET6(inp->inp_vnet); | |
295 register struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; 296 int error = 0; 297 struct ifnet *ifp = NULL; 298 int scope_ambiguous = 0; 299 struct in6_addr in6a; 300 301 INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); 302 INP_WLOCK_ASSERT(inp); --- 638 unchanged lines hidden --- | 290 register struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; 291 int error = 0; 292 struct ifnet *ifp = NULL; 293 int scope_ambiguous = 0; 294 struct in6_addr in6a; 295 296 INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); 297 INP_WLOCK_ASSERT(inp); --- 638 unchanged lines hidden --- |