clnt_dg.c (195245) | clnt_dg.c (196503) |
---|---|
1/* $NetBSD: clnt_dg.c,v 1.4 2000/07/14 08:40:41 fvdl Exp $ */ 2 3/* 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5 * unrestricted use provided that this legend is included on all tape 6 * media and as a part of the software program in whole or part. Users 7 * may copy or modify Sun RPC without charge, but are not authorized 8 * to license or distribute it to anyone else except as part of a product or --- 23 unchanged lines hidden (view full) --- 32 * Copyright (c) 1986-1991 by Sun Microsystems Inc. 33 */ 34 35#if defined(LIBC_SCCS) && !defined(lint) 36#ident "@(#)clnt_dg.c 1.23 94/04/22 SMI" 37static char sccsid[] = "@(#)clnt_dg.c 1.19 89/03/16 Copyr 1988 Sun Micro"; 38#endif 39#include <sys/cdefs.h> | 1/* $NetBSD: clnt_dg.c,v 1.4 2000/07/14 08:40:41 fvdl Exp $ */ 2 3/* 4 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 5 * unrestricted use provided that this legend is included on all tape 6 * media and as a part of the software program in whole or part. Users 7 * may copy or modify Sun RPC without charge, but are not authorized 8 * to license or distribute it to anyone else except as part of a product or --- 23 unchanged lines hidden (view full) --- 32 * Copyright (c) 1986-1991 by Sun Microsystems Inc. 33 */ 34 35#if defined(LIBC_SCCS) && !defined(lint) 36#ident "@(#)clnt_dg.c 1.23 94/04/22 SMI" 37static char sccsid[] = "@(#)clnt_dg.c 1.19 89/03/16 Copyr 1988 Sun Micro"; 38#endif 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sys/rpc/clnt_dg.c 195245 2009-07-01 16:38:18Z rmacklem $"); | 40__FBSDID("$FreeBSD: head/sys/rpc/clnt_dg.c 196503 2009-08-24 10:09:30Z zec $"); |
41 42/* 43 * Implements a connectionless client side RPC. 44 */ 45 46#include <sys/param.h> 47#include <sys/systm.h> 48#include <sys/kernel.h> 49#include <sys/lock.h> 50#include <sys/malloc.h> 51#include <sys/mbuf.h> 52#include <sys/mutex.h> 53#include <sys/pcpu.h> 54#include <sys/proc.h> 55#include <sys/socket.h> 56#include <sys/socketvar.h> 57#include <sys/time.h> 58#include <sys/uio.h> 59 | 41 42/* 43 * Implements a connectionless client side RPC. 44 */ 45 46#include <sys/param.h> 47#include <sys/systm.h> 48#include <sys/kernel.h> 49#include <sys/lock.h> 50#include <sys/malloc.h> 51#include <sys/mbuf.h> 52#include <sys/mutex.h> 53#include <sys/pcpu.h> 54#include <sys/proc.h> 55#include <sys/socket.h> 56#include <sys/socketvar.h> 57#include <sys/time.h> 58#include <sys/uio.h> 59 |
60#include <net/vnet.h> 61 |
|
60#include <rpc/rpc.h> 61#include <rpc/rpc_com.h> 62 63 64#ifdef _FREEFALL_CONFIG 65/* 66 * Disable RPC exponential back-off for FreeBSD.org systems. 67 */ --- 124 unchanged lines hidden (view full) --- 192 struct __rpc_sockinfo si; 193 XDR xdrs; 194 195 if (svcaddr == NULL) { 196 rpc_createerr.cf_stat = RPC_UNKNOWNADDR; 197 return (NULL); 198 } 199 | 62#include <rpc/rpc.h> 63#include <rpc/rpc_com.h> 64 65 66#ifdef _FREEFALL_CONFIG 67/* 68 * Disable RPC exponential back-off for FreeBSD.org systems. 69 */ --- 124 unchanged lines hidden (view full) --- 194 struct __rpc_sockinfo si; 195 XDR xdrs; 196 197 if (svcaddr == NULL) { 198 rpc_createerr.cf_stat = RPC_UNKNOWNADDR; 199 return (NULL); 200 } 201 |
202 CURVNET_SET(so->so_vnet); |
|
200 if (!__rpc_socket2sockinfo(so, &si)) { 201 rpc_createerr.cf_stat = RPC_TLIERROR; 202 rpc_createerr.cf_error.re_errno = 0; | 203 if (!__rpc_socket2sockinfo(so, &si)) { 204 rpc_createerr.cf_stat = RPC_TLIERROR; 205 rpc_createerr.cf_error.re_errno = 0; |
206 CURVNET_RESTORE(); |
|
203 return (NULL); 204 } | 207 return (NULL); 208 } |
209 CURVNET_RESTORE(); |
|
205 206 /* 207 * Find the receive and the send size 208 */ 209 sendsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)sendsz); 210 recvsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)recvsz); 211 if ((sendsz == 0) || (recvsz == 0)) { 212 rpc_createerr.cf_stat = RPC_TLIERROR; /* XXX */ --- 931 unchanged lines hidden --- | 210 211 /* 212 * Find the receive and the send size 213 */ 214 sendsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)sendsz); 215 recvsz = __rpc_get_t_size(si.si_af, si.si_proto, (int)recvsz); 216 if ((sendsz == 0) || (recvsz == 0)) { 217 rpc_createerr.cf_stat = RPC_TLIERROR; /* XXX */ --- 931 unchanged lines hidden --- |