Deleted Added
sdiff udiff text old ( 195703 ) new ( 196503 )
full compact
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 $");
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#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
220 if (!__rpc_socket2sockinfo(so, &si))
221 goto err;
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 }
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 ---