summaryrefslogtreecommitdiff
path: root/dns/wire.py
Commit message (Collapse)AuthorAgeFilesLines
* Adds support for reading TSIG text format.Brian Wellington2020-08-101-0/+3
| | | | | | | | | | | | | | | | Implements from_text for the TSIG record type, and clean up some other things. Fixes the text format to emit fields in the right order; fudge and time_signed were reversed. This also matches BIND's output format now. Add get_uint48() to the tokenizer, so that from_text() can use it. Add get_uint48() to the wire parser, and use it in from_wire, for consistency. Change dns.tsig.sign() to use rdata.replace() rather than constructing a new TSIG record manually; this couldn't be done before, because replace() uses text format for validation.
* Rework wire format processing.Bob Halley2020-07-021-0/+82
Wire format data is now done via a dns.wire.Parser, which does all of the bookkeeping and also provides convenience routines (e.g. get_uint16() or get_name()).