summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2017-01-15 06:10:09 -0800
committerBob Halley <halley@dnspython.org>2017-01-15 06:10:09 -0800
commit710ac1e16b5a1d89bffa61e14cc4aa63309400ec (patch)
tree10057fa2bc3486d40fbdc1bce863725485b848cf /doc
parent1ac8189506f71b9e683e9af29431f6811ad18de1 (diff)
downloaddnspython-710ac1e16b5a1d89bffa61e14cc4aa63309400ec.tar.gz
more doco overhaul
Diffstat (limited to 'doc')
-rw-r--r--doc/exceptions.rst5
-rw-r--r--doc/message-edns.rst33
-rw-r--r--doc/message-flags.rst33
-rw-r--r--doc/message-opcode.rst20
-rw-r--r--doc/message-rcode.rst27
-rw-r--r--doc/message.rst4
6 files changed, 122 insertions, 0 deletions
diff --git a/doc/exceptions.rst b/doc/exceptions.rst
index aebabc7..8f50843 100644
--- a/doc/exceptions.rst
+++ b/doc/exceptions.rst
@@ -34,6 +34,11 @@ dns.name Exceptions
.. autoexception:: dns.name.NoIDNA2008
.. autoexception:: dns.name.NoParent
+dns.opcode Exceptions
+---------------------
+
+.. autoexception:: dns.opcode.UnknownOpcode
+
dns.rcode Exceptions
--------------------
diff --git a/doc/message-edns.rst b/doc/message-edns.rst
new file mode 100644
index 0000000..ce4f2f8
--- /dev/null
+++ b/doc/message-edns.rst
@@ -0,0 +1,33 @@
+.. _message-edns:
+
+Message EDNS Options
+--------------------
+
+EDNS allows for larger messages and also provides an extension
+mechanism for the protocol. EDNS *options* are typed data, and are
+treated much like Rdata. For example, if dnsython encouters the EDNS
+``ECS`` option code when parsing a DNS wire format message, it
+will create a ``dns.edns.ECSOption`` object to represent it.
+
+.. autodata:: dns.edns.NSID
+.. autodata:: dns.edns.DAU
+.. autodata:: dns.edns.DHU
+.. autodata:: dns.edns.N3U
+.. autodata:: dns.edns.ECS
+.. autodata:: dns.edns.EXPIRE
+.. autodata:: dns.edns.COOKIE
+.. autodata:: dns.edns.KEEPALIVE
+.. autodata:: dns.edns.PADDING
+.. autodata:: dns.edns.CHAIN
+
+.. autoclass:: dns.edns.Option
+ :members:
+
+.. autoclass:: dns.edns.GenericOption
+ :members:
+
+.. autoclass:: dns.edns.ECSOption
+ :members:
+
+.. autofunction:: dns.edns.get_option_class
+.. autofunction:: dns.edns.option_from_wire
diff --git a/doc/message-flags.rst b/doc/message-flags.rst
new file mode 100644
index 0000000..2f79343
--- /dev/null
+++ b/doc/message-flags.rst
@@ -0,0 +1,33 @@
+.. _message-flags:
+
+Message Flags
+=============
+
+DNS message flags are used for signalling of various kinds
+in the DNS protocol. For example, the ``QR`` flag indicates
+that a message is a response to a prior query.
+
+Messages flags are encoded in two locations: the DNS header
+and the EDNS flags field.
+
+Header Flags
+------------
+
+.. autodata:: dns.flags.QR
+.. autodata:: dns.flags.AA
+.. autodata:: dns.flags.TC
+.. autodata:: dns.flags.RD
+.. autodata:: dns.flags.RA
+.. autodata:: dns.flags.AD
+.. autodata:: dns.flags.CD
+
+.. autofunction:: dns.flags.from_text
+.. autofunction:: dns.flags.to_text
+
+EDNS Flags
+----------
+
+.. autodata:: dns.flags.DO
+
+.. autofunction:: dns.flags.edns_from_text
+.. autofunction:: dns.flags.edns_to_text
diff --git a/doc/message-opcode.rst b/doc/message-opcode.rst
new file mode 100644
index 0000000..ad931e8
--- /dev/null
+++ b/doc/message-opcode.rst
@@ -0,0 +1,20 @@
+.. _message-opcode:
+
+Message Opcodes
+---------------
+
+DNS Opcodes describe what kind of operation a DNS message is requesting
+or replying to. Opcodes are embedded in the flags field in the DNS
+header.
+
+.. autodata:: dns.opcode.QUERY
+.. autodata:: dns.opcode.IQUERY
+.. autodata:: dns.opcode.STATUS
+.. autodata:: dns.opcode.NOTIFY
+.. autodata:: dns.opcode.UPDATE
+
+.. autofunction:: dns.opcode.from_text
+.. autofunction:: dns.opcode.to_text
+.. autofunction:: dns.opcode.from_flags
+.. autofunction:: dns.opcode.to_flags
+.. autofunction:: dns.opcode.is_update
diff --git a/doc/message-rcode.rst b/doc/message-rcode.rst
new file mode 100644
index 0000000..6dd1bb4
--- /dev/null
+++ b/doc/message-rcode.rst
@@ -0,0 +1,27 @@
+.. _message-rcode:
+
+Message Rcodes
+--------------
+
+A DNS Rcode describes the result of a DNS request. If EDNS is not in
+use, then the rcode is encoded solely in the DNS header. If EDNS is
+in use, then the rcode is encoded using bits form both the header and
+the EDNS OPT RR.
+
+.. autodata:: dns.rcode.NOERROR
+.. autodata:: dns.rcode.FORMERR
+.. autodata:: dns.rcode.SERVFAIL
+.. autodata:: dns.rcode.NXDOMAIN
+.. autodata:: dns.rcode.NOTIMP
+.. autodata:: dns.rcode.REFUSED
+.. autodata:: dns.rcode.YXDOMAIN
+.. autodata:: dns.rcode.YXRRSET
+.. autodata:: dns.rcode.NXRRSET
+.. autodata:: dns.rcode.NOTAUTH
+.. autodata:: dns.rcode.NOTZONE
+.. autodata:: dns.rcode.BADVERS
+
+.. autofunction:: dns.rcode.from_text
+.. autofunction:: dns.rcode.to_text
+.. autofunction:: dns.rcode.from_flags
+.. autofunction:: dns.rcode.to_flags
diff --git a/doc/message.rst b/doc/message.rst
index 2a68f43..fb2f8bf 100644
--- a/doc/message.rst
+++ b/doc/message.rst
@@ -14,3 +14,7 @@ a textual form, and also read from that form.
message-class
message-make
+ message-flags
+ message-opcode
+ message-rcode
+ message-edns