Lines Matching refs:req
133 #define ASSERT_VALID_REQUEST(req) \ argument
134 EVUTIL_ASSERT((req)->handle && (req)->handle->current_req == (req))
389 static void evdns_request_insert(struct request *req, struct request **head);
390 static void evdns_request_remove(struct request *req, struct request **head);
393 static int evdns_request_transmit(struct request *req);
396 static int search_try_next(struct evdns_request *const req);
401 static void request_submit(struct request *const req);
403 static int server_request_free(struct server_request *req);
404 static void server_request_free_answers(struct server_request *req);
480 struct request *req = REQ_HEAD(base, trans_id); in request_find_from_trans_id() local
481 struct request *const started_at = req; in request_find_from_trans_id()
485 if (req) { in request_find_from_trans_id()
487 if (req->trans_id == trans_id) return req; in request_find_from_trans_id()
488 req = req->next; in request_find_from_trans_id()
489 } while (req != started_at); in request_find_from_trans_id()
558 struct request *req, *started_at; in nameserver_failed() local
602 req = started_at = base->req_heads[i]; in nameserver_failed()
603 if (req) { in nameserver_failed()
605 if (req->tx_count == 0 && req->ns == ns) { in nameserver_failed()
608 req->ns = nameserver_pick(base); in nameserver_failed()
610 req = req->next; in nameserver_failed()
611 } while (req != started_at); in nameserver_failed()
638 request_trans_id_set(struct request *const req, const u16 trans_id) { in request_trans_id_set() argument
639 req->trans_id = trans_id; in request_trans_id_set()
640 *((u16 *) req->request) = htons(trans_id); in request_trans_id_set()
648 request_finished(struct request *const req, struct request **head, int free_handle) { in request_finished() argument
649 struct evdns_base *base = req->base; in request_finished()
652 ASSERT_VALID_REQUEST(req); in request_finished()
655 evdns_request_remove(req, head); in request_finished()
657 log(EVDNS_LOG_DEBUG, "Removing timeout for request %p", req); in request_finished()
659 evtimer_del(&req->timeout_event); in request_finished()
665 event_debug_unassign(&req->timeout_event); in request_finished()
667 if (!req->request_appended) { in request_finished()
669 mm_free(req->request); in request_finished()
675 if (req->handle) { in request_finished()
676 EVUTIL_ASSERT(req->handle->current_req == req); in request_finished()
679 search_request_finished(req->handle); in request_finished()
680 req->handle->current_req = NULL; in request_finished()
681 if (! req->handle->pending_cb) { in request_finished()
684 mm_free(req->handle); in request_finished()
686 req->handle = NULL; /* If we have a bug, let's crash in request_finished()
689 req->handle->current_req = NULL; in request_finished()
693 mm_free(req); in request_finished()
706 request_reissue(struct request *req) { in request_reissue() argument
707 const struct nameserver *const last_ns = req->ns; in request_reissue()
708 ASSERT_LOCKED(req->base); in request_reissue()
709 ASSERT_VALID_REQUEST(req); in request_reissue()
713 req->ns = nameserver_pick(req->base); in request_reissue()
714 if (req->ns == last_ns) { in request_reissue()
721 req->reissue_count++; in request_reissue()
722 req->tx_count = 0; in request_reissue()
723 req->transmit_me = 1; in request_reissue()
738 struct request *req; in evdns_requests_pump_waiting_queue() local
741 req = base->req_waiting_head; in evdns_requests_pump_waiting_queue()
743 req->ns = nameserver_pick(base); in evdns_requests_pump_waiting_queue()
744 if (!req->ns) in evdns_requests_pump_waiting_queue()
748 evdns_request_remove(req, &base->req_waiting_head); in evdns_requests_pump_waiting_queue()
753 request_trans_id_set(req, transaction_id_pick(base)); in evdns_requests_pump_waiting_queue()
755 evdns_request_insert(req, &REQ_HEAD(base, req->trans_id)); in evdns_requests_pump_waiting_queue()
756 evdns_request_transmit(req); in evdns_requests_pump_waiting_queue()
819 reply_schedule_callback(struct request *const req, u32 ttl, u32 err, struct reply *reply) in reply_schedule_callback() argument
829 ASSERT_LOCKED(req->base); in reply_schedule_callback()
831 d->request_type = req->request_type; in reply_schedule_callback()
832 d->user_callback = req->user_callback; in reply_schedule_callback()
840 if (req->handle) { in reply_schedule_callback()
841 req->handle->pending_cb = 1; in reply_schedule_callback()
842 d->handle = req->handle; in reply_schedule_callback()
846 req->user_pointer); in reply_schedule_callback()
848 event_base_get_deferred_cb_queue(req->base->event_base), in reply_schedule_callback()
854 reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply) { in reply_handle() argument
862 ASSERT_LOCKED(req->base); in reply_handle()
863 ASSERT_VALID_REQUEST(req); in reply_handle()
886 if (req->reissue_count < req->base->global_max_reissues) { in reply_handle()
890 nameserver_failed(req->ns, msg); in reply_handle()
891 if (!request_reissue(req)) return; in reply_handle()
903 (struct sockaddr *)&req->ns->address, in reply_handle()
908 if (req->handle == req->ns->probe_request) { in reply_handle()
910 req->ns->probe_request = NULL; in reply_handle()
913 nameserver_up(req->ns); in reply_handle()
916 if (req->handle->search_state && in reply_handle()
917 req->request_type != TYPE_PTR) { in reply_handle()
920 if (!search_try_next(req->handle)) { in reply_handle()
931 reply_schedule_callback(req, ttl, error, NULL); in reply_handle()
932 request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1); in reply_handle()
935 reply_schedule_callback(req, ttl, 0, reply); in reply_handle()
936 if (req->handle == req->ns->probe_request) in reply_handle()
937 req->ns->probe_request = NULL; /* Avoid double-free */ in reply_handle()
938 nameserver_up(req->ns); in reply_handle()
939 request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1); in reply_handle()
1012 struct request *req = NULL; in reply_parse() local
1026 req = request_find_from_trans_id(base, trans_id); in reply_parse()
1027 if (!req) return -1; in reply_parse()
1028 EVUTIL_ASSERT(req->base == base); in reply_parse()
1054 if (name_parse(req->request, req->request_len, &k, \ in reply_parse()
1066 reply.type = req->request_type; in reply_parse()
1096 if (req->request_type != TYPE_A) { in reply_parse()
1114 if (req->request_type != TYPE_PTR) { in reply_parse()
1125 if (!req->put_cname_in_ptr || *req->put_cname_in_ptr) { in reply_parse()
1131 *req->put_cname_in_ptr = mm_strdup(cname); in reply_parse()
1134 if (req->request_type != TYPE_AAAA) { in reply_parse()
1190 reply_handle(req, flags, ttl_r, &reply); in reply_parse()
1193 if (req) in reply_parse()
1194 reply_handle(req, flags, 0, NULL); in reply_parse()
1422 struct server_request *req = port->pending_replies; in server_port_flush() local
1424 while (req) { in server_port_flush()
1425 int r = sendto(port->socket, req->response, (int)req->response_len, 0, in server_port_flush()
1426 (struct sockaddr*) &req->addr, (ev_socklen_t)req->addrlen); in server_port_flush()
1433 if (server_request_free(req)) { in server_port_flush()
1437 EVUTIL_ASSERT(req != port->pending_replies); in server_port_flush()
1438 req = port->pending_replies; in server_port_flush()
1747 struct server_request *req = TO_SERVER_REQUEST(_req); in evdns_server_request_add_reply() local
1752 EVDNS_LOCK(req->port); in evdns_server_request_add_reply()
1753 if (req->response) /* have we already answered? */ in evdns_server_request_add_reply()
1758 itemp = &req->answer; in evdns_server_request_add_reply()
1759 countp = &req->n_answer; in evdns_server_request_add_reply()
1762 itemp = &req->authority; in evdns_server_request_add_reply()
1763 countp = &req->n_authority; in evdns_server_request_add_reply()
1766 itemp = &req->additional; in evdns_server_request_add_reply()
1767 countp = &req->n_additional; in evdns_server_request_add_reply()
1812 EVDNS_UNLOCK(req->port); in evdns_server_request_add_reply()
1818 evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const v… in evdns_server_request_add_a_reply() argument
1821 req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET, in evdns_server_request_add_a_reply()
1827 evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, cons… in evdns_server_request_add_aaaa_reply() argument
1830 req, EVDNS_ANSWER_SECTION, name, TYPE_AAAA, CLASS_INET, in evdns_server_request_add_aaaa_reply()
1836 evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char… in evdns_server_request_add_ptr_reply() argument
1854 req, EVDNS_ANSWER_SECTION, inaddr_name, TYPE_PTR, CLASS_INET, in evdns_server_request_add_ptr_reply()
1860 evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char… in evdns_server_request_add_cname_reply() argument
1863 req, EVDNS_ANSWER_SECTION, name, TYPE_CNAME, CLASS_INET, in evdns_server_request_add_cname_reply()
1871 struct server_request *req = TO_SERVER_REQUEST(exreq); in evdns_server_request_set_flags() local
1872 req->base.flags &= ~(EVDNS_FLAGS_AA|EVDNS_FLAGS_RD); in evdns_server_request_set_flags()
1873 req->base.flags |= flags; in evdns_server_request_set_flags()
1877 evdns_server_request_format_response(struct server_request *req, int err) in evdns_server_request_format_response() argument
1892 flags = req->base.flags; in evdns_server_request_format_response()
1896 APPEND16(req->trans_id); in evdns_server_request_format_response()
1898 APPEND16(req->base.nquestions); in evdns_server_request_format_response()
1899 APPEND16(req->n_answer); in evdns_server_request_format_response()
1900 APPEND16(req->n_authority); in evdns_server_request_format_response()
1901 APPEND16(req->n_additional); in evdns_server_request_format_response()
1904 for (i=0; i < req->base.nquestions; ++i) { in evdns_server_request_format_response()
1905 const char *s = req->base.questions[i]->name; in evdns_server_request_format_response()
1911 APPEND16(req->base.questions[i]->type); in evdns_server_request_format_response()
1912 APPEND16(req->base.questions[i]->dns_question_class); in evdns_server_request_format_response()
1919 item = req->answer; in evdns_server_request_format_response()
1921 item = req->authority; in evdns_server_request_format_response()
1923 item = req->additional; in evdns_server_request_format_response()
1960 req->response_len = j; in evdns_server_request_format_response()
1962 if (!(req->response = mm_malloc(req->response_len))) { in evdns_server_request_format_response()
1963 server_request_free_answers(req); in evdns_server_request_format_response()
1967 memcpy(req->response, buf, req->response_len); in evdns_server_request_format_response()
1968 server_request_free_answers(req); in evdns_server_request_format_response()
1977 struct server_request *req = TO_SERVER_REQUEST(_req); in evdns_server_request_respond() local
1978 struct evdns_server_port *port = req->port; in evdns_server_request_respond()
1982 if (!req->response) { in evdns_server_request_respond()
1983 if ((r = evdns_server_request_format_response(req, err))<0) in evdns_server_request_respond()
1987 r = sendto(port->socket, req->response, (int)req->response_len, 0, in evdns_server_request_respond()
1988 (struct sockaddr*) &req->addr, (ev_socklen_t)req->addrlen); in evdns_server_request_respond()
1995 req->prev_pending = port->pending_replies->prev_pending; in evdns_server_request_respond()
1996 req->next_pending = port->pending_replies; in evdns_server_request_respond()
1997 req->prev_pending->next_pending = in evdns_server_request_respond()
1998 req->next_pending->prev_pending = req; in evdns_server_request_respond()
2000 req->prev_pending = req->next_pending = req; in evdns_server_request_respond()
2001 port->pending_replies = req; in evdns_server_request_respond()
2016 if (server_request_free(req)) { in evdns_server_request_respond()
2032 server_request_free_answers(struct server_request *req) in server_request_free_answers() argument
2038 list = &req->answer; in server_request_free_answers()
2040 list = &req->authority; in server_request_free_answers()
2042 list = &req->additional; in server_request_free_answers()
2060 server_request_free(struct server_request *req) in server_request_free() argument
2063 if (req->base.questions) { in server_request_free()
2064 for (i = 0; i < req->base.nquestions; ++i) in server_request_free()
2065 mm_free(req->base.questions[i]); in server_request_free()
2066 mm_free(req->base.questions); in server_request_free()
2069 if (req->port) { in server_request_free()
2070 EVDNS_LOCK(req->port); in server_request_free()
2072 if (req->port->pending_replies == req) { in server_request_free()
2073 if (req->next_pending && req->next_pending != req) in server_request_free()
2074 req->port->pending_replies = req->next_pending; in server_request_free()
2076 req->port->pending_replies = NULL; in server_request_free()
2078 rc = --req->port->refcnt; in server_request_free()
2081 if (req->response) { in server_request_free()
2082 mm_free(req->response); in server_request_free()
2085 server_request_free_answers(req); in server_request_free()
2087 if (req->next_pending && req->next_pending != req) { in server_request_free()
2088 req->next_pending->prev_pending = req->prev_pending; in server_request_free()
2089 req->prev_pending->next_pending = req->next_pending; in server_request_free()
2093 EVDNS_UNLOCK(req->port); /* ????? nickm */ in server_request_free()
2094 server_port_free(req->port); in server_request_free()
2095 mm_free(req); in server_request_free()
2099 EVDNS_UNLOCK(req->port); in server_request_free()
2100 mm_free(req); in server_request_free()
2125 struct server_request *req = TO_SERVER_REQUEST(_req); in evdns_server_request_drop() local
2126 server_request_free(req); in evdns_server_request_drop()
2134 struct server_request *req = TO_SERVER_REQUEST(_req); in evdns_server_request_get_requesting_addr() local
2135 if (addr_len < (int)req->addrlen) in evdns_server_request_get_requesting_addr()
2137 memcpy(sa, &(req->addr), req->addrlen); in evdns_server_request_get_requesting_addr()
2138 return req->addrlen; in evdns_server_request_get_requesting_addr()
2148 struct request *const req = (struct request *) arg; in evdns_request_timeout_callback() local
2149 struct evdns_base *base = req->base; in evdns_request_timeout_callback()
2157 req->ns->timedout++; in evdns_request_timeout_callback()
2158 if (req->ns->timedout > req->base->global_max_nameserver_timeout) { in evdns_request_timeout_callback()
2159 req->ns->timedout = 0; in evdns_request_timeout_callback()
2160 nameserver_failed(req->ns, "request timed out."); in evdns_request_timeout_callback()
2163 if (req->tx_count >= req->base->global_max_retransmits) { in evdns_request_timeout_callback()
2166 arg, req->tx_count); in evdns_request_timeout_callback()
2167 reply_schedule_callback(req, 0, DNS_ERR_TIMEOUT, NULL); in evdns_request_timeout_callback()
2168 request_finished(req, &REQ_HEAD(req->base, req->trans_id), 1); in evdns_request_timeout_callback()
2173 arg, req->tx_count); in evdns_request_timeout_callback()
2174 (void) evtimer_del(&req->timeout_event); in evdns_request_timeout_callback()
2177 req->ns = new_ns; in evdns_request_timeout_callback()
2178 evdns_request_transmit(req); in evdns_request_timeout_callback()
2190 evdns_request_transmit_to(struct request *req, struct nameserver *server) { in evdns_request_transmit_to() argument
2192 ASSERT_LOCKED(req->base); in evdns_request_transmit_to()
2193 ASSERT_VALID_REQUEST(req); in evdns_request_transmit_to()
2194 r = sendto(server->socket, (void*)req->request, req->request_len, 0, in evdns_request_transmit_to()
2200 nameserver_failed(req->ns, evutil_socket_error_to_string(err)); in evdns_request_transmit_to()
2202 } else if (r != (int)req->request_len) { in evdns_request_transmit_to()
2216 evdns_request_transmit(struct request *req) { in evdns_request_transmit() argument
2219 ASSERT_LOCKED(req->base); in evdns_request_transmit()
2220 ASSERT_VALID_REQUEST(req); in evdns_request_transmit()
2223 req->transmit_me = 1; in evdns_request_transmit()
2224 EVUTIL_ASSERT(req->trans_id != 0xffff); in evdns_request_transmit()
2226 if (!req->ns) in evdns_request_transmit()
2232 if (req->ns->choked) { in evdns_request_transmit()
2238 r = evdns_request_transmit_to(req, req->ns); in evdns_request_transmit()
2242 req->ns->choked = 1; in evdns_request_transmit()
2243 nameserver_write_waiting(req->ns, 1); in evdns_request_transmit()
2253 "Setting timeout for request %p, sent to nameserver %p", req, req->ns); in evdns_request_transmit()
2254 if (evtimer_add(&req->timeout_event, &req->base->global_timeout) < 0) { in evdns_request_transmit()
2257 req); in evdns_request_transmit()
2260 req->tx_count++; in evdns_request_transmit()
2261 req->transmit_me = 0; in evdns_request_transmit()
2295 struct request *req; in nameserver_send_probe() local
2307 …req = request_new(ns->base, handle, TYPE_A, "google.com", DNS_QUERY_NO_SEARCH, nameserver_probe_ca… in nameserver_send_probe()
2308 if (!req) { in nameserver_send_probe()
2314 request_trans_id_set(req, transaction_id_pick(ns->base)); in nameserver_send_probe()
2315 req->ns = ns; in nameserver_send_probe()
2316 request_submit(req); in nameserver_send_probe()
2330 struct request *const started_at = base->req_heads[i], *req = started_at; in evdns_transmit() local
2333 if (req->transmit_me) { in evdns_transmit()
2335 evdns_request_transmit(req); in evdns_transmit()
2338 req = req->next; in evdns_transmit()
2339 } while (req != started_at); in evdns_transmit()
2406 struct request *req, *req_started_at; in evdns_base_clear_nameservers_and_suspend() local
2407 req = req_started_at = base->req_heads[i]; in evdns_base_clear_nameservers_and_suspend()
2408 while (req) { in evdns_base_clear_nameservers_and_suspend()
2409 struct request *next = req->next; in evdns_base_clear_nameservers_and_suspend()
2410 req->tx_count = req->reissue_count = 0; in evdns_base_clear_nameservers_and_suspend()
2411 req->ns = NULL; in evdns_base_clear_nameservers_and_suspend()
2413 (void) evtimer_del(&req->timeout_event); in evdns_base_clear_nameservers_and_suspend()
2414 req->trans_id = 0; in evdns_base_clear_nameservers_and_suspend()
2415 req->transmit_me = 0; in evdns_base_clear_nameservers_and_suspend()
2418 evdns_request_insert(req, &base->req_waiting_head); in evdns_base_clear_nameservers_and_suspend()
2427 req = next; in evdns_base_clear_nameservers_and_suspend()
2633 evdns_request_remove(struct request *req, struct request **head) in evdns_request_remove() argument
2635 ASSERT_LOCKED(req->base); in evdns_request_remove()
2636 ASSERT_VALID_REQUEST(req); in evdns_request_remove()
2646 if (ptr == req) { in evdns_request_remove()
2654 EVUTIL_ASSERT(req->next); in evdns_request_remove()
2658 if (req->next == req) { in evdns_request_remove()
2662 req->next->prev = req->prev; in evdns_request_remove()
2663 req->prev->next = req->next; in evdns_request_remove()
2664 if (*head == req) *head = req->next; in evdns_request_remove()
2666 req->next = req->prev = NULL; in evdns_request_remove()
2671 evdns_request_insert(struct request *req, struct request **head) { in evdns_request_insert() argument
2672 ASSERT_LOCKED(req->base); in evdns_request_insert()
2673 ASSERT_VALID_REQUEST(req); in evdns_request_insert()
2675 *head = req; in evdns_request_insert()
2676 req->next = req->prev = req; in evdns_request_insert()
2680 req->prev = (*head)->prev; in evdns_request_insert()
2681 req->prev->next = req; in evdns_request_insert()
2682 req->next = *head; in evdns_request_insert()
2683 (*head)->prev = req; in evdns_request_insert()
2708 struct request *const req = in request_new() local
2716 if (!req) return NULL; in request_new()
2719 mm_free(req); in request_new()
2723 memset(req, 0, sizeof(struct request)); in request_new()
2724 req->base = base; in request_new()
2726 evtimer_assign(&req->timeout_event, req->base->event_base, evdns_request_timeout_callback, req); in request_new()
2745 req->request = ((u8 *) req) + sizeof(struct request); in request_new()
2747 req->request_appended = 1; in request_new()
2749 type, CLASS_INET, req->request, request_max_len); in request_new()
2753 req->request_len = rlen; in request_new()
2754 req->trans_id = trans_id; in request_new()
2755 req->tx_count = 0; in request_new()
2756 req->request_type = type; in request_new()
2757 req->user_pointer = user_ptr; in request_new()
2758 req->user_callback = callback; in request_new()
2759 req->ns = issuing_now ? nameserver_pick(base) : NULL; in request_new()
2760 req->next = req->prev = NULL; in request_new()
2761 req->handle = handle; in request_new()
2763 handle->current_req = req; in request_new()
2767 return req; in request_new()
2769 mm_free(req); in request_new()
2774 request_submit(struct request *const req) { in request_submit() argument
2775 struct evdns_base *base = req->base; in request_submit()
2777 ASSERT_VALID_REQUEST(req); in request_submit()
2778 if (req->ns) { in request_submit()
2781 evdns_request_insert(req, &REQ_HEAD(base, req->trans_id)); in request_submit()
2783 evdns_request_transmit(req); in request_submit()
2785 evdns_request_insert(req, &base->req_waiting_head); in request_submit()
2794 struct request *req; in evdns_cancel_request() local
2812 req = handle->current_req; in evdns_cancel_request()
2813 ASSERT_VALID_REQUEST(req); in evdns_cancel_request()
2815 reply_schedule_callback(req, 0, DNS_ERR_CANCEL, NULL); in evdns_cancel_request()
2816 if (req->ns) { in evdns_cancel_request()
2818 request_finished(req, &REQ_HEAD(base, req->trans_id), 1); in evdns_cancel_request()
2821 request_finished(req, &base->req_waiting_head, 1); in evdns_cancel_request()
2831 struct request *req; in evdns_base_resolve_ipv4() local
2838 req = in evdns_base_resolve_ipv4()
2841 if (req) in evdns_base_resolve_ipv4()
2842 request_submit(req); in evdns_base_resolve_ipv4()
2870 struct request *req; in evdns_base_resolve_ipv6() local
2877 req = request_new(base, handle, TYPE_AAAA, name, flags, in evdns_base_resolve_ipv6()
2879 if (req) in evdns_base_resolve_ipv6()
2880 request_submit(req); in evdns_base_resolve_ipv6()
2903 struct request *req; in evdns_base_resolve_reverse() local
2917 req = request_new(base, handle, TYPE_PTR, buf, flags, callback, ptr); in evdns_base_resolve_reverse()
2918 if (req) in evdns_base_resolve_reverse()
2919 request_submit(req); in evdns_base_resolve_reverse()
2939 struct request *req; in evdns_base_resolve_reverse_ipv6() local
2957 req = request_new(base, handle, TYPE_PTR, buf, flags, callback, ptr); in evdns_base_resolve_reverse_ipv6()
2958 if (req) in evdns_base_resolve_reverse_ipv6()
2959 request_submit(req); in evdns_base_resolve_reverse_ipv6()
3160 struct request *req; in search_request_new() local
3162 req = request_new(base, handle, type, name, flags, user_callback, user_arg); in search_request_new()
3163 if (!req) return NULL; in search_request_new()
3168 req = request_new(base, handle, type, new_name, flags, user_callback, user_arg); in search_request_new()
3170 if (!req) return NULL; in search_request_new()
3177 if (req) in search_request_new()
3178 mm_free(req); in search_request_new()
3184 request_submit(req); in search_request_new()
3185 return req; in search_request_new()
3187 struct request *const req = request_new(base, handle, type, name, flags, user_callback, user_arg); in search_request_new() local
3188 if (!req) return NULL; in search_request_new()
3189 request_submit(req); in search_request_new()
3190 return req; in search_request_new()
3201 struct request *req = handle->current_req; in search_try_next() local
3202 struct evdns_base *base = req->base; in search_try_next()
3214 …ewreq = request_new(base, NULL, req->request_type, handle->search_origname, handle->search_flags, … in search_try_next()
3227 …newreq = request_new(base, NULL, req->request_type, new_name, handle->search_flags, req->user_call… in search_try_next()
3235 request_finished(req, &REQ_HEAD(req->base, req->trans_id), 0); in search_try_next()
3333 struct request **old_heads = base->req_heads, **new_heads, *req; in evdns_base_set_max_requests_inflight() local
3347 req = old_heads[i]; in evdns_base_set_max_requests_inflight()
3348 evdns_request_remove(req, &old_heads[i]); in evdns_base_set_max_requests_inflight()
3349 evdns_request_insert(req, &new_heads[req->trans_id % n_heads]); in evdns_base_set_max_requests_inflight()
4305 struct getaddrinfo_subrequest *req = arg; in evdns_getaddrinfo_gotresolve() local
4319 EVUTIL_ASSERT(req->type == DNS_IPv4_A || req->type == DNS_IPv6_AAAA); in evdns_getaddrinfo_gotresolve()
4320 if (req->type == DNS_IPv4_A) { in evdns_getaddrinfo_gotresolve()
4321 data = EVUTIL_UPCAST(req, struct evdns_getaddrinfo_request, ipv4_request); in evdns_getaddrinfo_gotresolve()
4324 data = EVUTIL_UPCAST(req, struct evdns_getaddrinfo_request, ipv6_request); in evdns_getaddrinfo_gotresolve()
4330 if (req->type == DNS_IPv4_A) in evdns_getaddrinfo_gotresolve()
4340 req->r = NULL; in evdns_getaddrinfo_gotresolve()
4459 if (req->type == DNS_IPv4_A) in evdns_getaddrinfo_gotresolve()