2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
9 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
10 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
11 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
13 * Sun RPC is provided with no support and without any obligation on the
14 * part of Sun Microsystems, Inc. to assist in its use, correction,
15 * modification or enhancement.
17 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
18 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
19 * OR ANY PART THEREOF.
21 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
22 * or profits or other special, indirect and consequential damages, even if
23 * Sun has been advised of the possibility of such damages.
25 * Sun Microsystems, Inc.
27 * Mountain View, California 94043
37 * Definitions now shared between client and server RPC for backchannels.
39 #define MCALL_MSG_SIZE 24
42 * A pending RPC request which awaits a reply. Requests which have
43 * received their reply will have cr_xid set to zero and cr_mrep to
44 * the mbuf chain of the reply.
47 TAILQ_ENTRY(ct_request) cr_link;
48 uint32_t cr_xid; /* XID of request */
49 struct mbuf *cr_mrep; /* reply received by upcall */
50 int cr_error; /* any error from upcall */
51 char cr_verf[MAX_AUTH_BYTES]; /* reply verf */
54 TAILQ_HEAD(ct_request_list, ct_request);
58 struct sockaddr_storage rc_addr; /* server address */
59 struct netconfig* rc_nconf; /* network type */
60 rpcprog_t rc_prog; /* program number */
61 rpcvers_t rc_vers; /* version number */
64 struct timeval rc_timeout;
65 struct timeval rc_retry;
72 struct ucred *rc_ucred;
73 CLIENT* rc_client; /* underlying RPC client */
74 struct rpc_err rc_err;
80 int ct_threads; /* number of threads in clnt_vc_call */
81 bool_t ct_closing; /* TRUE if we are closing */
82 bool_t ct_closed; /* TRUE if we are closed */
83 struct socket *ct_socket; /* connection socket */
84 bool_t ct_closeit; /* close it on destroy */
85 struct timeval ct_wait; /* wait interval in milliseconds */
86 struct sockaddr_storage ct_addr; /* remote addr */
87 struct rpc_err ct_error;
89 char ct_mcallc[MCALL_MSG_SIZE]; /* marshalled callmsg */
90 size_t ct_mpos; /* pos after marshal */
91 const char *ct_waitchan;
93 struct mbuf *ct_record; /* current reply record */
94 size_t ct_record_resid; /* how much left of reply to read */
95 bool_t ct_record_eor; /* true if reading last fragment */
96 struct ct_request_list ct_pending;
97 int ct_upcallrefs; /* Ref cnt of upcalls in prog. */
98 SVCXPRT *ct_backchannelxprt; /* xprt for backchannel */
101 struct cf_conn { /* kept in xprt->xp_p1 for actual connection */
102 enum xprt_stat strm_stat;
103 struct mbuf *mpending; /* unparsed data read from the socket */
104 struct mbuf *mreq; /* current record being built from mpending */
105 uint32_t resid; /* number of bytes needed for fragment */
106 bool_t eor; /* reading last fragment of current record */
111 #endif /* _RPC_KRPC_H_ */