Lines Matching refs:xprt

75 struct tcp_rendezvous { /* kept in xprt->xp_p1 */
80 struct tcp_conn { /* kept in xprt->xp_p1 */
89 * xprt = svctcp_create(sock, send_buf_size, recv_buf_size);
92 * Once *xprt is initialized, it is registered as a transporter
100 * xprt->xp_sock is the registered socket number and xprt->xp_port is the
114 register SVCXPRT *xprt;
150 xprt = svc_xprt_alloc();
151 if (xprt == NULL) {
158 xprt->xp_p2 = NULL;
159 xprt->xp_netid = NULL;
160 xprt->xp_p1 = (caddr_t)r;
161 xprt->xp_verf = _null_auth;
162 xprt->xp_ops = svctcp_rendezvous_ops();
163 xprt->xp_port = ntohs(addr.sin_port);
164 xprt->xp_sock = sock;
165 xprt->xp_rtaddr.buf = xprt->xp_raddr;
166 xprt_register(xprt);
167 return (xprt);
190 register SVCXPRT *xprt;
193 xprt = svc_xprt_alloc();
194 if (xprt == (SVCXPRT *)NULL) {
201 svc_xprt_free(xprt);
202 xprt = (SVCXPRT *)NULL;
207 (caddr_t)xprt, readtcp, writetcp);
208 xprt->xp_p2 = NULL;
209 xprt->xp_netid = NULL;
210 xprt->xp_p1 = (caddr_t)cd;
211 xprt->xp_verf.oa_base = cd->verf_body;
212 xprt->xp_addrlen = 0;
213 xprt->xp_ops = svctcp_ops(); /* truely deals with calls */
214 xprt->xp_port = 0; /* this is a connection, not a rendezvouser */
215 xprt->xp_sock = fd;
217 xprt->xp_rtaddr.buf = xprt->xp_raddr;
218 xprt_register(xprt);
220 return (xprt);
224 rendezvous_request(xprt, rpc_msg)
225 register SVCXPRT *xprt;
233 r = (struct tcp_rendezvous *)xprt->xp_p1;
236 if ((sock = _accept(xprt->xp_sock, (struct sockaddr *)&addr,
243 * make a new transporter (re-uses xprt)
245 xprt = makefd_xprt(sock, r->sendsize, r->recvsize);
247 memcpy((char *)&xprt->xp_raddr, (char *)&addr, len);
248 xprt->xp_addrlen = len;
253 rendezvous_stat(xprt)
254 SVCXPRT *xprt;
261 svctcp_destroy(xprt)
262 register SVCXPRT *xprt;
264 register struct tcp_conn *cd = (struct tcp_conn *)xprt->xp_p1;
266 xprt_unregister(xprt);
267 (void) close(xprt->xp_sock);
268 if (xprt->xp_port != 0) {
270 xprt->xp_port = 0;
276 svc_xprt_free(xprt);
291 readtcp(xprt, buf, len)
292 register SVCXPRT *xprt;
296 register int sock = xprt->xp_sock;
316 ((struct tcp_conn *)(xprt->xp_p1))->strm_stat = XPRT_DIED;
325 writetcp(xprt, buf, len)
326 register SVCXPRT *xprt;
333 if ((i = write(xprt->xp_sock, buf, cnt)) < 0) {
334 ((struct tcp_conn *)(xprt->xp_p1))->strm_stat =
343 svctcp_stat(xprt)
344 SVCXPRT *xprt;
347 (struct tcp_conn *)(xprt->xp_p1);
357 svctcp_recv(xprt, msg)
358 SVCXPRT *xprt;
362 (struct tcp_conn *)(xprt->xp_p1);
375 svctcp_getargs(xprt, xdr_args, args_ptr)
376 SVCXPRT *xprt;
381 return ((*xdr_args)(&(((struct tcp_conn *)(xprt->xp_p1))->xdrs),
386 svctcp_freeargs(xprt, xdr_args, args_ptr)
387 SVCXPRT *xprt;
392 &(((struct tcp_conn *)(xprt->xp_p1))->xdrs);
399 svctcp_reply(xprt, msg)
400 SVCXPRT *xprt;
404 (struct tcp_conn *)(xprt->xp_p1);