Lines Matching refs:resp

105 static int multihomed(struct ypreq_key req, struct ypresp_val *resp,
107 static int omultihomed(struct yprequest req, struct ypresponse *resp,
197 struct ypresp_val resp; in ypmatch() local
202 memset(&resp, 0, sizeof (resp)); in ypmatch()
203 resp.status = (unsigned)YP_NOKEY; in ypmatch()
215 &resp.status)) != NULL && in ypmatch()
216 yp_map_access(transp, &resp.status, fdb)) { in ypmatch()
219 resp.valdat = dbm_fetch(fdb, req.keydat); in ypmatch()
220 if (resp.valdat.dptr != NULL) { in ypmatch()
221 resp.status = YP_TRUE; in ypmatch()
224 fun, resp.valdat.dptr); in ypmatch()
244 if (multiflag == TRUE && multihomed(req, &resp, transp, fdb)) in ypmatch()
247 if (multihomed(req, &resp, transp, fdb)) in ypmatch()
285 (caddr_t)&resp)) { in ypmatch()
305 struct ypresp_key_val resp; in ypfirst() local
310 memset(&resp, 0, sizeof (resp)); in ypfirst()
320 &resp.status)) != NULL && in ypfirst()
321 yp_map_access(transp, &resp.status, fdb)) { in ypfirst()
323 &resp.keydat, &resp.valdat, &resp.status, FALSE); in ypfirst()
328 (char *)&resp)) { in ypfirst()
345 struct ypresp_key_val resp; in ypnext() local
350 memset(&resp, 0, sizeof (resp)); in ypnext()
358 &resp.status)) != NULL && in ypnext()
359 yp_map_access(transp, &resp.status, fdb)) { in ypnext()
361 &resp.keydat, &resp.valdat, &resp.status, FALSE); in ypnext()
366 (char *)&resp)) { in ypnext()
388 struct ypresp_val resp; /* not returned to the caller */ in ypxfr() local
466 if ((fdb = ypset_current_map(pmap, pdomain, &resp.status)) != NULL && in ypxfr()
467 yp_map_access(transp, &resp.status, fdb)) { in ypxfr()
513 struct ypresp_val resp; /* not returned to the caller */ in ypall() local
551 req.domain, &resp.status)) != NULL && in ypall()
552 !yp_map_access(transp, &resp.status, fdb)) { in ypall()
594 struct ypresp_master resp; in ypmaster() local
600 resp.master = nullstring; in ypmaster()
601 resp.status = YP_TRUE; in ypmaster()
611 req.domain, &resp.status)) != NULL && in ypmaster()
612 yp_map_access(transp, &resp.status, fdb)) { in ypmaster()
614 if (!ypget_map_master(&resp.master, fdb)) { in ypmaster()
615 resp.status = (unsigned)YP_BADDB; in ypmaster()
621 (char *)&resp)) { in ypmaster()
639 struct ypresp_order resp; in yporder() local
644 resp.status = YP_TRUE; in yporder()
645 resp.ordernum = 0; in yporder()
656 resp.ordernum = 0; in yporder()
660 &resp.status)) != NULL && in yporder()
661 yp_map_access(transp, &resp.status, fdb)) { in yporder()
663 if (!ypget_map_order(req.map, req.domain, &resp.ordernum)) { in yporder()
664 resp.status = (unsigned)YP_BADDB; in yporder()
670 (char *)&resp)) { in yporder()
794 struct ypresp_key_val resp; in xdrypserv_ypall() local
797 resp.keydat.dptr = resp.valdat.dptr = (char *)NULL; in xdrypserv_ypall()
798 resp.keydat.dsize = resp.valdat.dsize = 0; in xdrypserv_ypall()
801 &resp.status)) != NULL) { in xdrypserv_ypall()
802 ypfilter(fdb, (datum *) NULL, &resp.keydat, &resp.valdat, in xdrypserv_ypall()
803 &resp.status, FALSE); in xdrypserv_ypall()
805 while (resp.status == YP_TRUE) { in xdrypserv_ypall()
810 if (!xdr_ypresp_key_val(xdrs, &resp)) { in xdrypserv_ypall()
814 ypfilter(fdb, &resp.keydat, &resp.keydat, &resp.valdat, in xdrypserv_ypall()
815 &resp.status, FALSE); in xdrypserv_ypall()
823 if (!xdr_ypresp_key_val(xdrs, &resp)) { in xdrypserv_ypall()
846 multihomed(struct ypreq_key req, struct ypresp_val *resp, in multihomed() argument
867 resp->valdat = dbm_fetch(fdb, tmpname); in multihomed()
873 resp->valdat = dbm_fetch(fdb, req.keydat); in multihomed()
874 if (resp->valdat.dptr != NULL) in multihomed()
878 if (resp->valdat.dptr == NULL) in multihomed()
898 if ((buf = strdup(resp->valdat.dptr)) == NULL) /* no memory */ in multihomed()
925 resp->valdat.dptr = localbuf; in multihomed()
926 resp->valdat.dsize = strlen(localbuf); in multihomed()
931 if (resp->valdat.dsize && in multihomed()
932 resp->valdat.dptr[resp->valdat.dsize-1] == '\n') { in multihomed()
933 resp->valdat.dptr[resp->valdat.dsize-1] = '\0'; in multihomed()
934 resp->valdat.dsize -= 1; in multihomed()
937 resp->status = YP_TRUE; in multihomed()
955 cp = resp->valdat.dptr; in multihomed()
970 cp = resp->valdat.dptr; in multihomed()
972 resp->valdat.dsize = strlen(cp); in multihomed()
974 resp->status = YP_TRUE; in multihomed()
986 struct ypresponse resp; in ypoldmatch() local
991 memset((void *) &resp, 0, sizeof (resp)); in ypoldmatch()
1001 resp.ypmatch_resp_status = (unsigned)YP_BADARGS; in ypoldmatch()
1008 &resp.ypmatch_resp_status)) in ypoldmatch()
1011 &resp.ypmatch_resp_status, in ypoldmatch()
1015 resp.ypmatch_resp_valdat = dbm_fetch(fdb, in ypoldmatch()
1018 if (resp.ypmatch_resp_valptr != NULL) { in ypoldmatch()
1019 resp.ypmatch_resp_status = YP_TRUE; in ypoldmatch()
1022 fun, resp.ypmatch_resp_valptr); in ypoldmatch()
1042 if (multiflag == TRUE && omultihomed(req, &resp, transp, fdb)) in ypoldmatch()
1045 if (omultihomed(req, &resp, transp, fdb)) in ypoldmatch()
1080 (caddr_t)&resp)) { in ypoldmatch()
1096 struct ypresponse resp; in ypoldfirst() local
1101 memset((void *) &resp, 0, sizeof (resp)); in ypoldfirst()
1111 resp.ypfirst_resp_status = (unsigned)YP_BADARGS; in ypoldfirst()
1118 &resp.ypfirst_resp_status)) in ypoldfirst()
1121 &resp.ypfirst_resp_status, in ypoldfirst()
1124 resp.ypfirst_resp_keydat = dbm_firstkey(fdb); in ypoldfirst()
1126 if (resp.ypfirst_resp_keyptr != NULL) { in ypoldfirst()
1127 resp.ypfirst_resp_valdat = in ypoldfirst()
1128 dbm_fetch(fdb, resp.ypfirst_resp_keydat); in ypoldfirst()
1130 if (resp.ypfirst_resp_valptr != NULL) { in ypoldfirst()
1131 resp.ypfirst_resp_status = YP_TRUE; in ypoldfirst()
1133 resp.ypfirst_resp_status = (unsigned)YP_BADDB; in ypoldfirst()
1136 resp.ypfirst_resp_status = (unsigned)YP_NOKEY; in ypoldfirst()
1140 resp.yp_resptype = YPFIRST_RESPTYPE; in ypoldfirst()
1144 (caddr_t)&resp)) { in ypoldfirst()
1160 struct ypresponse resp; in ypoldnext() local
1165 memset((void *) &resp, 0, sizeof (resp)); in ypoldnext()
1175 resp.ypnext_resp_status = (unsigned)YP_BADARGS; in ypoldnext()
1182 &resp.ypnext_resp_status)) != NULL && in ypoldnext()
1183 yp_map_access(transp, &resp.ypnext_resp_status, fdb))) { in ypoldnext()
1185 resp.ypnext_resp_keydat = dbm_nextkey(fdb); in ypoldnext()
1187 if (resp.ypnext_resp_keyptr != NULL) { in ypoldnext()
1188 resp.ypnext_resp_valdat = in ypoldnext()
1189 dbm_fetch(fdb, resp.ypnext_resp_keydat); in ypoldnext()
1191 if (resp.ypnext_resp_valptr != NULL) { in ypoldnext()
1192 resp.ypnext_resp_status = YP_TRUE; in ypoldnext()
1194 resp.ypnext_resp_status = (unsigned)YP_BADDB; in ypoldnext()
1197 resp.ypnext_resp_status = (unsigned)YP_NOMORE; in ypoldnext()
1201 resp.yp_resptype = YPNEXT_RESPTYPE; in ypoldnext()
1205 (caddr_t)&resp)) { in ypoldnext()
1227 struct ypresponse resp; in ypoldpoll() local
1236 memset((void *) &resp, 0, sizeof (resp)); in ypoldpoll()
1261 &resp.yppoll_resp_ordernum); in ypoldpoll()
1276 resp.yp_resptype = YPPOLL_RESPTYPE; in ypoldpoll()
1277 resp.yppoll_resp_domain = domain; in ypoldpoll()
1278 resp.yppoll_resp_map = map; in ypoldpoll()
1279 resp.yppoll_resp_owner = owner; in ypoldpoll()
1283 (caddr_t)&resp)) { in ypoldpoll()
1298 struct ypresp_val resp; in ypoldpush() local
1314 &resp.status)) != NULL) && in ypoldpush()
1315 (yp_map_access(transp, &resp.status, fdb))) { in ypoldpush()
1349 struct ypresp_val resp; in ypoldpull() local
1367 &resp.status)) == NULL) || in ypoldpull()
1368 (yp_map_access(transp, &resp.status, fdb))) { in ypoldpull()
1397 struct ypresp_val resp; in ypoldget() local
1419 &resp.status)) == NULL) || in ypoldget()
1420 (yp_map_access(transp, &resp.status, fdb))) { in ypoldget()
1451 struct ypresponse *resp, SVCXPRT *xprt, DBM *fdb) in omultihomed() argument
1469 resp->ypmatch_resp_valdat = dbm_fetch(fdb, tmpname); in omultihomed()
1471 resp->ypmatch_resp_valdat = in omultihomed()
1473 if (resp->ypmatch_resp_valptr != NULL) in omultihomed()
1477 if (resp->ypmatch_resp_valptr == NULL) in omultihomed()
1498 cp = resp->ypmatch_resp_valptr; in omultihomed()
1514 cp = resp->ypmatch_resp_valptr; in omultihomed()
1516 resp->ypmatch_resp_valsize = strlen(cp); in omultihomed()
1518 resp->ypmatch_resp_status = YP_TRUE; in omultihomed()