make_query(qname,
rdtype,
rdclass=1,
use_edns=None,
want_dnssec=False,
ednsflags=None,
payload=None,
request_payload=None,
options=None)
| source code
|
Make a query message.
The query name, type, and class may all be specified either as objects
of the appropriate type, or as strings.
The query will have a randomly chosen query id, and its DNS flags will
be set to dns.flags.RD.
- Parameters:
qname (dns.name.Name object or string) - The query name.
rdtype (int) - The desired rdata type.
rdclass (int) - The desired rdata class; the default is class IN.
use_edns (int or bool or None) - The EDNS level to use; the default is None (no EDNS). See the
description of dns.message.Message.use_edns() for the possible
values for use_edns and their meanings.
want_dnssec (bool) - Should the query indicate that DNSSEC is desired?
ednsflags (int) - EDNS flag values.
payload (int) - The EDNS sender's payload field, which is the maximum size of UDP
datagram the sender can handle.
request_payload (int or None) - The EDNS payload size to use when sending this message. If not
specified, defaults to the value of payload.
options (None or list of dns.edns.Option objects) - The EDNS options
- Returns: dns.message.Message object
|