from_wire(wire,
keyring=None,
request_mac='',
xfr=False,
origin=None,
tsig_ctx=None,
multi=False,
first=True,
question_only=False,
one_rr_per_rrset=False)
| source code
|
Convert a DNS wire format message into a message object.
- Parameters:
keyring (dict) - The keyring to use if the message is signed.
request_mac (string) - If the message is a response to a TSIG-signed request,
request_mac should be set to the MAC of that request.
xfr (bool) - Is this message part of a zone transfer?
origin (dns.name.Name object) - If the message is part of a zone transfer, origin should
be the origin name of the zone.
tsig_ctx (hmac.HMAC object) - The ongoing TSIG context, used when validating zone transfers.
multi (bool) - Is this message part of a multiple message sequence?
first (bool) - Is this message standalone, or the first of a multi message
sequence?
question_only (bool) - Read only up to the end of the question section?
one_rr_per_rrset (bool) - Put each RR into its own RRset
- Returns: dns.message.Message object
- Raises:
ShortHeader - The message is less than 12 octets long.
TrailingJunk - There were octets in the message past the end of the proper DNS
message.
BadEDNS - An OPT record was in the wrong section, or occurred more than once.
BadTSIG - A TSIG record was not the last record of the additional data
section.
|