Lines Matching refs:head

512 	struct gai_statehead		*head;
533 make_resstate(isc_mem_t *mctx, gai_statehead_t *head, const char *hostname,
573 if (head->ai_family == AF_UNSPEC || head->ai_family == AF_INET)
575 if (head->ai_family == AF_UNSPEC || head->ai_family == AF_INET6)
609 state->head = head;
618 make_resstates(isc_mem_t *mctx, const char *hostname, gai_statehead_t *head,
627 result = make_resstate(mctx, head, hostname, ".", &resstate0);
635 result = make_resstate(mctx, head, hostname,
641 ISC_LIST_APPEND(head->resstates, resstate, link);
642 head->activestates++;
646 * Insert the original hostname either at the head or the tail of the
652 ISC_LIST_PREPEND(head->resstates, resstate0, link);
654 ISC_LIST_APPEND(head->resstates, resstate0, link);
655 head->activestates++;
658 while ((resstate = ISC_LIST_HEAD(head->resstates)) != NULL) {
659 ISC_LIST_UNLINK(head->resstates, resstate, link);
728 wantcname = ISC_TF((resstate->head->ai_flags & AI_CANONNAME) != 0);
773 ai->ai_socktype = resstate->head->ai_socktype;
790 resstate->head->ai_port;
802 resstate->head->ai_port;
821 dns_client_freeresanswer(resstate->head->dnsclient, &rev->answerlist);
845 resstate->head->activestates--;
846 if (resstate->head->activestates == 0) {
847 isc_app_ctxsuspend(resstate->head->actx);
852 * There are outstanding states, but if we are at the head
857 LOCK(&resstate->head->list_lock);
858 if (resstate == ISC_LIST_HEAD(resstate->head->resstates)) {
883 ISC_LIST_UNLINK(resstate->head->resstates,
885 ISC_LIST_APPEND(resstate->head->resstates,
889 UNLOCK(&resstate->head->list_lock);
907 gai_statehead_t head;
923 head.activestates = 0;
924 head.ai_family = family;
925 head.ai_socktype = socktype;
926 head.ai_flags = flags;
927 head.ai_port = port;
928 head.actx = actx;
929 head.dnsclient = client;
930 result = isc_mutex_init(&head.list_lock);
935 ISC_LIST_INIT(head.resstates);
936 result = make_resstates(mctx, hostname, &head, conf);
938 DESTROYLOCK(&head.list_lock);
942 LOCK(&head.list_lock);
943 for (resstate = ISC_LIST_HEAD(head.resstates);
976 UNLOCK(&head.list_lock);
985 while ((resstate = ISC_LIST_HEAD(head.resstates)) != NULL) {
988 ISC_LIST_UNLINK(head.resstates, resstate, link);
1049 DESTROYLOCK(&head.list_lock);