uipc_syscalls.c (15701) | uipc_syscalls.c (17096) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1990, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 |
34 * $Id: uipc_syscalls.c,v 1.16 1996/03/11 15:37:33 davidg Exp $ | 34 * $Id: uipc_syscalls.c,v 1.17 1996/05/09 20:14:59 wollman Exp $ |
35 */ 36 37#include "opt_ktrace.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/sysproto.h> 42#include <sys/filedesc.h> --- 1078 unchanged lines hidden (view full) --- 1121 return (error); 1122 error = copyin((caddr_t)uap->alen, (caddr_t)&len, sizeof (len)); 1123 if (error) 1124 return (error); 1125 so = (struct socket *)fp->f_data; 1126 m = m_getclr(M_WAIT, MT_SONAME); 1127 if (m == NULL) 1128 return (ENOBUFS); | 35 */ 36 37#include "opt_ktrace.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/sysproto.h> 42#include <sys/filedesc.h> --- 1078 unchanged lines hidden (view full) --- 1121 return (error); 1122 error = copyin((caddr_t)uap->alen, (caddr_t)&len, sizeof (len)); 1123 if (error) 1124 return (error); 1125 so = (struct socket *)fp->f_data; 1126 m = m_getclr(M_WAIT, MT_SONAME); 1127 if (m == NULL) 1128 return (ENOBUFS); |
1129 error = (*so->so_proto->pr_usrreq)(so, PRU_SOCKADDR, 0, m, 0); | 1129 error = (*so->so_proto->pr_usrreqs->pru_sockaddr)(so, m); |
1130 if (error) 1131 goto bad; 1132 if (len > m->m_len) 1133 len = m->m_len; 1134#ifdef COMPAT_OLDSOCK 1135 if (compat) 1136 mtod(m, struct osockaddr *)->sa_family = 1137 mtod(m, struct sockaddr *)->sa_family; --- 56 unchanged lines hidden (view full) --- 1194 if ((so->so_state & (SS_ISCONNECTED|SS_ISCONFIRMING)) == 0) 1195 return (ENOTCONN); 1196 error = copyin((caddr_t)uap->alen, (caddr_t)&len, sizeof (len)); 1197 if (error) 1198 return (error); 1199 m = m_getclr(M_WAIT, MT_SONAME); 1200 if (m == NULL) 1201 return (ENOBUFS); | 1130 if (error) 1131 goto bad; 1132 if (len > m->m_len) 1133 len = m->m_len; 1134#ifdef COMPAT_OLDSOCK 1135 if (compat) 1136 mtod(m, struct osockaddr *)->sa_family = 1137 mtod(m, struct sockaddr *)->sa_family; --- 56 unchanged lines hidden (view full) --- 1194 if ((so->so_state & (SS_ISCONNECTED|SS_ISCONFIRMING)) == 0) 1195 return (ENOTCONN); 1196 error = copyin((caddr_t)uap->alen, (caddr_t)&len, sizeof (len)); 1197 if (error) 1198 return (error); 1199 m = m_getclr(M_WAIT, MT_SONAME); 1200 if (m == NULL) 1201 return (ENOBUFS); |
1202 error = (*so->so_proto->pr_usrreq)(so, PRU_PEERADDR, 0, m, 0); | 1202 error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, m); |
1203 if (error) 1204 goto bad; 1205 if (len > m->m_len) 1206 len = m->m_len; 1207#ifdef COMPAT_OLDSOCK 1208 if (compat) 1209 mtod(m, struct osockaddr *)->sa_family = 1210 mtod(m, struct sockaddr *)->sa_family; --- 89 unchanged lines hidden --- | 1203 if (error) 1204 goto bad; 1205 if (len > m->m_len) 1206 len = m->m_len; 1207#ifdef COMPAT_OLDSOCK 1208 if (compat) 1209 mtod(m, struct osockaddr *)->sa_family = 1210 mtod(m, struct sockaddr *)->sa_family; --- 89 unchanged lines hidden --- |