Lines Matching defs:lookup
332 "that lookup.\n"
355 if (query->lookup->stats) {
358 if (query->lookup->use_usec) {
363 if (dig_lookup_is_tls(query->lookup)) {
365 } else if (query->lookup->https_mode) {
366 if (query->lookup->http_plain) {
367 proto = query->lookup->https_get ? "HTTP-GET"
370 proto = query->lookup->https_get ? "HTTPS-GET"
373 } else if (query->lookup->tcp_mode) {
388 if (query->lookup->doing_xfr) {
406 } else if (query->lookup->identify) {
408 if (query->lookup->use_usec) {
411 query->lookup->doing_xfr ? query->byte_count
417 query->lookup->doing_xfr ? query->byte_count
430 trying(char *frm, dig_lookup_t *lookup) {
432 UNUSED(lookup);
445 if (query->lookup->trace || query->lookup->ns_search_only) {
454 if (query->lookup->rrcomments > 0) {
457 if (query->lookup->nocrypto) {
460 if (query->lookup->print_unknown_format) {
463 if (query->lookup->expandaaaa) {
472 if (query->lookup->identify) {
476 if (query->lookup->use_usec) {
620 bool isquery = (msg == query->lookup->sendmsg);
621 bool dns64prefix = query->lookup->dns64prefix;
625 dig_idnsetup(query->lookup, true);
633 if (query->lookup->comments) {
636 if (query->lookup->print_unknown_format) {
640 if (query->lookup->rrcomments > 0) {
643 if (query->lookup->ttlunits) {
646 if (query->lookup->nottl) {
649 if (query->lookup->noclass) {
652 if (query->lookup->nocrypto) {
655 if (query->lookup->expandaaaa) {
658 if (query->lookup->multiline) {
666 if (query->lookup->rrcomments >= 0) {
671 if (query->lookup->multiline ||
672 (query->lookup->nottl && query->lookup->noclass))
676 } else if (query->lookup->nottl || query->lookup->noclass) {
685 if (query->lookup->cmdline[0] != 0) {
687 printf("%s", query->lookup->cmdline);
689 query->lookup->cmdline[0] = '\0';
692 query->lookup->comments ? "comments" : "nocomments",
702 if (query->lookup->onesoa &&
703 query->lookup->rdtype == dns_rdatatype_axfr)
708 if (!query->lookup->comments) {
749 if (query->lookup->use_usec) {
761 if (query->lookup->use_usec) {
780 query->lookup->tcp_mode ? "TCP" : "UDP");
817 } else if (query->lookup->comments && !short_form && !dns64prefix) {
818 if (query->lookup->cmdline[0] != '\0' && printcmd) {
819 printf("; %s\n", query->lookup->cmdline);
821 if (msg == query->lookup->sendmsg) {
871 if (msg != query->lookup->sendmsg &&
879 if (msg != query->lookup->sendmsg &&
880 query->lookup->edns != -1 && msg->opt == NULL &&
887 query->lookup->dnssec ? "+nodnssec " : "");
889 if (msg != query->lookup->sendmsg && extrabytes != 0U) {
898 if (query->lookup->comments && headers && !short_form && !dns64prefix) {
911 if (query->lookup->section_question && headers) {
921 if (query->lookup->section_answer) {
943 if (query->lookup->section_authority) {
953 if (query->lookup->section_additional) {
985 if (headers && query->lookup->comments && !short_form && !yaml) {
997 dig_idnsetup(query->lookup, false);
1006 printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
1012 snprintf(lookup->cmdline, sizeof(lookup->cmdline),
1018 strlcat(lookup->cmdline, append,
1019 sizeof(lookup->cmdline));
1021 strlcat(lookup->cmdline, "\n", sizeof(lookup->cmdline));
1026 strlcat(lookup->cmdline, append,
1027 sizeof(lookup->cmdline));
1035 strlcat(lookup->cmdline, append,
1036 sizeof(lookup->cmdline));
1068 dig_lookup_t *lookup) {
1072 if (!lookup->tcp_mode_set) {
1073 lookup->tcp_mode = state;
1083 lookup->tls_ca_set = state;
1090 lookup->tls_ca_set = state;
1092 lookup->tls_ca_file =
1098 lookup->tls_cert_file_set = state;
1101 lookup->tls_cert_file =
1119 lookup->tls_hostname_set = state;
1122 lookup->tls_hostname =
1133 lookup->tls_key_file_set = state;
1136 lookup->tls_key_file =
1152 lookup->tls_mode = state;
1172 dig_lookup_t *lookup) {
1183 return (lookup);
1197 lookup->aaonly = state;
1203 lookup->section_additional = state;
1208 lookup->adflag = state;
1216 lookup->section_question = state;
1217 lookup->section_authority = state;
1218 lookup->section_answer = state;
1219 lookup->section_additional = state;
1220 lookup->comments = state;
1221 lookup->stats = state;
1226 lookup->section_answer = state;
1230 lookup->section_authority = state;
1240 lookup->badcookie = state;
1244 lookup->besteffort = state;
1252 lookup->udpsize = DEFAULT_EDNS_BUFSIZE;
1261 lookup->udpsize = num;
1274 lookup->cdflag = state;
1283 lookup->noclass = !state;
1293 lookup->comments = state;
1294 if (lookup == default_lookup) {
1300 if (state && lookup->edns == -1) {
1301 lookup->edns = DEFAULT_EDNS_VERSION;
1303 lookup->sendcookie = state;
1311 lookup->cookie = hexcookie;
1313 lookup->cookie = NULL;
1322 lookup->nocrypto = !state;
1332 if (!lookup->trace) {
1344 lookup = clone_lookup(
1349 lookup->dns64prefix = state;
1350 strlcpy(lookup->textname,
1352 sizeof(lookup->textname));
1354 lookup->section_additional =
1356 lookup->section_answer = true;
1357 lookup->section_authority =
1359 lookup->section_question =
1361 lookup->comments = false;
1362 lookup->stats = false;
1363 lookup->rrcomments = -1;
1364 lookup->rdtype =
1366 lookup->rdtypeset = true;
1368 lookup, link);
1374 if (state && lookup->edns == -1) {
1375 lookup->edns =
1378 lookup->dnssec = state;
1422 lookup->edns = -1;
1426 lookup->edns =
1438 lookup->edns = num;
1443 lookup->ednsflags = 0;
1447 lookup->ednsflags = 0;
1458 lookup->ednsflags = num;
1462 lookup->ednsneg = state;
1467 lookup->ednsoptscnt = 0;
1484 save_opt(lookup, code, extra);
1504 lookup->expandaaaa = state;
1508 lookup->expire = state;
1526 lookup->servfail_stops = state;
1530 lookup->fuzzing = state;
1531 if (lookup->fuzzing) {
1533 lookup->fuzztime = 0x622acce1;
1542 lookup->fuzztime = num;
1553 lookup->header_only = state;
1560 if (lookup->https_path != NULL) {
1561 isc_mem_free(mctx, lookup->https_path);
1562 lookup->https_path = NULL;
1565 lookup->https_mode = false;
1568 lookup->https_mode = true;
1570 lookup->http_plain = true;
1582 lookup->https_get = true;
1601 lookup->https_get = true;
1609 if (!lookup->tcp_mode_set) {
1610 lookup->tcp_mode = state;
1613 lookup->https_path = isc_mem_strdup(
1624 lookup->https_path = isc_mem_strdup(mctx,
1641 lookup->identify = state;
1651 lookup->idnin = state;
1660 lookup->idnout = state;
1676 lookup->ignore = state;
1689 lookup->tcp_keepalive = state;
1719 lookup->multiline = state;
1746 if (state && lookup->edns == -1) {
1747 lookup->edns = DEFAULT_EDNS_VERSION;
1749 lookup->nsid = state;
1753 lookup->ns_search_only = state;
1755 lookup->trace_root = true;
1756 lookup->recurse = true;
1757 lookup->identify = true;
1758 lookup->stats = false;
1759 lookup->comments = false;
1760 lookup->section_additional = false;
1761 lookup->section_authority = false;
1762 lookup->section_question = false;
1763 lookup->rdtype = dns_rdatatype_ns;
1764 lookup->rdtypeset = true;
1766 lookup->rrcomments = 0;
1781 lookup->onesoa = state;
1786 lookup->opcode = 0; /* default - query */
1801 lookup->opcode = (dns_opcode_t)num;
1809 lookup->opcode = (dns_opcode_t)num;
1817 if (state && lookup->edns == -1) {
1818 lookup->edns = DEFAULT_EDNS_VERSION;
1828 lookup->padding = (uint16_t)num;
1835 lookup->setqid = false;
1836 lookup->qid = 0;
1847 lookup->setqid = true;
1848 lookup->qid = num;
1852 lookup->qr = state;
1856 lookup->section_question = state;
1857 if (lookup == default_lookup) {
1869 lookup->raflag = state;
1873 lookup->recurse = state;
1879 lookup->recurse = state;
1889 result = parse_uint(&lookup->retries, value,
1895 lookup->retries++;
1903 lookup->rrcomments = state ? 1 : -1;
1913 if (!lookup->trace) {
1927 lookup->section_additional = false;
1928 lookup->section_answer = true;
1929 lookup->section_authority = false;
1930 lookup->section_question = false;
1931 lookup->comments = false;
1932 lookup->stats = false;
1933 lookup->rrcomments = -1;
1940 lookup->showbadcookie = state;
1944 if (!lookup->trace) {
1999 lookup->stats = state;
2007 if (lookup->ecs_addr != NULL) {
2008 isc_mem_free(mctx, lookup->ecs_addr);
2009 lookup->ecs_addr = NULL;
2013 if (lookup->edns == -1) {
2014 lookup->edns = DEFAULT_EDNS_VERSION;
2016 if (lookup->ecs_addr != NULL) {
2017 isc_mem_free(mctx, lookup->ecs_addr);
2018 lookup->ecs_addr = NULL;
2020 result = parse_netprefix(&lookup->ecs_addr, value);
2036 lookup->tcflag = state;
2041 lookup->tcp_mode = state;
2042 lookup->tcp_mode_set = true;
2071 lookup))
2088 lookup->trace = state;
2089 lookup->trace_root = state;
2091 lookup->recurse = true;
2092 lookup->identify = true;
2093 lookup->comments = false;
2094 lookup->rrcomments = 0;
2095 lookup->stats = false;
2096 lookup->section_additional = false;
2097 lookup->section_authority = true;
2098 lookup->section_question = false;
2099 lookup->dnssec = true;
2100 lookup->sendcookie = true;
2112 result = parse_uint(&lookup->retries, value,
2118 if (lookup->retries == 0) {
2119 lookup->retries = 1;
2138 lookup->nottl = !state;
2142 lookup->nottl = false;
2143 lookup->ttlunits = state;
2168 lookup->print_unknown_format = state;
2182 lookup->tcp_mode = state;
2183 lookup->tcp_mode_set = true;
2191 lookup->stats = false;
2192 lookup->rrcomments = -1;
2197 lookup->zflag = state;
2208 return (lookup);
2223 dash_option(char *option, char *next, dig_lookup_t **lookup,
2296 (*lookup)->use_usec = true;
2352 if ((*lookup)->rdclassset) {
2361 (*lookup)->rdclass = rdclass;
2362 (*lookup)->rdclassset = true;
2387 (*lookup) = clone_lookup(default_lookup, true);
2390 strlcpy((*lookup)->textname, value,
2391 sizeof((*lookup)->textname));
2392 (*lookup)->trace_root = ((*lookup)->trace ||
2393 (*lookup)->ns_search_only);
2394 (*lookup)->new_search = true;
2396 printgreeting(argc, argv, *lookup);
2399 ISC_LIST_APPEND(lookup_list, (*lookup), link);
2400 debug("looking up %s", (*lookup)->textname);
2420 if ((*lookup)->rdtypeset) {
2426 (*lookup)->rdtype = dns_rdatatype_ixfr;
2427 (*lookup)->rdtypeset = true;
2433 (*lookup)->ixfr_serial = serial;
2434 (*lookup)->section_question = plusquest;
2435 (*lookup)->comments = pluscomm;
2436 if (!(*lookup)->tcp_mode_set) {
2437 (*lookup)->tcp_mode = true;
2440 (*lookup)->rdtype = rdtype;
2442 (*lookup)->rdtypeset = true;
2445 (*lookup)->section_question = plusquest;
2446 (*lookup)->comments = pluscomm;
2448 if (!(*lookup)->tcp_mode_set) {
2449 (*lookup)->tcp_mode = true;
2452 (*lookup)->ixfr_serial = false;
2484 *lookup = clone_lookup(default_lookup, true);
2490 strlcpy((*lookup)->textname, textname,
2491 sizeof((*lookup)->textname));
2492 debug("looking up %s", (*lookup)->textname);
2493 (*lookup)->trace_root = ((*lookup)->trace ||
2494 (*lookup)->ns_search_only);
2495 if (!(*lookup)->rdtypeset) {
2496 (*lookup)->rdtype = dns_rdatatype_ptr;
2498 if (!(*lookup)->rdclassset) {
2499 (*lookup)->rdclass = dns_rdataclass_in;
2501 (*lookup)->new_search = true;
2503 printgreeting(argc, argv, *lookup);
2506 ISC_LIST_APPEND(lookup_list, *lookup, link);
2620 dig_lookup_t *lookup = NULL;
2642 * First, create a "default lookup" which won't actually be used
2648 debug("making new lookup");
2687 lookup = clone_lookup(default_lookup, true);
2690 lookup = default_lookup;
2702 addresscount = getaddresses(lookup, &rv[0][1],
2708 "lookup\n",
2711 if (ISC_LINK_LINKED(lookup, link)) {
2713 lookup, link);
2715 destroy_lookup(lookup);
2719 addresscount = getaddresses(lookup, &rv[0][1],
2727 lookup = plus_option(&rv[0][1], is_batchfile,
2728 &need_clone, lookup);
2731 if (dash_option(&rv[0][1], NULL, &lookup,
2740 if (dash_option(&rv[0][1], rv[1], &lookup,
2775 if (lookup->rdtypeset) {
2782 lookup->rdtype =
2784 lookup->rdtypeset = true;
2794 lookup->ixfr_serial = serial;
2795 lookup->section_question =
2797 lookup->comments = pluscomm;
2798 if (!lookup->tcp_mode_set) {
2799 lookup->tcp_mode = true;
2802 lookup->rdtype = rdtype;
2803 lookup->rdtypeset = true;
2807 lookup->section_question =
2809 lookup->comments =
2814 !lookup->tcp_mode_set)
2816 lookup->tcp_mode = true;
2818 lookup->ixfr_serial = false;
2825 if (lookup->rdclassset) {
2830 lookup->rdclass = rdclass;
2831 lookup->rdclassset = true;
2838 lookup = clone_lookup(default_lookup,
2842 strlcpy(lookup->textname, rv[0],
2843 sizeof(lookup->textname));
2844 lookup->trace_root = (lookup->trace ||
2845 lookup->ns_search_only);
2846 lookup->new_search = true;
2848 printgreeting(argc, argv, lookup);
2851 ISC_LIST_APPEND(lookup_list, lookup, link);
2852 debug("looking up %s", lookup->textname);
2859 * If we have a batchfile, seed the lookup list with the
2896 * If no lookup specified, search for root
2900 lookup = clone_lookup(default_lookup, true);
2903 lookup->trace_root = (lookup->trace || lookup->ns_search_only);
2904 lookup->new_search = true;
2905 strlcpy(lookup->textname, ".", sizeof(lookup->textname));
2906 lookup->rdtype = dns_rdatatype_ns;
2907 lookup->rdtypeset = true;
2909 printgreeting(argc, argv, lookup);
2912 ISC_LIST_APPEND(lookup_list, lookup, link);
2915 destroy_lookup(lookup);
3006 dig_comments(dig_lookup_t *lookup, const char *format, ...) {
3009 if (lookup->comments && !yaml) {