Lines Matching refs:xprt

39  * There are two sets of procedures here.  The xprt routines are
566 __svc_get_svcauth(SVCXPRT *xprt)
569 return (&SVC_XP_AUTH(xprt));
734 xprt_register(const SVCXPRT *xprt)
736 int fd = xprt->xp_fd;
783 svc_xports[fd] = (SVCXPRT *)xprt;
822 __xprt_unregister_private(const SVCXPRT *xprt, bool_t lock_not_held)
824 int fd = xprt->xp_fd;
828 if ((fd < nsvc_xports) && (svc_xports[fd] == xprt)) {
834 __svc_rm_from_xlist(&_svc_xprtlist, xprt, &xprtlist_lock);
838 xprt_unregister(const SVCXPRT *xprt)
840 __xprt_unregister_private(xprt, TRUE);
851 svc_reg(const SVCXPRT *xprt, const rpcprog_t prog, const rpcvers_t vers,
862 if (xprt->xp_netid) {
863 netid = strdup(xprt->xp_netid);
868 } else if ((tnconf = __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type))
908 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
909 if ((((SVCXPRT *)xprt)->xp_netid = strdup(netid)) == NULL) {
923 return (rpcb_set(prog, vers, nconf, &xprt->xp_ltaddr));
963 svc_register(SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
972 if (xprt->xp_netid) {
973 netid = strdup(xprt->xp_netid);
975 } else if ((ioctl(xprt->xp_fd, I_FIND, "timod") > 0) && ((nconf =
976 __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type)) != NULL)) {
1009 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
1010 if ((xprt->xp_netid = strdup(netid)) == NULL) {
1023 return (pmap_set(prog, vers, protocol, xprt->xp_port));
1089 svc_sendreply(const SVCXPRT *xprt, const xdrproc_t xdr_results,
1096 rply.acpted_rply.ar_verf = xprt->xp_verf;
1100 return (SVC_REPLY((SVCXPRT *)xprt, &rply));
1107 svcerr_noproc(const SVCXPRT *xprt)
1113 rply.acpted_rply.ar_verf = xprt->xp_verf;
1115 SVC_REPLY((SVCXPRT *)xprt, &rply);
1122 svcerr_decode(const SVCXPRT *xprt)
1128 rply.acpted_rply.ar_verf = xprt->xp_verf;
1130 SVC_REPLY((SVCXPRT *)xprt, &rply);
1137 svcerr_systemerr(const SVCXPRT *xprt)
1143 rply.acpted_rply.ar_verf = xprt->xp_verf;
1145 SVC_REPLY((SVCXPRT *)xprt, &rply);
1155 __svc_versquiet_on(const SVCXPRT *xprt)
1158 svc_flags(xprt) |= SVC_VERSQUIET;
1162 __svc_versquiet_off(const SVCXPRT *xprt)
1165 svc_flags(xprt) &= ~SVC_VERSQUIET;
1169 svc_versquiet(const SVCXPRT *xprt)
1171 __svc_versquiet_on(xprt);
1175 __svc_versquiet_get(const SVCXPRT *xprt)
1178 return (svc_flags(xprt) & SVC_VERSQUIET);
1185 svcerr_auth(const SVCXPRT *xprt, const enum auth_stat why)
1193 SVC_REPLY((SVCXPRT *)xprt, &rply);
1200 svcerr_weakauth(const SVCXPRT *xprt)
1202 svcerr_auth(xprt, AUTH_TOOWEAK);
1209 svcerr_noprog(const SVCXPRT *xprt)
1215 rply.acpted_rply.ar_verf = xprt->xp_verf;
1217 SVC_REPLY((SVCXPRT *)xprt, &rply);
1224 svcerr_progvers(const SVCXPRT *xprt, const rpcvers_t low_vers,
1231 rply.acpted_rply.ar_verf = xprt->xp_verf;
1235 SVC_REPLY((SVCXPRT *)xprt, &rply);
1322 SVCXPRT *xprt;
1349 * xprt associated with the fd that had the original read event.
1351 if ((fd >= nsvc_xports) || (xprt = svc_xports[fd]) == NULL) {
1357 msg = SVCEXT(xprt)->msg;
1359 r = SVCEXT(xprt)->req;
1361 cred_area = SVCEXT(xprt)->cred_area;
1370 if (dispatch = SVC_RECV(xprt, msg))
1371 (void) _svc_prog_dispatch(xprt, msg, r);
1373 * Check if the xprt has been disconnected in a recursive call
1377 if (xprt != svc_xports[fd]) {
1387 (*__proc_cleanup_cb)(xprt);
1389 if ((stat = SVC_STAT(xprt)) == XPRT_DIED) {
1390 SVC_DESTROY(xprt);
1397 _svc_prog_dispatch(SVCXPRT *xprt, struct rpc_msg *msg, struct svc_req *r)
1406 r->rq_xprt = xprt;
1427 svcerr_auth(xprt, why);
1442 if ((xprt->xp_netid == NULL) ||
1444 (strcmp(xprt->xp_netid,
1448 disp_fn(r, xprt);
1467 if (!version_keepquiet(xprt))
1468 svcerr_progvers(xprt, low_vers, high_vers);
1470 svcerr_noprog(xprt);
1483 SVCXPRT *xprt = NULL;
1490 if ((xprt = calloc(1, sizeof (SVCXPRT))) == NULL)
1495 xprt->xp_p3 = (caddr_t)xt; /* SVCEXT(xprt) = xt */
1500 xlist->xprt = xprt;
1515 (void) mutex_init(&svc_send_mutex(xprt), USYNC_THREAD, (void *)0);
1516 return (xprt);
1519 svc_xprt_free(xprt);
1528 svc_xprt_free(SVCXPRT *xprt)
1531 SVCXPRT_EXT *xt = xprt ? SVCEXT(xprt) : NULL;
1537 if (xprt)
1538 free(xprt);
1553 * svc_xprt_destroy() - free parent and child xprt list
1556 svc_xprt_destroy(SVCXPRT *xprt)
1562 if (SVCEXT(xprt)->parent)
1564 xprt = SVCEXT(xprt)->parent;
1566 type = svc_type(xprt);
1568 for (xlist = SVCEXT(xprt)->my_xlist; xlist != NULL; xlist = xnext) {
1570 xprt = xlist->xprt;
1573 svc_dg_xprtfree(xprt);
1576 svc_vc_xprtfree(xprt);
1579 svc_fd_xprtfree(xprt);
1582 svc_door_xprtfree(xprt);
1593 svc_copy(SVCXPRT *xprt)
1596 switch (svc_type(xprt)) {
1598 return (svc_dg_xprtcopy(xprt));
1600 return (svc_vc_xprtcopy(xprt));
1602 return (svc_fd_xprtcopy(xprt));
1612 _svc_destroy_private(SVCXPRT *xprt)
1615 switch (svc_type(xprt)) {
1617 _svc_dg_destroy_private(xprt);
1621 _svc_vc_destroy_private(xprt, TRUE);
1633 svc_get_local_cred(SVCXPRT *xprt, svc_local_cred_t *lcred)
1636 if (svc_type(xprt) == SVC_DOOR)
1637 return (__svc_get_door_cred(xprt, lcred));
1638 return (__rpc_get_local_cred(xprt, lcred));
1657 /* dupcache header contains xprt specific information */
1701 if (*xprt_cache != NULL) { /* do only once per xprt */