Lines Matching defs:dns
22 import dns, dns.message, dns.query, dns.flags
23 from dns.rdatatype import *
24 from dns.rdataclass import *
25 from dns.rcode import *
26 from dns.name import *
44 m = dns.message.from_wire(msg)
47 typename = dns.rdatatype.to_text(rrtype)
53 r = dns.message.make_response(m)
69 r.answer.append(dns.rrset.from_text(qname, 1, IN, A, "10.53.0.10"))
70 r.answer.append(dns.rrset.from_text(qname, 1, IN, RRSIG, rrsig))
72 r.answer.append(dns.rrset.from_text(qname, 1, IN, NS, "."))
74 r.answer.append(dns.rrset.from_text(qname, 1, IN, SOA, ". . 0 0 0 0 0"))
76 r.authority.append(dns.rrset.from_text(qname, 1, IN, SOA, ". . 0 0 0 0 0"))
77 r.flags |= dns.flags.AA
153 print(dns.rcode.to_text(rsp.rcode()))