Lines Matching defs:xprt

39  * There are two sets of procedures here.  The xprt routines are
569 __svc_get_svcauth(SVCXPRT *xprt)
572 return (&SVC_XP_AUTH(xprt));
737 xprt_register(const SVCXPRT *xprt)
739 int fd = xprt->xp_fd;
786 svc_xports[fd] = (SVCXPRT *)xprt;
825 __xprt_unregister_private(const SVCXPRT *xprt, bool_t lock_not_held)
827 int fd = xprt->xp_fd;
831 if ((fd < nsvc_xports) && (svc_xports[fd] == xprt)) {
837 __svc_rm_from_xlist(&_svc_xprtlist, xprt, &xprtlist_lock);
841 xprt_unregister(const SVCXPRT *xprt)
843 __xprt_unregister_private(xprt, TRUE);
854 svc_reg(const SVCXPRT *xprt, const rpcprog_t prog, const rpcvers_t vers,
865 if (xprt->xp_netid) {
866 netid = strdup(xprt->xp_netid);
871 } else if ((tnconf = __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type))
911 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
912 if ((((SVCXPRT *)xprt)->xp_netid = strdup(netid)) == NULL) {
926 return (rpcb_set(prog, vers, nconf, &xprt->xp_ltaddr));
966 svc_register(SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
975 if (xprt->xp_netid) {
976 netid = strdup(xprt->xp_netid);
978 } else if ((ioctl(xprt->xp_fd, I_FIND, "timod") > 0) && ((nconf =
979 __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type)) != NULL)) {
1012 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
1013 if ((xprt->xp_netid = strdup(netid)) == NULL) {
1026 return (pmap_set(prog, vers, protocol, xprt->xp_port));
1092 svc_sendreply(const SVCXPRT *xprt, const xdrproc_t xdr_results,
1099 rply.acpted_rply.ar_verf = xprt->xp_verf;
1103 return (SVC_REPLY((SVCXPRT *)xprt, &rply));
1110 svcerr_noproc(const SVCXPRT *xprt)
1116 rply.acpted_rply.ar_verf = xprt->xp_verf;
1118 SVC_REPLY((SVCXPRT *)xprt, &rply);
1125 svcerr_decode(const SVCXPRT *xprt)
1131 rply.acpted_rply.ar_verf = xprt->xp_verf;
1133 SVC_REPLY((SVCXPRT *)xprt, &rply);
1140 svcerr_systemerr(const SVCXPRT *xprt)
1146 rply.acpted_rply.ar_verf = xprt->xp_verf;
1148 SVC_REPLY((SVCXPRT *)xprt, &rply);
1158 __svc_versquiet_on(const SVCXPRT *xprt)
1161 svc_flags(xprt) |= SVC_VERSQUIET;
1165 __svc_versquiet_off(const SVCXPRT *xprt)
1168 svc_flags(xprt) &= ~SVC_VERSQUIET;
1172 svc_versquiet(const SVCXPRT *xprt)
1174 __svc_versquiet_on(xprt);
1178 __svc_versquiet_get(const SVCXPRT *xprt)
1181 return (svc_flags(xprt) & SVC_VERSQUIET);
1188 svcerr_auth(const SVCXPRT *xprt, const enum auth_stat why)
1196 SVC_REPLY((SVCXPRT *)xprt, &rply);
1203 svcerr_weakauth(const SVCXPRT *xprt)
1205 svcerr_auth(xprt, AUTH_TOOWEAK);
1212 svcerr_noprog(const SVCXPRT *xprt)
1218 rply.acpted_rply.ar_verf = xprt->xp_verf;
1220 SVC_REPLY((SVCXPRT *)xprt, &rply);
1227 svcerr_progvers(const SVCXPRT *xprt, const rpcvers_t low_vers,
1234 rply.acpted_rply.ar_verf = xprt->xp_verf;
1238 SVC_REPLY((SVCXPRT *)xprt, &rply);
1325 SVCXPRT *xprt;
1352 * xprt associated with the fd that had the original read event.
1354 if ((fd >= nsvc_xports) || (xprt = svc_xports[fd]) == NULL) {
1360 msg = SVCEXT(xprt)->msg;
1362 r = SVCEXT(xprt)->req;
1364 cred_area = SVCEXT(xprt)->cred_area;
1373 if (dispatch = SVC_RECV(xprt, msg))
1374 (void) _svc_prog_dispatch(xprt, msg, r);
1376 * Check if the xprt has been disconnected in a recursive call
1380 if (xprt != svc_xports[fd]) {
1390 (*__proc_cleanup_cb)(xprt);
1392 if ((stat = SVC_STAT(xprt)) == XPRT_DIED) {
1393 SVC_DESTROY(xprt);
1400 _svc_prog_dispatch(SVCXPRT *xprt, struct rpc_msg *msg, struct svc_req *r)
1409 r->rq_xprt = xprt;
1430 svcerr_auth(xprt, why);
1445 if ((xprt->xp_netid == NULL) ||
1447 (strcmp(xprt->xp_netid,
1451 disp_fn(r, xprt);
1470 if (!version_keepquiet(xprt))
1471 svcerr_progvers(xprt, low_vers, high_vers);
1473 svcerr_noprog(xprt);
1486 SVCXPRT *xprt = NULL;
1493 if ((xprt = calloc(1, sizeof (SVCXPRT))) == NULL)
1498 xprt->xp_p3 = (caddr_t)xt; /* SVCEXT(xprt) = xt */
1503 xlist->xprt = xprt;
1518 (void) mutex_init(&svc_send_mutex(xprt), USYNC_THREAD, (void *)0);
1519 return (xprt);
1522 svc_xprt_free(xprt);
1531 svc_xprt_free(SVCXPRT *xprt)
1534 SVCXPRT_EXT *xt = xprt ? SVCEXT(xprt) : NULL;
1540 if (xprt)
1541 free(xprt);
1556 * svc_xprt_destroy() - free parent and child xprt list
1559 svc_xprt_destroy(SVCXPRT *xprt)
1565 if (SVCEXT(xprt)->parent)
1567 xprt = SVCEXT(xprt)->parent;
1569 type = svc_type(xprt);
1571 for (xlist = SVCEXT(xprt)->my_xlist; xlist != NULL; xlist = xnext) {
1573 xprt = xlist->xprt;
1576 svc_dg_xprtfree(xprt);
1579 svc_vc_xprtfree(xprt);
1582 svc_fd_xprtfree(xprt);
1585 svc_door_xprtfree(xprt);
1596 svc_copy(SVCXPRT *xprt)
1599 switch (svc_type(xprt)) {
1601 return (svc_dg_xprtcopy(xprt));
1603 return (svc_vc_xprtcopy(xprt));
1605 return (svc_fd_xprtcopy(xprt));
1615 _svc_destroy_private(SVCXPRT *xprt)
1618 switch (svc_type(xprt)) {
1620 _svc_dg_destroy_private(xprt);
1624 _svc_vc_destroy_private(xprt, TRUE);
1636 svc_get_local_cred(SVCXPRT *xprt, svc_local_cred_t *lcred)
1639 if (svc_type(xprt) == SVC_DOOR)
1640 return (__svc_get_door_cred(xprt, lcred));
1641 return (__rpc_get_local_cred(xprt, lcred));
1660 /* dupcache header contains xprt specific information */
1704 if (*xprt_cache != NULL) { /* do only once per xprt */