| /src/external/mpl/bind/dist/bin/tests/system/cookie/ |
| cookie_ans.py | 39 def _first_label(qctx: QueryContext) -> str: 40 return qctx.qname.labels[0].decode("ascii") 43 def _add_cookie(qctx: QueryContext) -> None: 44 for o in qctx.query.options: 54 qctx.response.use_edns(options=[cookie]) 58 def _tld(qctx: QueryContext) -> dns.name.Name: 59 return dns.name.Name(qctx.qname.labels[-2:]) 62 def _soa(qctx: QueryContext) -> dns.rrset.RRset: 64 _tld(qctx), 2, qctx.qclass, dns.rdatatype.SOA, ". . 0 0 0 0 2 [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/resolver/ans10/ |
| ans.py | 28 def match(self, qctx: QueryContext) -> bool: 29 return qctx.query.edns > -1 and qctx.query.options 32 self, qctx: QueryContext 34 qctx.response.set_rcode(dns.rcode.FORMERR) 36 qctx.response.opt = qctx.query.opt 37 yield DnsResponseSend(qctx.response, authoritative=False) 42 self, qctx: QueryContext 44 if qctx.qtype == dns.rdatatype.A [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/qmin/ |
| qmin_ans.py | 29 def log_query(qctx: QueryContext) -> None: 35 qname = qctx.qname.to_text() 36 qtype = dns.rdatatype.to_text(qctx.qtype) 51 self, qctx: QueryContext 53 log_query(qctx) 54 yield DnsResponseSend(qctx.response) 71 self, qctx: QueryContext 73 assert qctx.zone 75 log_query(qctx) 78 qctx.response.rcode() == dns.rcode.NOERRO [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/dnssec/ans10/ |
| ans.py | 26 def match(self, qctx: QueryContext) -> bool: 27 return qctx.qtype == dns.rdatatype.A 30 self, qctx: QueryContext 33 f"A 13 2 60 {2**32-1} 0 12345 {qctx.qname.to_text()} " 37 qctx.qname, 1, qctx.qclass, dns.rdatatype.RRSIG, rrsig 39 qctx.response.answer.append(rrsig_rrset) 40 yield DnsResponseSend(qctx.response) 44 def match(self, qctx: QueryContext) -> bool: 45 return qctx.qtype == dns.rdatatype.TX [all...] |
| /src/external/mpl/bind/dist/lib/ns/ |
| query.c | 95 #define QUERY_ERROR(qctx, r) \ 97 (qctx)->result = r; \ 98 (qctx)->want_restart = false; \ 99 (qctx)->line = __LINE__; \ 186 #define CCTRACE(l, m) client_trace(qctx->client, l, m) 254 query_addanswer(query_ctx_t *qctx); 257 query_prepare_delegation_response(query_ctx_t *qctx); 266 * Return the hooktable in use with 'qctx', or if there isn't one 270 get_hooktab(query_ctx_t *qctx) { 271 if (qctx == NULL || qctx->view == NULL || qctx->view->hooktable == NULL 1768 query_ctx_t *qctx = arg; local 2653 query_ctx_t qctx; local 5692 query_ctx_t qctx; local 6022 query_ctx_t *qctx = arg; local 6347 query_ctx_t qctx; local 6838 query_ctx_t *qctx = rev->saved_qctx; local 9732 query_ctx_t *qctx = val; local [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/forward/ans6/ |
| ans.py | 44 self, qctx: QueryContext 49 if qctx.qname == ns1_sld_tld and qctx.qtype == dns.rdatatype.A: 52 response_section = qctx.response.answer 53 elif qctx.qname == ns1_sld_tld and qctx.qtype == dns.rdatatype.AAAA: 56 response_section = qctx.response.answer 57 elif qctx.qname.is_subdomain(sld_tld) and qctx.qtype == dns.rdatatype.NS: 60 response_section = qctx.response.answe [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/rpzrecurse/ans5/ |
| ans.py | 30 def match(self, qctx: QueryContext) -> bool: 31 return qctx.qtype == dns.rdatatype.A 34 self, qctx: QueryContext 37 qctx.qname, 300, qctx.qclass, dns.rdatatype.A, "10.53.0.5" 39 qctx.response.answer.append(a_rrset) 40 yield DnsResponseSend(qctx.response) 44 def match(self, qctx: QueryContext) -> bool: 45 return qctx.qtype == dns.rdatatype.NS 48 self, qctx: QueryContex [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/qmin/ans4/ |
| ans.py | 56 self, qctx: QueryContext 58 log_query(qctx) 60 if qctx.qtype == dns.rdatatype.NS: 61 assert qctx.zone 62 assert qctx.response.answer[0] 64 for nameserver in qctx.response.answer[0]: 65 if not nameserver.target.is_subdomain(qctx.response.answer[0].name): 67 glue_a = qctx.zone.get_rrset(nameserver.target, dns.rdatatype.A) 69 qctx.response.additional.append(glue_a) 70 glue_aaaa = qctx.zone.get_rrset(nameserver.target, dns.rdatatype.AAAA [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/xfer/ans9/ |
| ans.py | 43 self, qctx: QueryContext 50 soa_message = qctx.response 52 qctx.qname, 54 qctx.qclass, 62 if qctx.qtype == dns.rdatatype.SOA: 66 if qctx.qtype != dns.rdatatype.AXFR: 79 ns_message = qctx.prepare_new_response() 81 qctx.qname, 300, qctx.qclass, dns.rdatatype.NS, "." 88 txt_message = qctx.prepare_new_response( [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/fetchlimit/ans4/ |
| ans.py | 31 self, qctx: QueryContext 33 if qctx.qtype in (dns.rdatatype.A, dns.rdatatype.AAAA): 34 addr = "192.0.2.1" if qctx.qtype == dns.rdatatype.A else "2001:db8:beef::1" 35 rrset = dns.rrset.from_text(qctx.qname, 300, qctx.qclass, qctx.qtype, addr) 36 qctx.response.answer.append(rrset) 38 delay = 0.05 if qctx.qname.labels[0].startswith(b"latency") else 0.00 39 yield DnsResponseSend(qctx.response, delay=delay)
|
| /src/external/mpl/bind/dist/bin/tests/system/resolver/ |
| resolver_ans.py | 72 qctx: QueryContext, owner: dns.name.Name | str, server_number: int 75 qctx.response.authority.append(delegation.ns_rrset) 76 qctx.response.additional.append(delegation.a_rrset) 86 self, qctx: QueryContext 88 setup_delegation(qctx, self.matched_domain, self.server_number) 89 yield DnsResponseSend(qctx.response, authoritative=False) 96 self, qctx: QueryContext 98 qctx.response.authority.append(soa_rrset(qctx.qname)) 99 yield DnsResponseSend(qctx.response [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/chain/ans3/ |
| ans.py | 53 self, qctx: QueryContext 55 assert qctx.zone 56 assert qctx.zone.origin 58 relative_qname = qctx.qname.relativize(qctx.zone.origin) 60 last_cname = qctx.response.answer[-1] 63 dname_rrset = get_dname_rrset_at_name(qctx.zone, dname_owner) 64 qctx.response.answer.append(dname_rrset) 66 yield DnsResponseSend(qctx.response) 80 self, qctx: QueryContex [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/bailiwick/ans2/ |
| ans.py | 32 self, qctx: QueryContext 34 response = qctx.prepare_new_response(with_zone_data=False) 37 qctx.qname, 39 qctx.qclass, 46 "victim.", TTL, qctx.qclass, dns.rdatatype.NS, "ns.attacker." 58 self, qctx: QueryContext 60 response = qctx.prepare_new_response(with_zone_data=False) 63 "trigger.victim.", TTL, qctx.qclass, dns.rdatatype.NS, "ns.victim." 68 "ns.victim.", TTL, qctx.qclass, dns.rdatatype.A, ATTACKER_IP 80 self, qctx: QueryContex [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/forward/ans11/ |
| ans.py | 37 self, qctx: QueryContext 39 if qctx.qtype == dns.rdatatype.A: 41 "net3.", 300, qctx.qclass, dns.rdatatype.NS, "local.net3." 43 qctx.response.answer.append(ns_rrset) 45 "local.net3.", 300, qctx.qclass, dns.rdatatype.A, "10.53.0.11" 47 qctx.response.additional.append(a_rrset) 49 yield DnsResponseSend(qctx.response)
|
| /src/external/mpl/bind/dist/bin/tests/system/digdelv/ans5/ |
| ans.py | 41 self, qctx: QueryContext 53 qctx.qname, 300, qctx.qclass, dns.rdatatype.SOA, ". . 0 0 0 0 300" 55 ns_rr = dns.rrset.from_text(qctx.qname, 300, qctx.qclass, dns.rdatatype.NS, ".") 57 qctx.response.answer.append(soa_rr) 58 qctx.response.answer.append(ns_rr) 61 yield DnsResponseSend(qctx.response) 63 qctx.response.answer.append(soa_rr) 64 yield DnsResponseSend(qctx.response [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/resolver/ans2/ |
| ans.py | 87 self, qctx: QueryContext 90 if qctx.qtype == dns.rdatatype.A: 91 a_rrset = rrset(qctx.qname, dns.rdatatype.A, "192.0.2.1") 92 qctx.response.answer.append(a_rrset) 93 elif qctx.qtype == dns.rdatatype.AAAA: 94 aaaa_rrset = rrset(qctx.qname, dns.rdatatype.AAAA, "2001:db8:beef::1") 95 qctx.response.answer.append(aaaa_rrset) 96 yield DnsResponseSend(qctx.response, authoritative=True) 115 self, qctx: QueryContext 117 root_ns = rrset(qctx.qname, dns.rdatatype.NS, "a.root-servers.nil." [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/isctest/ |
| asyncserver.py | 564 def match(self, qctx: QueryContext) -> bool: 575 self, qctx: QueryContext 581 qctx.response. 583 yield DnsResponseSend(qctx.response) 595 self, qctx: QueryContext 623 def match(self, qctx: QueryContext) -> bool: 628 return qctx.qname in self._qnames 654 def match(self, qctx: QueryContext) -> bool: 659 return qctx.qtype in self._qtypes and super().match(qctx) [all...] |
| /src/external/mpl/bind/dist/bin/plugins/ |
| filter-a.c | 428 query_ctx_t *qctx; member in struct:section_filter 466 client_state_get(const query_ctx_t *qctx, filter_instance_t *inst) { 471 result = isc_ht_find(inst->ht, (const unsigned char *)&qctx->client, 472 sizeof(qctx->client), (void **)&client_state); 479 client_state_create(const query_ctx_t *qctx, filter_instance_t *inst) { 489 result = isc_ht_add(inst->ht, (const unsigned char *)&qctx->client, 490 sizeof(qctx->client), client_state); 496 client_state_destroy(const query_ctx_t *qctx, filter_instance_t *inst) { 497 filter_data_t *client_state = client_state_get(qctx, inst); 505 result = isc_ht_delete(inst->ht, (const unsigned char *)&qctx->client 585 query_ctx_t *qctx = filter->qctx; local 631 query_ctx_t *qctx = (query_ctx_t *)arg; local 652 query_ctx_t *qctx = (query_ctx_t *)arg; local 689 query_ctx_t *qctx = (query_ctx_t *)arg; local 790 query_ctx_t *qctx = (query_ctx_t *)arg; local 825 query_ctx_t *qctx = (query_ctx_t *)arg; local 861 query_ctx_t *qctx = (query_ctx_t *)arg; local [all...] |
| filter-aaaa.c | 432 query_ctx_t *qctx; member in struct:section_filter 470 client_state_get(const query_ctx_t *qctx, filter_instance_t *inst) { 475 result = isc_ht_find(inst->ht, (const unsigned char *)&qctx->client, 476 sizeof(qctx->client), (void **)&client_state); 483 client_state_create(const query_ctx_t *qctx, filter_instance_t *inst) { 493 result = isc_ht_add(inst->ht, (const unsigned char *)&qctx->client, 494 sizeof(qctx->client), client_state); 500 client_state_destroy(const query_ctx_t *qctx, filter_instance_t *inst) { 501 filter_data_t *client_state = client_state_get(qctx, inst); 509 result = isc_ht_delete(inst->ht, (const unsigned char *)&qctx->client 589 query_ctx_t *qctx = filter->qctx; local 635 query_ctx_t *qctx = (query_ctx_t *)arg; local 656 query_ctx_t *qctx = (query_ctx_t *)arg; local 693 query_ctx_t *qctx = (query_ctx_t *)arg; local 793 query_ctx_t *qctx = (query_ctx_t *)arg; local 828 query_ctx_t *qctx = (query_ctx_t *)arg; local 864 query_ctx_t *qctx = (query_ctx_t *)arg; local [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/dispatch/ans3/ |
| ans.py | 30 self, qctx: QueryContext 32 assert qctx.protocol == DnsProtocol.UDP, "This server only supports UDP" 33 qctx.response.flags |= dns.flags.TC 34 yield DnsResponseSend(qctx.response)
|
| /src/external/mpl/bind/dist/bin/tests/system/resolver/ans8/ |
| ans.py | 53 self, qctx: QueryContext 55 message = dns.message.Message(id=qctx.query.id) 67 def match(self, qctx: QueryContext) -> bool: 68 return qctx.protocol == DnsProtocol.TCP and super().match(qctx) 72 def match(self, qctx: QueryContext) -> bool: 73 return qctx.protocol == DnsProtocol.TCP 76 self, qctx: QueryContext 78 qctx.response.answer.append(rrset(qctx.qname, dns.rdatatype.A, "1.2.3.4") [all...] |
| /src/external/mpl/bind/dist/bin/tests/system/bailiwick/ans1/ |
| ans.py | 32 self, qctx: QueryContext 34 response = qctx.prepare_new_response(with_zone_data=False) 37 qctx.qname, 39 qctx.qclass, 46 "victim.", TTL, qctx.qclass, dns.rdatatype.NS, "ns.attacker." 51 "ns.attacker.", TTL, qctx.qclass, dns.rdatatype.A, ATTACKER_IP
|
| /src/external/mpl/bind/dist/bin/tests/system/statistics/ans4/ |
| ans.py | 36 self, qctx: QueryContext 41 name, 300, qctx.qclass, dns.rdatatype.NS, ns_name 44 ns_name, 300, qctx.qclass, dns.rdatatype.A, "10.53.0.3" 46 qctx.response.authority.append(ns_rrset) 47 qctx.response.additional.append(a_rrset) 48 yield DnsResponseSend(qctx.response)
|
| /src/external/mpl/bind/dist/bin/tests/system/zero/ans5/ |
| ans.py | 40 self, qctx: QueryContext 42 if qctx.qtype == dns.rdatatype.A: 44 qctx.qname, 0, qctx.qclass, dns.rdatatype.A, str(self._ip_address) 46 qctx.response.answer.append(rrset) 49 yield DnsResponseSend(qctx.response)
|
| /src/external/mpl/bind/dist/bin/tests/system/resolver/ans3/ |
| ans.py | 114 def match(self, qctx: QueryContext) -> bool: 115 return qctx.qname.labels[0].startswith(b"longcname") 118 self, qctx: QueryContext 120 first_label = qctx.qname.labels[0].replace(b"longcname", b"longcnamex") 121 cname_target = f"{dns.name.Name((first_label,) + qctx.qname.labels[1:])}" 122 qctx.response.answer.append( 123 rrset(qctx.qname, dns.rdatatype.CNAME, cname_target) 125 yield DnsResponseSend(qctx.response) 150 self, qctx: QueryContext 152 qctx.response.answer.append(rrset(qctx.qname, dns.rdatatype.A, "192.0.2.1") [all...] |