Lines Matching defs:xprt

70  * kept in xprt->xp_p2
83 #define su_data(xprt) ((struct svc_door_data *)(xprt->xp_p2))
95 __svc_add_to_xlist(SVCXPRT_LIST **list, SVCXPRT *xprt, mutex_t *lockp)
101 l->xprt = xprt;
112 __svc_rm_from_xlist(SVCXPRT_LIST **list, SVCXPRT *xprt, mutex_t *lockp)
119 if ((*l)->xprt == xprt) {
157 svc_door_destroy_pvt(l->xprt);
178 svc_door_dispatch(SVCXPRT *xprt, struct rpc_msg *msg, struct svc_req *r)
182 struct svc_door_data *su = su_data(xprt);
185 r->rq_xprt = xprt;
196 svcerr_auth(xprt, why);
202 (*su->call_info.dispatch)(r, xprt);
211 svcerr_progvers(xprt, su->call_info.versnum,
214 svcerr_noprog(xprt);
226 SVCXPRT *xprt;
246 if ((xprt = get_xprt_copy(parent, result_buf)) == NULL) {
256 msg = SVCEXT(xprt)->msg;
258 r = SVCEXT(xprt)->req;
260 cred_area = SVCEXT(xprt)->cred_area;
267 su = su_data(xprt);
271 if (svc_door_recv(xprt, msg))
272 svc_door_dispatch(xprt, msg, r);
274 if ((len = return_xprt_copy(xprt)) > 0) {
285 * xprt = svc_door_create(dispatch, prognum, versnum, sendsize);
286 * Once *xprt is initialized, it is registered.
293 svc_door_xprtfree(SVCXPRT *xprt)
296 struct svc_door_data *su = xprt ? su_data(xprt) : NULL;
298 if (xprt == NULL)
300 if (xprt->xp_netid)
301 free(xprt->xp_netid);
302 if (xprt->xp_tp)
303 free(xprt->xp_tp);
306 svc_xprt_free(xprt);
313 SVCXPRT *xprt;
330 if ((xprt = svc_xprt_alloc()) == NULL) {
335 svc_flags(xprt) |= SVC_DOOR;
368 did = door_create(door_server, (void *)xprt, DOOR_REFUSE_DESC);
402 xprt->xp_p2 = (caddr_t)su;
403 xprt->xp_verf.oa_base = su->su_verfbody;
404 xprt->xp_ops = svc_door_ops();
405 xprt->xp_netid = strdup("door");
406 if (xprt->xp_netid == NULL) {
410 xprt->xp_tp = strdup(rendezvous);
411 if (xprt->xp_tp == NULL) {
415 xprt->xp_fd = did;
418 if (!__svc_add_to_xlist(&dxlist, xprt, NULL)) {
424 return (xprt);
430 if (xprt)
431 svc_door_xprtfree(xprt);
440 SVCXPRT *xprt;
443 if ((xprt = svc_xprt_alloc()) == NULL)
447 SVCEXT(xprt)->parent = parent;
449 SVCEXT(xprt)->flags = SVCEXT(parent)->flags;
451 xprt->xp_fd = parent->xp_fd;
452 xprt->xp_port = parent->xp_port;
453 xprt->xp_ops = svc_door_ops();
455 xprt->xp_tp = (char *)strdup(parent->xp_tp);
456 if (xprt->xp_tp == NULL) {
458 svc_door_xprtfree(xprt);
463 xprt->xp_netid = (char *)strdup(parent->xp_netid);
464 if (xprt->xp_netid == NULL) {
468 svc_door_xprtfree(xprt);
472 xprt->xp_type = parent->xp_type;
475 svc_door_xprtfree(xprt);
483 xprt->xp_p2 = (caddr_t)su; /* su_data(xprt) = su */
484 xprt->xp_verf.oa_base = su->su_verfbody;
486 return (xprt);
496 SVCXPRT *xprt;
503 xprt = xret->xprt;
505 svc_flags(xprt) = svc_flags(parent);
507 xprt = svc_door_xprtcopy(parent);
509 if (xprt) {
513 su = su_data(xprt);
517 return (xprt);
521 return_xprt_copy(SVCXPRT *xprt)
526 int len = su_data(xprt)->len;
530 if ((parent = SVCEXT(xprt)->parent) == NULL) {
537 xlist = SVCEXT(xprt)->my_xlist;
550 svc_flags(xprt) |= svc_flags(parent);
552 if (svc_defunct(xprt)) {
557 svc_door_destroy(xprt);
565 svc_door_stat(SVCXPRT *xprt)
571 svc_door_recv(SVCXPRT *xprt, struct rpc_msg *msg)
574 struct svc_door_data *su = su_data(xprt);
585 svc_door_reply(SVCXPRT *xprt, struct rpc_msg *msg)
588 struct svc_door_data *su = su_data(xprt);
601 svc_door_getargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
604 return ((*xdr_args)(&(su_data(xprt)->su_xdrs), args_ptr));
608 svc_door_freeargs(SVCXPRT *xprt, xdrproc_t xdr_args, caddr_t args_ptr)
611 XDR *xdrs = &(su_data(xprt)->su_xdrs);
618 svc_door_destroy(SVCXPRT *xprt)
621 svc_door_destroy_pvt(xprt);
626 svc_door_destroy_pvt(SVCXPRT *xprt)
629 if (SVCEXT(xprt)->parent)
631 xprt = SVCEXT(xprt)->parent;
633 svc_flags(xprt) |= SVC_DEFUNCT;
635 if (SVCEXT(xprt)->refcnt > 0)
638 __svc_rm_from_xlist(&dxlist, xprt, NULL);
640 if (xprt->xp_tp) {
641 (void) fdetach(xprt->xp_tp);
642 (void) unlink(xprt->xp_tp);
644 (void) door_revoke(xprt->xp_fd);
646 svc_xprt_destroy(xprt);
654 svc_door_control(SVCXPRT *xprt, const uint_t rq, void *in)
667 if (door_setparam(xprt->xp_fd, DOOR_PARAM_DATA_MAX,
674 if (door_getparam(xprt->xp_fd, DOOR_PARAM_DATA_MAX,
718 __svc_get_door_cred(SVCXPRT *xprt, svc_local_cred_t *lcred)
734 __svc_get_door_ucred(const SVCXPRT *xprt, ucred_t *ucp)