Lines Matching defs:pdomb

234 	struct dom_binding *pdomb;
238 for (pdomb = bound_domains; pdomb != NULL; pdomb = pdomb->dom_pnext) {
240 if (strcmp(domain, pdomb->dom_domain) == 0) {
250 *binding = pdomb;
261 pdomb = load_dom_binding(ypbind_resp, domain, &status);
262 if (pdomb == 0)
264 *binding = pdomb;
288 struct dom_binding *pdomb;
323 pdomb = load_dom_binding(&resp, domain, &status);
326 return (pdomb != 0);
370 struct dom_binding *pdomb;
372 pdomb = NULL;
374 if ((pdomb = malloc(sizeof (struct dom_binding))) == NULL) {
380 pdomb->dom_binding = ypbind_res->ypbind_resp_u.ypbind_bindinfo;
384 pdomb->dom_client = clnt_tli_create(RPC_ANYFD,
385 pdomb->dom_binding->ypbind_nconf,
386 pdomb->dom_binding->ypbind_svcaddr,
389 if (pdomb->dom_client == NULL) {
391 free(pdomb);
399 pdomb->dom_pnext = bound_domains; /* Link this to the list as */
400 pdomb->dom_domain = malloc(strlen(domain) + (unsigned)1);
401 if (pdomb->dom_domain == NULL) {
402 clnt_destroy(pdomb->dom_client);
403 free(pdomb);
411 pdomb->cache_bad = 0;
412 set_rdev(pdomb);
413 if (clnt_control(pdomb->dom_client, CLGET_FD, (char *)&fd))
416 (void) strcpy(pdomb->dom_domain, domain); /* Remember the domain name */
417 pdomb->ref_count = 0;
418 pdomb->need_free = 0;
419 (void) mutex_init(&pdomb->server_name_lock, USYNC_THREAD, 0);
420 bound_domains = pdomb; /* ... the head entry */
421 return (pdomb);
468 struct dom_binding *pdomb;
471 pdomb = NULL;
473 if ((pdomb = malloc(sizeof (struct dom_binding))) == NULL) {
479 pdomb->dom_binding = dom_binding;
483 fd = tli_open_rsvdport(pdomb->dom_binding->ypbind_nconf);
486 free(pdomb);
490 pdomb->dom_client = clnt_tli_create(fd,
491 pdomb->dom_binding->ypbind_nconf,
492 pdomb->dom_binding->ypbind_svcaddr,
495 if (pdomb->dom_client == NULL) {
497 free(pdomb);
504 (void) CLNT_CONTROL(pdomb->dom_client, CLSET_FD_CLOSE, NULL);
506 pdomb->dom_domain = malloc(strlen(domain) + (unsigned)1);
507 if (pdomb->dom_domain == NULL) {
508 clnt_destroy(pdomb->dom_client);
509 free(pdomb);
514 (void) strcpy(pdomb->dom_domain, domain); /* Remember the domain name */
515 pdomb->ref_count = 0;
516 pdomb->need_free = 0;
517 set_rdev(pdomb);
518 (void) mutex_init(&pdomb->server_name_lock, USYNC_THREAD, 0);
519 return (pdomb);
541 struct dom_binding *pdomb; /* Ptr to new domain binding */
641 pdomb = load_dom_binding(ypbind_resp, domain, &status);
642 if (pdomb == 0) {
649 pdomb->ref_count += 1;
651 *binding = pdomb; /* Return ptr to the binding entry */
710 struct dom_binding *pdomb; /* Ptr to new domain binding */
740 pdomb = load_dom_binding_rsvdport(
743 if (pdomb == 0) {
747 pdomb->ref_count += 1;
749 *binding = pdomb; /* Return ptr to the binding entry */
795 pdomb = load_dom_binding_rsvdport(
798 if (pdomb == 0) {
805 pdomb->ref_count += 1;
807 *binding = pdomb; /* Return ptr to the binding entry */
1170 set_rdev(struct dom_binding *pdomb)
1175 if (clnt_control(pdomb->dom_client, CLGET_FD, (char *)&fd) != TRUE ||
1178 pdomb->fd = -1;
1181 pdomb->fd = fd;
1182 pdomb->rdev = stbuf.st_rdev;
1186 check_rdev(struct dom_binding *pdomb)
1190 if (pdomb->fd == -1)
1193 if (fstat(pdomb->fd, &stbuf) == -1) {
1194 syslog(LOG_DEBUG, "yp_bind client: can't stat %d", pdomb->fd);
1197 clnt_control(pdomb->dom_client, CLSET_FD_NCLOSE, NULL);
1200 if (pdomb->rdev != stbuf.st_rdev) {
1203 pdomb->fd, pdomb->rdev, stbuf.st_rdev);
1205 clnt_control(pdomb->dom_client, CLSET_FD_NCLOSE, NULL);