Lines Matching refs:resp

104 static int multihomed(struct ypreq_key req, struct ypresp_val *resp,
106 static int omultihomed(struct yprequest req, struct ypresponse *resp,
196 struct ypresp_val resp; in ypmatch() local
201 memset(&resp, 0, sizeof (resp)); in ypmatch()
202 resp.status = (unsigned)YP_NOKEY; in ypmatch()
214 &resp.status)) != NULL && in ypmatch()
215 yp_map_access(transp, &resp.status, fdb)) { in ypmatch()
218 resp.valdat = dbm_fetch(fdb, req.keydat); in ypmatch()
219 if (resp.valdat.dptr != NULL) { in ypmatch()
220 resp.status = YP_TRUE; in ypmatch()
223 fun, resp.valdat.dptr); in ypmatch()
243 if (multiflag == TRUE && multihomed(req, &resp, transp, fdb)) in ypmatch()
246 if (multihomed(req, &resp, transp, fdb)) in ypmatch()
284 (caddr_t)&resp)) { in ypmatch()
304 struct ypresp_key_val resp; in ypfirst() local
309 memset(&resp, 0, sizeof (resp)); in ypfirst()
319 &resp.status)) != NULL && in ypfirst()
320 yp_map_access(transp, &resp.status, fdb)) { in ypfirst()
322 &resp.keydat, &resp.valdat, &resp.status, FALSE); in ypfirst()
327 (char *)&resp)) { in ypfirst()
344 struct ypresp_key_val resp; in ypnext() local
349 memset(&resp, 0, sizeof (resp)); in ypnext()
357 &resp.status)) != NULL && in ypnext()
358 yp_map_access(transp, &resp.status, fdb)) { in ypnext()
360 &resp.keydat, &resp.valdat, &resp.status, FALSE); in ypnext()
365 (char *)&resp)) { in ypnext()
387 struct ypresp_val resp; /* not returned to the caller */ in ypxfr() local
465 if ((fdb = ypset_current_map(pmap, pdomain, &resp.status)) != NULL && in ypxfr()
466 yp_map_access(transp, &resp.status, fdb)) { in ypxfr()
512 struct ypresp_val resp; /* not returned to the caller */ in ypall() local
550 req.domain, &resp.status)) != NULL && in ypall()
551 !yp_map_access(transp, &resp.status, fdb)) { in ypall()
593 struct ypresp_master resp; in ypmaster() local
599 resp.master = nullstring; in ypmaster()
600 resp.status = YP_TRUE; in ypmaster()
610 req.domain, &resp.status)) != NULL && in ypmaster()
611 yp_map_access(transp, &resp.status, fdb)) { in ypmaster()
613 if (!ypget_map_master(&resp.master, fdb)) { in ypmaster()
614 resp.status = (unsigned)YP_BADDB; in ypmaster()
620 (char *)&resp)) { in ypmaster()
638 struct ypresp_order resp; in yporder() local
643 resp.status = YP_TRUE; in yporder()
644 resp.ordernum = 0; in yporder()
655 resp.ordernum = 0; in yporder()
659 &resp.status)) != NULL && in yporder()
660 yp_map_access(transp, &resp.status, fdb)) { in yporder()
662 if (!ypget_map_order(req.map, req.domain, &resp.ordernum)) { in yporder()
663 resp.status = (unsigned)YP_BADDB; in yporder()
669 (char *)&resp)) { in yporder()
793 struct ypresp_key_val resp; in xdrypserv_ypall() local
796 resp.keydat.dptr = resp.valdat.dptr = (char *)NULL; in xdrypserv_ypall()
797 resp.keydat.dsize = resp.valdat.dsize = 0; in xdrypserv_ypall()
800 &resp.status)) != NULL) { in xdrypserv_ypall()
801 ypfilter(fdb, (datum *) NULL, &resp.keydat, &resp.valdat, in xdrypserv_ypall()
802 &resp.status, FALSE); in xdrypserv_ypall()
804 while (resp.status == YP_TRUE) { in xdrypserv_ypall()
809 if (!xdr_ypresp_key_val(xdrs, &resp)) { in xdrypserv_ypall()
813 ypfilter(fdb, &resp.keydat, &resp.keydat, &resp.valdat, in xdrypserv_ypall()
814 &resp.status, FALSE); in xdrypserv_ypall()
822 if (!xdr_ypresp_key_val(xdrs, &resp)) { in xdrypserv_ypall()
845 multihomed(struct ypreq_key req, struct ypresp_val *resp, in multihomed() argument
866 resp->valdat = dbm_fetch(fdb, tmpname); in multihomed()
872 resp->valdat = dbm_fetch(fdb, req.keydat); in multihomed()
873 if (resp->valdat.dptr != NULL) in multihomed()
877 if (resp->valdat.dptr == NULL) in multihomed()
897 if ((buf = strdup(resp->valdat.dptr)) == NULL) /* no memory */ in multihomed()
924 resp->valdat.dptr = localbuf; in multihomed()
925 resp->valdat.dsize = strlen(localbuf); in multihomed()
930 if (resp->valdat.dsize && in multihomed()
931 resp->valdat.dptr[resp->valdat.dsize-1] == '\n') { in multihomed()
932 resp->valdat.dptr[resp->valdat.dsize-1] = '\0'; in multihomed()
933 resp->valdat.dsize -= 1; in multihomed()
936 resp->status = YP_TRUE; in multihomed()
954 cp = resp->valdat.dptr; in multihomed()
969 cp = resp->valdat.dptr; in multihomed()
971 resp->valdat.dsize = strlen(cp); in multihomed()
973 resp->status = YP_TRUE; in multihomed()
985 struct ypresponse resp; in ypoldmatch() local
990 memset((void *) &resp, 0, sizeof (resp)); in ypoldmatch()
1000 resp.ypmatch_resp_status = (unsigned)YP_BADARGS; in ypoldmatch()
1007 &resp.ypmatch_resp_status)) in ypoldmatch()
1010 &resp.ypmatch_resp_status, in ypoldmatch()
1014 resp.ypmatch_resp_valdat = dbm_fetch(fdb, in ypoldmatch()
1017 if (resp.ypmatch_resp_valptr != NULL) { in ypoldmatch()
1018 resp.ypmatch_resp_status = YP_TRUE; in ypoldmatch()
1021 fun, resp.ypmatch_resp_valptr); in ypoldmatch()
1041 if (multiflag == TRUE && omultihomed(req, &resp, transp, fdb)) in ypoldmatch()
1044 if (omultihomed(req, &resp, transp, fdb)) in ypoldmatch()
1079 (caddr_t)&resp)) { in ypoldmatch()
1095 struct ypresponse resp; in ypoldfirst() local
1100 memset((void *) &resp, 0, sizeof (resp)); in ypoldfirst()
1110 resp.ypfirst_resp_status = (unsigned)YP_BADARGS; in ypoldfirst()
1117 &resp.ypfirst_resp_status)) in ypoldfirst()
1120 &resp.ypfirst_resp_status, in ypoldfirst()
1123 resp.ypfirst_resp_keydat = dbm_firstkey(fdb); in ypoldfirst()
1125 if (resp.ypfirst_resp_keyptr != NULL) { in ypoldfirst()
1126 resp.ypfirst_resp_valdat = in ypoldfirst()
1127 dbm_fetch(fdb, resp.ypfirst_resp_keydat); in ypoldfirst()
1129 if (resp.ypfirst_resp_valptr != NULL) { in ypoldfirst()
1130 resp.ypfirst_resp_status = YP_TRUE; in ypoldfirst()
1132 resp.ypfirst_resp_status = (unsigned)YP_BADDB; in ypoldfirst()
1135 resp.ypfirst_resp_status = (unsigned)YP_NOKEY; in ypoldfirst()
1139 resp.yp_resptype = YPFIRST_RESPTYPE; in ypoldfirst()
1143 (caddr_t)&resp)) { in ypoldfirst()
1159 struct ypresponse resp; in ypoldnext() local
1164 memset((void *) &resp, 0, sizeof (resp)); in ypoldnext()
1174 resp.ypnext_resp_status = (unsigned)YP_BADARGS; in ypoldnext()
1181 &resp.ypnext_resp_status)) != NULL && in ypoldnext()
1182 yp_map_access(transp, &resp.ypnext_resp_status, fdb))) { in ypoldnext()
1184 resp.ypnext_resp_keydat = dbm_nextkey(fdb); in ypoldnext()
1186 if (resp.ypnext_resp_keyptr != NULL) { in ypoldnext()
1187 resp.ypnext_resp_valdat = in ypoldnext()
1188 dbm_fetch(fdb, resp.ypnext_resp_keydat); in ypoldnext()
1190 if (resp.ypnext_resp_valptr != NULL) { in ypoldnext()
1191 resp.ypnext_resp_status = YP_TRUE; in ypoldnext()
1193 resp.ypnext_resp_status = (unsigned)YP_BADDB; in ypoldnext()
1196 resp.ypnext_resp_status = (unsigned)YP_NOMORE; in ypoldnext()
1200 resp.yp_resptype = YPNEXT_RESPTYPE; in ypoldnext()
1204 (caddr_t)&resp)) { in ypoldnext()
1226 struct ypresponse resp; in ypoldpoll() local
1235 memset((void *) &resp, 0, sizeof (resp)); in ypoldpoll()
1260 &resp.yppoll_resp_ordernum); in ypoldpoll()
1275 resp.yp_resptype = YPPOLL_RESPTYPE; in ypoldpoll()
1276 resp.yppoll_resp_domain = domain; in ypoldpoll()
1277 resp.yppoll_resp_map = map; in ypoldpoll()
1278 resp.yppoll_resp_owner = owner; in ypoldpoll()
1282 (caddr_t)&resp)) { in ypoldpoll()
1297 struct ypresp_val resp; in ypoldpush() local
1313 &resp.status)) != NULL) && in ypoldpush()
1314 (yp_map_access(transp, &resp.status, fdb))) { in ypoldpush()
1348 struct ypresp_val resp; in ypoldpull() local
1366 &resp.status)) == NULL) || in ypoldpull()
1367 (yp_map_access(transp, &resp.status, fdb))) { in ypoldpull()
1396 struct ypresp_val resp; in ypoldget() local
1418 &resp.status)) == NULL) || in ypoldget()
1419 (yp_map_access(transp, &resp.status, fdb))) { in ypoldget()
1450 struct ypresponse *resp, SVCXPRT *xprt, DBM *fdb) in omultihomed() argument
1468 resp->ypmatch_resp_valdat = dbm_fetch(fdb, tmpname); in omultihomed()
1470 resp->ypmatch_resp_valdat = in omultihomed()
1472 if (resp->ypmatch_resp_valptr != NULL) in omultihomed()
1476 if (resp->ypmatch_resp_valptr == NULL) in omultihomed()
1497 cp = resp->ypmatch_resp_valptr; in omultihomed()
1513 cp = resp->ypmatch_resp_valptr; in omultihomed()
1515 resp->ypmatch_resp_valsize = strlen(cp); in omultihomed()
1517 resp->ypmatch_resp_status = YP_TRUE; in omultihomed()