from_wire(wire,
keyring=None,
request_mac='',
xfr=False,
origin=None,
tsig_ctx=None,
multi=False)
Convert a DNS wire format message into a message object.
-
- Parameters:
keyring -
The keyring to use if the message is signed.
(type=dict)
request_mac -
If the message is a response to a TSIG-signed request,
request_mac should be set to the MAC of that request.
(type=string)
xfr -
Is this message part of a zone transfer?
(type=bool)
origin -
If the message is part of a zone transfer, origin should be the
origin name of the zone.
(type=DNS.name.Name object)
tsig_ctx -
The ongoing TSIG context, used when validating zone transfers.
(type=hmac.HMAC object)
multi -
Is this message part of a multiple message sequence?
(type=bool)
- 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.
|