clnt_vc.c (195703) | clnt_vc.c (196503) |
---|---|
1/* $NetBSD: clnt_vc.c,v 1.4 2000/07/14 08:40:42 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 --- 21 unchanged lines hidden (view full) --- 30 */ 31 32#if defined(LIBC_SCCS) && !defined(lint) 33static char *sccsid2 = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; 34static char *sccsid = "@(#)clnt_tcp.c 2.2 88/08/01 4.0 RPCSRC"; 35static char sccsid3[] = "@(#)clnt_vc.c 1.19 89/03/16 Copyr 1988 Sun Micro"; 36#endif 37#include <sys/cdefs.h> | 1/* $NetBSD: clnt_vc.c,v 1.4 2000/07/14 08:40:42 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 --- 21 unchanged lines hidden (view full) --- 30 */ 31 32#if defined(LIBC_SCCS) && !defined(lint) 33static char *sccsid2 = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; 34static char *sccsid = "@(#)clnt_tcp.c 2.2 88/08/01 4.0 RPCSRC"; 35static char sccsid3[] = "@(#)clnt_vc.c 1.19 89/03/16 Copyr 1988 Sun Micro"; 36#endif 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/rpc/clnt_vc.c 195703 2009-07-14 22:54:29Z kib $"); | 38__FBSDID("$FreeBSD: head/sys/rpc/clnt_vc.c 196503 2009-08-24 10:09:30Z zec $"); |
39 40/* 41 * clnt_tcp.c, Implements a TCP/IP based, client side RPC. 42 * 43 * Copyright (C) 1984, Sun Microsystems, Inc. 44 * 45 * TCP based RPC supports 'batched calls'. 46 * A sequence of calls may be batched-up in a send buffer. The rpc call --- 18 unchanged lines hidden (view full) --- 65#include <sys/pcpu.h> 66#include <sys/proc.h> 67#include <sys/protosw.h> 68#include <sys/socket.h> 69#include <sys/socketvar.h> 70#include <sys/syslog.h> 71#include <sys/time.h> 72#include <sys/uio.h> | 39 40/* 41 * clnt_tcp.c, Implements a TCP/IP based, client side RPC. 42 * 43 * Copyright (C) 1984, Sun Microsystems, Inc. 44 * 45 * TCP based RPC supports 'batched calls'. 46 * A sequence of calls may be batched-up in a send buffer. The rpc call --- 18 unchanged lines hidden (view full) --- 65#include <sys/pcpu.h> 66#include <sys/proc.h> 67#include <sys/protosw.h> 68#include <sys/socket.h> 69#include <sys/socketvar.h> 70#include <sys/syslog.h> 71#include <sys/time.h> 72#include <sys/uio.h> |
73 74#include <net/vnet.h> 75 |
|
73#include <netinet/tcp.h> 74 75#include <rpc/rpc.h> 76#include <rpc/rpc_com.h> 77 78#define MCALL_MSG_SIZE 24 79 80struct cmessage { --- 131 unchanged lines hidden (view full) --- 212 if (!interrupted) 213 so->so_state &= ~SS_ISCONNECTING; 214 rpc_createerr.cf_stat = RPC_SYSTEMERROR; 215 rpc_createerr.cf_error.re_errno = error; 216 goto err; 217 } 218 } 219 | 76#include <netinet/tcp.h> 77 78#include <rpc/rpc.h> 79#include <rpc/rpc_com.h> 80 81#define MCALL_MSG_SIZE 24 82 83struct cmessage { --- 131 unchanged lines hidden (view full) --- 215 if (!interrupted) 216 so->so_state &= ~SS_ISCONNECTING; 217 rpc_createerr.cf_stat = RPC_SYSTEMERROR; 218 rpc_createerr.cf_error.re_errno = error; 219 goto err; 220 } 221 } 222 |
220 if (!__rpc_socket2sockinfo(so, &si)) | 223 CURVNET_SET(so->so_vnet); 224 if (!__rpc_socket2sockinfo(so, &si)) { 225 CURVNET_RESTORE(); |
221 goto err; | 226 goto err; |
227 } |
|
222 223 if (so->so_proto->pr_flags & PR_CONNREQUIRED) { 224 bzero(&sopt, sizeof(sopt)); 225 sopt.sopt_dir = SOPT_SET; 226 sopt.sopt_level = SOL_SOCKET; 227 sopt.sopt_name = SO_KEEPALIVE; 228 sopt.sopt_val = &one; 229 sopt.sopt_valsize = sizeof(one); --- 4 unchanged lines hidden (view full) --- 234 bzero(&sopt, sizeof(sopt)); 235 sopt.sopt_dir = SOPT_SET; 236 sopt.sopt_level = IPPROTO_TCP; 237 sopt.sopt_name = TCP_NODELAY; 238 sopt.sopt_val = &one; 239 sopt.sopt_valsize = sizeof(one); 240 sosetopt(so, &sopt); 241 } | 228 229 if (so->so_proto->pr_flags & PR_CONNREQUIRED) { 230 bzero(&sopt, sizeof(sopt)); 231 sopt.sopt_dir = SOPT_SET; 232 sopt.sopt_level = SOL_SOCKET; 233 sopt.sopt_name = SO_KEEPALIVE; 234 sopt.sopt_val = &one; 235 sopt.sopt_valsize = sizeof(one); --- 4 unchanged lines hidden (view full) --- 240 bzero(&sopt, sizeof(sopt)); 241 sopt.sopt_dir = SOPT_SET; 242 sopt.sopt_level = IPPROTO_TCP; 243 sopt.sopt_name = TCP_NODELAY; 244 sopt.sopt_val = &one; 245 sopt.sopt_valsize = sizeof(one); 246 sosetopt(so, &sopt); 247 } |
248 CURVNET_RESTORE(); |
|
242 243 ct->ct_closeit = FALSE; 244 245 /* 246 * Set up private data struct 247 */ 248 ct->ct_socket = so; 249 ct->ct_wait.tv_sec = -1; --- 760 unchanged lines hidden --- | 249 250 ct->ct_closeit = FALSE; 251 252 /* 253 * Set up private data struct 254 */ 255 ct->ct_socket = so; 256 ct->ct_wait.tv_sec = -1; --- 760 unchanged lines hidden --- |