Lines Matching defs:xprt

40  * There are two sets of procedures here.  The xprt routines are
571 __svc_get_svcauth(SVCXPRT *xprt)
574 return (&SVC_XP_AUTH(xprt));
739 xprt_register(const SVCXPRT *xprt)
741 int fd = xprt->xp_fd;
788 svc_xports[fd] = (SVCXPRT *)xprt;
827 __xprt_unregister_private(const SVCXPRT *xprt, bool_t lock_not_held)
829 int fd = xprt->xp_fd;
833 if ((fd < nsvc_xports) && (svc_xports[fd] == xprt)) {
839 __svc_rm_from_xlist(&_svc_xprtlist, xprt, &xprtlist_lock);
843 xprt_unregister(const SVCXPRT *xprt)
845 __xprt_unregister_private(xprt, TRUE);
856 svc_reg(const SVCXPRT *xprt, const rpcprog_t prog, const rpcvers_t vers,
867 if (xprt->xp_netid) {
868 netid = strdup(xprt->xp_netid);
873 } else if ((tnconf = __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type))
913 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
914 if ((((SVCXPRT *)xprt)->xp_netid = strdup(netid)) == NULL) {
928 return (rpcb_set(prog, vers, nconf, &xprt->xp_ltaddr));
968 svc_register(SVCXPRT *xprt, rpcprog_t prog, rpcvers_t vers,
977 if (xprt->xp_netid) {
978 netid = strdup(xprt->xp_netid);
980 } else if ((ioctl(xprt->xp_fd, I_FIND, "timod") > 0) && ((nconf =
981 __rpcfd_to_nconf(xprt->xp_fd, xprt->xp_type)) != NULL)) {
1014 if ((xprt->xp_netid == NULL) && (flag == 1) && netid)
1015 if ((xprt->xp_netid = strdup(netid)) == NULL) {
1028 return (pmap_set(prog, vers, protocol, xprt->xp_port));
1094 svc_sendreply(const SVCXPRT *xprt, const xdrproc_t xdr_results,
1101 rply.acpted_rply.ar_verf = xprt->xp_verf;
1105 return (SVC_REPLY((SVCXPRT *)xprt, &rply));
1112 svcerr_noproc(const SVCXPRT *xprt)
1118 rply.acpted_rply.ar_verf = xprt->xp_verf;
1120 SVC_REPLY((SVCXPRT *)xprt, &rply);
1127 svcerr_decode(const SVCXPRT *xprt)
1133 rply.acpted_rply.ar_verf = xprt->xp_verf;
1135 SVC_REPLY((SVCXPRT *)xprt, &rply);
1142 svcerr_systemerr(const SVCXPRT *xprt)
1148 rply.acpted_rply.ar_verf = xprt->xp_verf;
1150 SVC_REPLY((SVCXPRT *)xprt, &rply);
1160 __svc_versquiet_on(const SVCXPRT *xprt)
1163 svc_flags(xprt) |= SVC_VERSQUIET;
1167 __svc_versquiet_off(const SVCXPRT *xprt)
1170 svc_flags(xprt) &= ~SVC_VERSQUIET;
1174 svc_versquiet(const SVCXPRT *xprt)
1176 __svc_versquiet_on(xprt);
1180 __svc_versquiet_get(const SVCXPRT *xprt)
1183 return (svc_flags(xprt) & SVC_VERSQUIET);
1190 svcerr_auth(const SVCXPRT *xprt, const enum auth_stat why)
1198 SVC_REPLY((SVCXPRT *)xprt, &rply);
1205 svcerr_weakauth(const SVCXPRT *xprt)
1207 svcerr_auth(xprt, AUTH_TOOWEAK);
1214 svcerr_noprog(const SVCXPRT *xprt)
1220 rply.acpted_rply.ar_verf = xprt->xp_verf;
1222 SVC_REPLY((SVCXPRT *)xprt, &rply);
1229 svcerr_progvers(const SVCXPRT *xprt, const rpcvers_t low_vers,
1236 rply.acpted_rply.ar_verf = xprt->xp_verf;
1240 SVC_REPLY((SVCXPRT *)xprt, &rply);
1327 SVCXPRT *xprt;
1354 * xprt associated with the fd that had the original read event.
1356 if ((fd >= nsvc_xports) || (xprt = svc_xports[fd]) == NULL) {
1362 msg = SVCEXT(xprt)->msg;
1364 r = SVCEXT(xprt)->req;
1366 cred_area = SVCEXT(xprt)->cred_area;
1375 if (dispatch = SVC_RECV(xprt, msg))
1376 (void) _svc_prog_dispatch(xprt, msg, r);
1378 * Check if the xprt has been disconnected in a recursive call
1382 if (xprt != svc_xports[fd]) {
1392 (*__proc_cleanup_cb)(xprt);
1394 if ((stat = SVC_STAT(xprt)) == XPRT_DIED) {
1395 SVC_DESTROY(xprt);
1402 _svc_prog_dispatch(SVCXPRT *xprt, struct rpc_msg *msg, struct svc_req *r)
1411 r->rq_xprt = xprt;
1432 svcerr_auth(xprt, why);
1447 if ((xprt->xp_netid == NULL) ||
1449 (strcmp(xprt->xp_netid,
1453 disp_fn(r, xprt);
1472 if (!version_keepquiet(xprt))
1473 svcerr_progvers(xprt, low_vers, high_vers);
1475 svcerr_noprog(xprt);
1488 SVCXPRT *xprt = NULL;
1495 if ((xprt = calloc(1, sizeof (SVCXPRT))) == NULL)
1500 xprt->xp_p3 = (caddr_t)xt; /* SVCEXT(xprt) = xt */
1505 xlist->xprt = xprt;
1520 (void) mutex_init(&svc_send_mutex(xprt), USYNC_THREAD, (void *)0);
1521 return (xprt);
1524 svc_xprt_free(xprt);
1533 svc_xprt_free(SVCXPRT *xprt)
1536 SVCXPRT_EXT *xt = xprt ? SVCEXT(xprt) : NULL;
1542 if (xprt)
1543 free(xprt);
1558 * svc_xprt_destroy() - free parent and child xprt list
1561 svc_xprt_destroy(SVCXPRT *xprt)
1567 if (SVCEXT(xprt)->parent)
1569 xprt = SVCEXT(xprt)->parent;
1571 type = svc_type(xprt);
1573 for (xlist = SVCEXT(xprt)->my_xlist; xlist != NULL; xlist = xnext) {
1575 xprt = xlist->xprt;
1578 svc_dg_xprtfree(xprt);
1581 svc_vc_xprtfree(xprt);
1584 svc_fd_xprtfree(xprt);
1587 svc_door_xprtfree(xprt);
1598 svc_copy(SVCXPRT *xprt)
1601 switch (svc_type(xprt)) {
1603 return (svc_dg_xprtcopy(xprt));
1605 return (svc_vc_xprtcopy(xprt));
1607 return (svc_fd_xprtcopy(xprt));
1617 _svc_destroy_private(SVCXPRT *xprt)
1620 switch (svc_type(xprt)) {
1622 _svc_dg_destroy_private(xprt);
1626 _svc_vc_destroy_private(xprt, TRUE);
1638 svc_get_local_cred(SVCXPRT *xprt, svc_local_cred_t *lcred)
1641 if (svc_type(xprt) == SVC_DOOR)
1642 return (__svc_get_door_cred(xprt, lcred));
1643 return (__rpc_get_local_cred(xprt, lcred));
1662 /* dupcache header contains xprt specific information */
1706 if (*xprt_cache != NULL) { /* do only once per xprt */