Lines Matching full:client

94 static CLIENT *getclnthandle(const char *, const struct netconfig *, char **);
95 static CLIENT *local_rpcb(void);
263 * This routine will return a client handle that is connected to the
269 static CLIENT *
272 CLIENT *client; in getclnthandle() local
283 client = NULL; in getclnthandle()
291 client = clnt_tli_create(RPC_ANYFD, nconf, addr, in getclnthandle()
293 if (client != NULL) { in getclnthandle()
297 return (client); in getclnthandle()
334 client = local_rpcb(); in getclnthandle()
335 if (! client) { in getclnthandle()
345 CLNT_DESTROY(client); in getclnthandle()
351 return (client); in getclnthandle()
386 client = clnt_tli_create(RPC_ANYFD, nconf, &taddr, in getclnthandle()
389 if (! client) { in getclnthandle()
394 if (client) { in getclnthandle()
404 return (client); in getclnthandle()
412 * This routine will return a client handle that is connected to the local
415 static CLIENT *
418 CLIENT *client; in local_rpcb() local
442 client = clnt_vc_create(sock, &nbuf, (rpcprog_t)RPCBPROG, in local_rpcb()
445 if (client != NULL) { in local_rpcb()
447 (void) CLNT_CONTROL(client, CLSET_FD_CLOSE, NULL); in local_rpcb()
448 return client; in local_rpcb()
506 client = getclnthandle(hostname, loopnconf, NULL); in local_rpcb()
507 return (client); in local_rpcb()
521 CLIENT *client; in rpcb_set() local
535 client = local_rpcb(); in rpcb_set()
536 if (! client) { in rpcb_set()
545 CLNT_DESTROY(client); in rpcb_set()
560 CLNT_CALL(client, (rpcproc_t)RPCBPROC_SET, (xdrproc_t) xdr_rpcb, in rpcb_set()
564 CLNT_DESTROY(client); in rpcb_set()
578 CLIENT *client; in rpcb_unset() local
583 client = local_rpcb(); in rpcb_unset()
584 if (! client) { in rpcb_unset()
601 CLNT_CALL(client, (rpcproc_t)RPCBPROC_UNSET, (xdrproc_t) xdr_rpcb, in rpcb_unset()
605 CLNT_DESTROY(client); in rpcb_unset()
682 * returns the client handle that it uses to contact the remote rpcbind.
693 * XXX: Due to some problems with t_connect(), we do not reuse the same client
695 * client handle. This code will change if t_connect() ever
701 CLIENT **clpp, struct timeval *tp) in __rpcb_findaddr_timed()
704 CLIENT *client = NULL; in __rpcb_findaddr_timed() local
756 client = getclnthandle(host, newnconf, &parms.r_addr); in __rpcb_findaddr_timed()
760 client = getclnthandle(host, nconf, &parms.r_addr); in __rpcb_findaddr_timed()
761 if (client == NULL) in __rpcb_findaddr_timed()
767 CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *)&rpcbrmttime); in __rpcb_findaddr_timed()
768 CLNT_CONTROL(client, CLSET_VERS, (char *)&pmapvers); in __rpcb_findaddr_timed()
775 clnt_st = CLNT_CALL(client, (rpcproc_t)PMAPPROC_GETPORT, in __rpcb_findaddr_timed()
784 clnt_geterr(client, &rpc_createerr.cf_error); in __rpcb_findaddr_timed()
792 CLNT_CONTROL(client, CLGET_SVC_ADDR, (char *)&remote); in __rpcb_findaddr_timed()
798 clnt_geterr(client, &rpc_createerr.cf_error); in __rpcb_findaddr_timed()
849 if (client == NULL) { in __rpcb_findaddr_timed()
858 client = getclnthandle(host, nconf_clts, in __rpcb_findaddr_timed()
864 if (client == NULL) in __rpcb_findaddr_timed()
869 CLNT_CONTROL(client, CLSET_VERS, (char *)(void *)&vers); in __rpcb_findaddr_timed()
880 CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *)&rpcbrmttime); in __rpcb_findaddr_timed()
882 clnt_st = CLNT_CALL(client, (rpcproc_t)RPCBPROC_GETADDRLIST, in __rpcb_findaddr_timed()
890 CLNT_CONTROL(client, CLGET_SVC_ADDR, in __rpcb_findaddr_timed()
911 clnt_geterr(client, &rpc_createerr.cf_error); in __rpcb_findaddr_timed()
919 if (client && ((nconf->nc_semantics == NC_TPI_COTS_ORD) || in __rpcb_findaddr_timed()
921 /* A CLTS type of client - destroy it */ in __rpcb_findaddr_timed()
922 CLNT_DESTROY(client); in __rpcb_findaddr_timed()
923 client = NULL; in __rpcb_findaddr_timed()
926 if (client == NULL) { in __rpcb_findaddr_timed()
927 client = getclnthandle(host, nconf, &parms.r_addr); in __rpcb_findaddr_timed()
928 if (client == NULL) { in __rpcb_findaddr_timed()
939 CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *) &rpcbrmttime); in __rpcb_findaddr_timed()
942 CLNT_CONTROL(client, CLSET_VERS, (char *)(void *)&vers); in __rpcb_findaddr_timed()
943 clnt_st = CLNT_CALL(client, (rpcproc_t)RPCBPROC_GETADDR, in __rpcb_findaddr_timed()
967 CLNT_CONTROL(client, CLGET_SVC_ADDR, in __rpcb_findaddr_timed()
974 clnt_geterr(client, &rpcerr); in __rpcb_findaddr_timed()
980 clnt_geterr(client, &rpc_createerr.cf_error); in __rpcb_findaddr_timed()
986 if (client) { in __rpcb_findaddr_timed()
987 CLNT_DESTROY(client); in __rpcb_findaddr_timed()
988 client = NULL; in __rpcb_findaddr_timed()
992 /* This client is the connectionless one */ in __rpcb_findaddr_timed()
993 if (client) { in __rpcb_findaddr_timed()
994 CLNT_DESTROY(client); in __rpcb_findaddr_timed()
995 client = NULL; in __rpcb_findaddr_timed()
999 *clpp = client; in __rpcb_findaddr_timed()
1000 } else if (client) { in __rpcb_findaddr_timed()
1001 CLNT_DESTROY(client); in __rpcb_findaddr_timed()
1025 (CLIENT **) NULL, (struct timeval *) NULL)) == NULL) in rpcb_getaddr()
1053 CLIENT *client; in rpcb_getmaps() local
1057 client = getclnthandle(host, nconf, NULL); in rpcb_getmaps()
1058 if (client == NULL) { in rpcb_getmaps()
1061 clnt_st = CLNT_CALL(client, (rpcproc_t)RPCBPROC_DUMP, in rpcb_getmaps()
1070 clnt_geterr(client, &rpc_createerr.cf_error); in rpcb_getmaps()
1075 CLNT_CONTROL(client, CLGET_VERS, (char *)(void *)&vers); in rpcb_getmaps()
1078 CLNT_CONTROL(client, CLSET_VERS, (char *)(void *)&vers); in rpcb_getmaps()
1079 if (CLNT_CALL(client, (rpcproc_t)RPCBPROC_DUMP, in rpcb_getmaps()
1085 clnt_geterr(client, &rpc_createerr.cf_error); in rpcb_getmaps()
1088 CLNT_DESTROY(client); in rpcb_getmaps()
1113 CLIENT *client; in rpcb_rmtcall() local
1120 client = getclnthandle(host, nconf, NULL); in rpcb_rmtcall()
1121 if (client == NULL) { in rpcb_rmtcall()
1125 CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, (char *)(void *)&rmttimeout); in rpcb_rmtcall()
1136 CLNT_CONTROL(client, CLSET_VERS, (char *)(void *)&rpcb_vers); in rpcb_rmtcall()
1137 stat = CLNT_CALL(client, (rpcproc_t)RPCBPROC_CALLIT, in rpcb_rmtcall()
1171 CLNT_DESTROY(client); in rpcb_rmtcall()
1184 CLIENT *client = NULL; in rpcb_gettime() local
1201 while (client == NULL) { in rpcb_gettime()
1207 client = getclnthandle(host, nconf, NULL); in rpcb_gettime()
1208 if (client) in rpcb_gettime()
1212 if (client == (CLIENT *) NULL) { in rpcb_gettime()
1216 st = CLNT_CALL(client, (rpcproc_t)RPCBPROC_GETTIME, in rpcb_gettime()
1221 CLNT_CONTROL(client, CLGET_VERS, (char *)(void *)&vers); in rpcb_gettime()
1225 CLNT_CONTROL(client, CLSET_VERS, (char *)(void *)&vers); in rpcb_gettime()
1226 st = CLNT_CALL(client, (rpcproc_t)RPCBPROC_GETTIME, in rpcb_gettime()
1232 CLNT_DESTROY(client); in rpcb_gettime()
1243 CLIENT *client; in rpcb_taddr2uaddr() local
1256 client = local_rpcb(); in rpcb_taddr2uaddr()
1257 if (! client) { in rpcb_taddr2uaddr()
1261 CLNT_CALL(client, (rpcproc_t)RPCBPROC_TADDR2UADDR, in rpcb_taddr2uaddr()
1264 CLNT_DESTROY(client); in rpcb_taddr2uaddr()
1275 CLIENT *client; in rpcb_uaddr2taddr() local
1288 client = local_rpcb(); in rpcb_uaddr2taddr()
1289 if (! client) { in rpcb_uaddr2taddr()
1295 CLNT_DESTROY(client); in rpcb_uaddr2taddr()
1298 if (CLNT_CALL(client, (rpcproc_t)RPCBPROC_UADDR2TADDR, in rpcb_uaddr2taddr()
1305 CLNT_DESTROY(client); in rpcb_uaddr2taddr()