The dns.xfr.Inbound Class and make_query() function¶
Inbound class provides support for inbound DNS zone transfers,
both AXFR and IXFR. It is invoked by I/O code, i.e.
dns.asyncquery.inbound_xfr(). When a message related to the
transfer arrives, the I/O code calls the
which adds the content to the pending transaction.
make_query() function is used to making the query message for
the query methods to use in more complex situations, e.g. with TSIG or
Inbound(txn_manager, rdtype=<RdataType.AXFR: 252>, serial=None, is_udp=False)¶
State machine for zone transfers.
Initialize an inbound zone transfer.
txn_manager is a
rdtype can be dns.rdatatype.AXFR or dns.rdatatype.IXFR
serial is the base serial number for IXFRs, and is required in that case.
boolindidicates if UDP is being used for this XFR.
Process one message in the transfer.
The message should have the same relativization as was specified when the dns.xfr.Inbound was created. The message should also have been created with one_rr_per_rrset=True because order matters.
Returns True if the transfer is complete, and False otherwise.
make_query(txn_manager, serial=0, use_edns=None, ednsflags=None, payload=None, request_payload=None, options=None, keyring=None, keyname=None, keyalgorithm=<DNS name hmac-sha256.>)¶
Make an AXFR or IXFR query.
txn_manager is a
dns.transaction.TransactionManager, typically a
serial is an
None. If 0, then IXFR will be attempted using the most recent serial number from the txn_manager; it is the caller’s responsibility to ensure there are no write transactions active that could invalidate the retrieved serial. If a serial cannot be determined, AXFR will be forced. Other integer values are the starting serial to use.
Noneforces an AXFR.
Returns a (query, serial) tuple.