Lines Matching defs:xprt

41  * There are two sets of procedures here.  The xprt routines are
572 __svc_get_svcauth(SVCXPRT *xprt)
575 return (&SVC_XP_AUTH(xprt));
740 xprt_register(const SVCXPRT *xprt)
742 int fd = xprt->xp_fd;
789 svc_xports[fd] = (SVCXPRT *)xprt;
828 __xprt_unregister_private(const SVCXPRT *xprt, bool_t lock_not_held)
830 int fd = xprt->xp_fd;
834 if ((fd < nsvc_xports) && (svc_xports[fd] == xprt)) {
840 __svc_rm_from_xlist(&_svc_xprtlist, xprt, &xprtlist_lock);
844 xprt_unregister(const SVCXPRT *xprt)
846 __xprt_unregister_private(xprt, TRUE);
857 svc_reg(const SVCXPRT *xprt, const rpcprog_t prog, const rpcvers_t vers,
868 if (xprt->xp_netid) {
869 netid = strdup(xprt->xp_netid);
874 } else if ((tnconf = __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type))
914 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
915 if ((((SVCXPRT *)xprt)->xp_netid = strdup(netid)) == NULL) {
929 return (rpcb_set(prog, vers, nconf, &xprt->xp_ltaddr));
969 svc_register(SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
978 if (xprt->xp_netid) {
979 netid = strdup(xprt->xp_netid);
981 } else if ((ioctl(xprt->xp_fd, I_FIND, "timod") > 0) && ((nconf =
982 __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type)) != NULL)) {
1015 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
1016 if ((xprt->xp_netid = strdup(netid)) == NULL) {
1029 return (pmap_set(prog, vers, protocol, xprt->xp_port));
1095 svc_sendreply(const SVCXPRT *xprt, const xdrproc_t xdr_results,
1102 rply.acpted_rply.ar_verf = xprt->xp_verf;
1106 return (SVC_REPLY((SVCXPRT *)xprt, &rply));
1113 svcerr_noproc(const SVCXPRT *xprt)
1119 rply.acpted_rply.ar_verf = xprt->xp_verf;
1121 SVC_REPLY((SVCXPRT *)xprt, &rply);
1128 svcerr_decode(const SVCXPRT *xprt)
1134 rply.acpted_rply.ar_verf = xprt->xp_verf;
1136 SVC_REPLY((SVCXPRT *)xprt, &rply);
1143 svcerr_systemerr(const SVCXPRT *xprt)
1149 rply.acpted_rply.ar_verf = xprt->xp_verf;
1151 SVC_REPLY((SVCXPRT *)xprt, &rply);
1161 __svc_versquiet_on(const SVCXPRT *xprt)
1164 svc_flags(xprt) |= SVC_VERSQUIET;
1168 __svc_versquiet_off(const SVCXPRT *xprt)
1171 svc_flags(xprt) &= ~SVC_VERSQUIET;
1175 svc_versquiet(const SVCXPRT *xprt)
1177 __svc_versquiet_on(xprt);
1181 __svc_versquiet_get(const SVCXPRT *xprt)
1184 return (svc_flags(xprt) & SVC_VERSQUIET);
1191 svcerr_auth(const SVCXPRT *xprt, const enum auth_stat why)
1199 SVC_REPLY((SVCXPRT *)xprt, &rply);
1206 svcerr_weakauth(const SVCXPRT *xprt)
1208 svcerr_auth(xprt, AUTH_TOOWEAK);
1215 svcerr_noprog(const SVCXPRT *xprt)
1221 rply.acpted_rply.ar_verf = xprt->xp_verf;
1223 SVC_REPLY((SVCXPRT *)xprt, &rply);
1230 svcerr_progvers(const SVCXPRT *xprt, const rpcvers_t low_vers,
1237 rply.acpted_rply.ar_verf = xprt->xp_verf;
1241 SVC_REPLY((SVCXPRT *)xprt, &rply);
1328 SVCXPRT *xprt;
1355 * xprt associated with the fd that had the original read event.
1357 if ((fd >= nsvc_xports) || (xprt = svc_xports[fd]) == NULL) {
1363 msg = SVCEXT(xprt)->msg;
1365 r = SVCEXT(xprt)->req;
1367 cred_area = SVCEXT(xprt)->cred_area;
1376 if (dispatch = SVC_RECV(xprt, msg))
1377 (void) _svc_prog_dispatch(xprt, msg, r);
1379 * Check if the xprt has been disconnected in a recursive call
1383 if (xprt != svc_xports[fd]) {
1393 (*__proc_cleanup_cb)(xprt);
1395 if ((stat = SVC_STAT(xprt)) == XPRT_DIED) {
1396 SVC_DESTROY(xprt);
1403 _svc_prog_dispatch(SVCXPRT *xprt, struct rpc_msg *msg, struct svc_req *r)
1412 r->rq_xprt = xprt;
1433 svcerr_auth(xprt, why);
1448 if ((xprt->xp_netid == NULL) ||
1450 (strcmp(xprt->xp_netid,
1454 disp_fn(r, xprt);
1473 if (!version_keepquiet(xprt))
1474 svcerr_progvers(xprt, low_vers, high_vers);
1476 svcerr_noprog(xprt);
1489 SVCXPRT *xprt = NULL;
1496 if ((xprt = calloc(1, sizeof (SVCXPRT))) == NULL)
1501 xprt->xp_p3 = (caddr_t)xt; /* SVCEXT(xprt) = xt */
1506 xlist->xprt = xprt;
1521 (void) mutex_init(&svc_send_mutex(xprt), USYNC_THREAD, (void *)0);
1522 return (xprt);
1525 svc_xprt_free(xprt);
1534 svc_xprt_free(SVCXPRT *xprt)
1537 SVCXPRT_EXT *xt = xprt ? SVCEXT(xprt) : NULL;
1543 if (xprt)
1544 free(xprt);
1559 * svc_xprt_destroy() - free parent and child xprt list
1562 svc_xprt_destroy(SVCXPRT *xprt)
1568 if (SVCEXT(xprt)->parent)
1570 xprt = SVCEXT(xprt)->parent;
1572 type = svc_type(xprt);
1574 for (xlist = SVCEXT(xprt)->my_xlist; xlist != NULL; xlist = xnext) {
1576 xprt = xlist->xprt;
1579 svc_dg_xprtfree(xprt);
1582 svc_vc_xprtfree(xprt);
1585 svc_fd_xprtfree(xprt);
1588 svc_door_xprtfree(xprt);
1599 svc_copy(SVCXPRT *xprt)
1602 switch (svc_type(xprt)) {
1604 return (svc_dg_xprtcopy(xprt));
1606 return (svc_vc_xprtcopy(xprt));
1608 return (svc_fd_xprtcopy(xprt));
1618 _svc_destroy_private(SVCXPRT *xprt)
1621 switch (svc_type(xprt)) {
1623 _svc_dg_destroy_private(xprt);
1627 _svc_vc_destroy_private(xprt, TRUE);
1639 svc_get_local_cred(SVCXPRT *xprt, svc_local_cred_t *lcred)
1642 if (svc_type(xprt) == SVC_DOOR)
1643 return (__svc_get_door_cred(xprt, lcred));
1644 return (__rpc_get_local_cred(xprt, lcred));
1663 /* dupcache header contains xprt specific information */
1707 if (*xprt_cache != NULL) { /* do only once per xprt */