Lines Matching refs:DNS
29 """Returns whether the two dpkt.dns.DNS.RR objects are equal."""
32 dpkt.dns.DNS.RR.__slots__)
34 # packed string depends on other RR and Q elements on the same DNS/mDNS
56 This class implements part of the Multicast DNS RFC 6762 able to simulate
81 # For example: _peer_records['somehost.local'][dpkt.dns.DNS_A] \
136 # Parse the mDNS request using dpkt's DNS module.
137 mdns = dpkt.dns.DNS(data)
140 dpkt.dns.DNS_A: self._process_A,
141 dpkt.dns.DNS_PTR: self._process_PTR,
142 dpkt.dns.DNS_TXT: self._process_TXT,
143 dpkt.dns.DNS_SRV: self._process_SRV,
150 elif q.type == dpkt.dns.DNS_ANY:
173 if rr.type == dpkt.dns.DNS_A:
175 elif rr.type == dpkt.dns.DNS_PTR:
177 elif rr.type == dpkt.dns.DNS_TXT:
179 elif rr.type == dpkt.dns.DNS_SRV:
212 response containing the list of answers of the type dpkt.dns.DNS.RR.
220 resp_dns = dpkt.dns.DNS(
221 op = dpkt.dns.DNS_AA, # Authoritative Answer.
222 rcode = dpkt.dns.DNS_RCODE_NOERR,
225 resp_dns.qr = dpkt.dns.DNS_R, # Response.
229 ### RFC 2782 - RR for specifying the location of services (DNS SRV).
252 @param q: The dns.DNS.Q query object with type dpkt.dns.DNS_SRV.
253 @return: A list of dns.DNS.RR responses to the provided query that can
260 ans = dpkt.dns.DNS.RR(
261 type = dpkt.dns.DNS_SRV,
262 cls = dpkt.dns.DNS_IN | DNS_CACHE_FLUSH,
271 a_qry = dpkt.dns.DNS.Q(name=full_hostname, type=dpkt.dns.DNS_A)
292 @param q: The dns.DNS.Q query object with type dpkt.dns.DNS_A.
293 @return: A list of dns.DNS.RR responses to the provided query that can
300 answers.append(dpkt.dns.DNS.RR(
301 type = dpkt.dns.DNS_A,
302 cls = dpkt.dns.DNS_IN | DNS_CACHE_FLUSH,
328 @param q: The dns.DNS.Q query object with type dpkt.dns.DNS_PTR.
329 @return: A list of dns.DNS.RR responses to the provided query that can
336 answers.append(dpkt.dns.DNS.RR(
337 type = dpkt.dns.DNS_PTR,
338 cls = dpkt.dns.DNS_IN, # Don't cache flush for PTR records.
361 self._send_answers(self._process_TXT(dpkt.dns.DNS.Q(name=domain)))
367 @param q: The dns.DNS.Q query object with type dpkt.dns.DNS_TXT.
368 @return: A list of dns.DNS.RR responses to the provided query that can
374 answer = dpkt.dns.DNS.RR(
375 type = dpkt.dns.DNS_TXT,
376 cls = dpkt.dns.DNS_IN | DNS_CACHE_FLUSH,
427 @param rrtype: The DNS record type. For example, dpkt.dns.DNS_TXT.
453 domain name you are requesting for and the rrtype is the DNS record
454 type. For example, ('somehost.local', dpkt.dns.DNS_ANY).
457 queries = [dpkt.dns.DNS.Q(name=rrname, type=rrtype)
461 mdns = dpkt.dns.DNS(
462 op = dpkt.dns.DNS_QUERY,
473 rrtype, data) where rrname is the domain name, rrtype the DNS record