Lines Matching refs:dns
200 struct evdns_base *dns = evdns_base_new(base, 1/* init name servers */); in dns_resolve_reverse() local
204 tt_assert(dns); in dns_resolve_reverse()
209 dns, &in, 0, dns_gethostbyname_cb, base); in dns_resolve_reverse()
217 if (dns) in dns_resolve_reverse()
218 evdns_base_free(dns, 0); in dns_resolve_reverse()
537 struct evdns_base *dns = NULL; in dns_search_test_impl() local
552 dns = evdns_base_new(base, 0); in dns_search_test_impl()
553 tt_assert(!evdns_base_nameserver_ip_add(dns, buf)); in dns_search_test_impl()
555 evdns_base_search_add(dns, "a.example.com"); in dns_search_test_impl()
556 evdns_base_search_add(dns, "b.example.com"); in dns_search_test_impl()
557 evdns_base_search_add(dns, "c.example.com"); in dns_search_test_impl()
562 evdns_base_resolve_ipv4(dns, "host", 0, generic_dns_callback, &r[0]); in dns_search_test_impl()
563 evdns_base_resolve_ipv4(dns, "host2", 0, generic_dns_callback, &r[1]); in dns_search_test_impl()
564 evdns_base_resolve_ipv4(dns, "host", DNS_NO_SEARCH, generic_dns_callback, &r[2]); in dns_search_test_impl()
565 evdns_base_resolve_ipv4(dns, "host2", DNS_NO_SEARCH, generic_dns_callback, &r[3]); in dns_search_test_impl()
566 evdns_base_resolve_ipv4(dns, "host3", 0, generic_dns_callback, &r[4]); in dns_search_test_impl()
567 evdns_base_resolve_ipv4(dns, "hostn.a.example.com", DNS_NO_SEARCH, generic_dns_callback, &r[5]); in dns_search_test_impl()
568 evdns_base_resolve_ipv4(dns, "hostn.b.example.com", DNS_NO_SEARCH, generic_dns_callback, &r[6]); in dns_search_test_impl()
569 evdns_base_resolve_ipv4(dns, "hostn.c.example.com", DNS_NO_SEARCH, generic_dns_callback, &r[7]); in dns_search_test_impl()
590 if (dns) in dns_search_test_impl()
591 evdns_base_free(dns, 0); in dns_search_test_impl()
600 struct evdns_base *dns = NULL; in dns_search_empty_test() local
602 dns = evdns_base_new(base, 0); in dns_search_empty_test()
604 evdns_base_search_add(dns, "whatever.example.com"); in dns_search_empty_test()
609 tt_ptr_op(evdns_base_resolve_ipv4(dns, "", 0, generic_dns_callback, NULL), ==, NULL); in dns_search_empty_test()
612 if (dns) in dns_search_empty_test()
613 evdns_base_free(dns, 0); in dns_search_empty_test()
657 struct evdns_base *dns = NULL; in dns_search_cancel_test() local
668 dns = evdns_base_new(base, 0); in dns_search_cancel_test()
669 tt_assert(!evdns_base_nameserver_ip_add(dns, buf)); in dns_search_cancel_test()
671 evdns_base_search_add(dns, "a.example.com"); in dns_search_cancel_test()
672 evdns_base_search_add(dns, "b.example.com"); in dns_search_cancel_test()
673 evdns_base_search_add(dns, "c.example.com"); in dns_search_cancel_test()
674 evdns_base_search_add(dns, "d.example.com"); in dns_search_cancel_test()
680 current_req = evdns_base_resolve_ipv4(dns, "host", 0, in dns_search_cancel_test()
689 if (dns) in dns_search_cancel_test()
690 evdns_base_free(dns, 0); in dns_search_cancel_test()
733 struct evdns_base *dns = NULL; in dns_retry_test_impl() local
745 dns = evdns_base_new(base, flags); in dns_retry_test_impl()
746 tt_assert(!evdns_base_nameserver_ip_add(dns, buf)); in dns_retry_test_impl()
747 tt_assert(! evdns_base_set_option(dns, "timeout", "0.2")); in dns_retry_test_impl()
748 tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "10")); in dns_retry_test_impl()
749 tt_assert(! evdns_base_set_option(dns, "initial-probe-timeout", "0.1")); in dns_retry_test_impl()
751 evdns_base_resolve_ipv4(dns, "host.example.com", 0, in dns_retry_test_impl()
768 tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "2")); in dns_retry_test_impl()
769 tt_assert(! evdns_base_set_option(dns, "attempts:", "3")); in dns_retry_test_impl()
772 evdns_base_resolve_ipv4(dns, "host.example.com", 0, in dns_retry_test_impl()
785 evdns_base_resolve_ipv4(dns, "host.example.com", 0, in dns_retry_test_impl()
795 if (dns) in dns_retry_test_impl()
796 evdns_base_free(dns, 0); in dns_retry_test_impl()
832 struct evdns_base *dns = NULL; in dns_reissue_test_impl() local
846 dns = evdns_base_new(base, flags); in dns_reissue_test_impl()
847 tt_assert(!evdns_base_nameserver_ip_add(dns, buf1)); in dns_reissue_test_impl()
848 tt_assert(! evdns_base_set_option(dns, "timeout:", "0.3")); in dns_reissue_test_impl()
849 tt_assert(! evdns_base_set_option(dns, "max-timeouts:", "2")); in dns_reissue_test_impl()
850 tt_assert(! evdns_base_set_option(dns, "attempts:", "5")); in dns_reissue_test_impl()
853 evdns_base_resolve_ipv4(dns, "foof.example.com", 0, in dns_reissue_test_impl()
857 tt_assert(!evdns_base_nameserver_ip_add(dns, buf2)); in dns_reissue_test_impl()
872 if (dns) in dns_reissue_test_impl()
873 evdns_base_free(dns, 0); in dns_reissue_test_impl()
907 struct evdns_base *dns = NULL; in dns_inflight_test_impl() local
925 dns = evdns_base_new(base, flags); in dns_inflight_test_impl()
926 tt_assert(!evdns_base_nameserver_ip_add(dns, buf)); in dns_inflight_test_impl()
927 tt_assert(! evdns_base_set_option(dns, "max-inflight:", "3")); in dns_inflight_test_impl()
928 tt_assert(! evdns_base_set_option(dns, "randomize-case:", "0")); in dns_inflight_test_impl()
931 evdns_base_resolve_ipv4(dns, "foof.example.com", 0, generic_dns_callback, &r[i]); in dns_inflight_test_impl()
945 if (dns) in dns_inflight_test_impl()
946 evdns_base_free(dns, 0); in dns_inflight_test_impl()
972 struct evdns_base *dns = NULL; in dns_disable_when_inactive_no_ns_test() local
984 dns = evdns_base_new(base, EVDNS_BASE_DISABLE_WHEN_INACTIVE); in dns_disable_when_inactive_no_ns_test()
985 tt_assert(!evdns_base_nameserver_ip_add(dns, buf)); in dns_disable_when_inactive_no_ns_test()
986 tt_assert(! evdns_base_set_option(dns, "timeout:", "0.1")); in dns_disable_when_inactive_no_ns_test()
988 evdns_base_resolve_ipv4(dns, "foof.example.com", 0, generic_dns_callback, &r); in dns_disable_when_inactive_no_ns_test()
1001 if (dns) in dns_disable_when_inactive_no_ns_test()
1002 evdns_base_free(dns, 0); in dns_disable_when_inactive_no_ns_test()
1200 struct evdns_base *dns=NULL; in test_bufferevent_connect_hostname() local
1229 dns = evdns_base_new(data->base, 0); in test_bufferevent_connect_hostname()
1231 evdns_base_nameserver_ip_add(dns, buf); in test_bufferevent_connect_hostname()
1273 tt_assert(!bufferevent_socket_connect_hostname(be1, dns, AF_INET, in test_bufferevent_connect_hostname()
1276 tt_assert(!bufferevent_socket_connect_hostname(be2, dns, AF_INET, in test_bufferevent_connect_hostname()
1279 tt_assert(!bufferevent_socket_connect_hostname(be3, dns, AF_INET, in test_bufferevent_connect_hostname()
1305 if (dns) in test_bufferevent_connect_hostname()
1306 evdns_base_free(dns, 0); in test_bufferevent_connect_hostname()
2036 struct evdns_base *dns = NULL; in dns_client_fail_requests_test() local
2050 dns = evdns_base_new(base, EVDNS_BASE_DISABLE_WHEN_INACTIVE); in dns_client_fail_requests_test()
2051 tt_assert(!evdns_base_nameserver_ip_add(dns, buf)); in dns_client_fail_requests_test()
2054 evdns_base_resolve_ipv4(dns, "foof.example.com", 0, generic_dns_callback, &r[i]); in dns_client_fail_requests_test()
2059 evdns_base_free(dns, 1 /** fail requests */); in dns_client_fail_requests_test()
2081 struct evdns_base *dns = NULL; in dns_client_fail_requests_getaddrinfo_test() local
2095 dns = evdns_base_new(base, EVDNS_BASE_DISABLE_WHEN_INACTIVE); in dns_client_fail_requests_getaddrinfo_test()
2096 tt_assert(!evdns_base_nameserver_ip_add(dns, buf)); in dns_client_fail_requests_getaddrinfo_test()
2099 tt_assert(evdns_getaddrinfo(dns, "foof.example.com", "ssh", NULL, getaddrinfo_cb, &r[i])); in dns_client_fail_requests_getaddrinfo_test()
2104 evdns_base_free(dns, 1 /** fail requests */); in dns_client_fail_requests_getaddrinfo_test()