class OptionType(dns.enum.IntEnum):
+ """EDNS option type codes"""
+
#: NSID
NSID = 3
#: DAU
class EDECode(dns.enum.IntEnum):
+ """DNS EDE codes"""
+
OTHER = 0
UNSUPPORTED_DNSKEY_ALGORITHM = 1
UNSUPPORTED_DS_DIGEST_TYPE = 2
class Parser:
+ """Helper class for parsing DNS wire format."""
+
def __init__(self, wire: bytes, current: int = 0):
+ """Initialize a Parser
+
+ *wire*, a ``bytes`` contains the data to be parsed, and possibly other data.
+ Typically it is the whole message or a slice of it.
+
+ *current*, an `int`, the offset within *wire* where parsing should begin.
+ """
self.wire = wire
self.current = 0
self.end = len(self.wire)
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) -n $(O)
``ECS`` option code when parsing a DNS wire format message, it
will create a ``dns.edns.ECSOption`` object to represent it.
+.. autoclass:: dns.edns.OptionType
+
.. autodata:: dns.edns.NSID
.. autodata:: dns.edns.DAU
.. autodata:: dns.edns.DHU
.. autoclass:: dns.edns.ECSOption
:members:
+.. autoclass:: dns.edns.EDECode
+
.. autoclass:: dns.edns.EDEOption
:members:
.. automodule:: dns.version
:members:
+
+.. automodule:: dns.wire
+ :members: