]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/dnsdistdist/docs/reference/dq.rst
fix links to DNSClass overview
[thirdparty/pdns.git] / pdns / dnsdistdist / docs / reference / dq.rst
index b6f7641eb963e1d63d974ed2c50b334fa5c9b2b7..a02c9d2da36b76e8081e64ad7c927c953b5897c5 100644 (file)
@@ -38,7 +38,7 @@ This state can be modified from the various hooks.
   .. attribute:: DNSQuestion.qclass
 
     QClass (as an unsigned integer) of this question.
-    Can be compared against :ref:`DNSQClass`.
+    Can be compared against :ref:`DNSClass`.
 
   .. attribute:: DNSQuestion.qname
 
@@ -47,7 +47,7 @@ This state can be modified from the various hooks.
   .. attribute:: DNSQuestion.qtype
 
     QType (as an unsigned integer) of this question.
-    Can be compared against ``dnsdist.A``, ``dnsdist.AAAA`` etc.
+    Can be compared against the pre-defined :ref:`constants <DNSQType>` like ``DNSQType.A``, DNSQType.AAAA``.
 
   .. attribute:: DNSQuestion.remoteaddr
 
@@ -92,6 +92,15 @@ This state can be modified from the various hooks.
 
     :returns: A table of EDNSOptionView objects, indexed on the ECS Option code
 
+  .. method:: DNSQuestion:getServerNameIndication() -> string
+
+    .. versionadded:: 1.4.0
+
+    Return the TLS Server Name Indication (SNI) value sent by the client over DoT or DoH, if any. See :func:`SNIRule`
+    for more information, especially about the availability of SNI over DoH.
+
+    :returns: A string containing the TLS SNI value, if any
+
   .. method:: DNSQuestion:getTag(key) -> string
 
     .. versionadded:: 1.2.0
@@ -109,6 +118,14 @@ This state can be modified from the various hooks.
 
     :returns: A table of tags, using strings as keys and values
 
+  .. method:: DNSQuestion:getTrailingData() -> string
+
+    .. versionadded:: 1.4.0
+
+    Get all data following the DNS message.
+
+    :returns: The trailing data as a null-safe string
+
   .. method:: DNSQuestion:sendTrap(reason)
 
     .. versionadded:: 1.2.0
@@ -134,6 +151,15 @@ This state can be modified from the various hooks.
 
     :param table tags: A table of tags, using strings as keys and values
 
+  .. method:: DNSQuestion:setTrailingData(tail) -> bool
+
+    .. versionadded:: 1.4.0
+
+    Set the data following the DNS message, overwriting anything already present.
+
+    :param string tail: The new data
+    :returns: true if the operation succeeded, false otherwise
+
 .. _DNSResponse:
 
 DNSResponse object
@@ -152,8 +178,8 @@ DNSResponse object
     All parameters to ``func`` are integers:
 
     - ``section`` is the section in the packet and can be compared to :ref:`DNSSection`
-    - ``qclass`` is the QClass of the record. Can be compared to :ref:`DNSQClass`
-    - ``qtype`` is the QType of the record. Can be e.g. compared to ``dnsdist.A``, ``dnsdist.AAAA`` and the like.
+    - ``qclass`` is the QClass of the record. Can be compared to :ref:`DNSClass`
+    - ``qtype`` is the QType of the record. Can be e.g. compared to ``DNSQType.A``, ``DNSQType.AAAA`` :ref:`constants <DNSQType>` and the like.
     - ``ttl`` is the current TTL
 
     This function must return an integer with the new TTL.
@@ -214,7 +240,7 @@ EDNSOptionView object
 
   An object that represents the values of a single EDNS option received in a query.
 
-  .. attribute:: EDNSOptionView.count -> int
+  .. method:: EDNSOptionView:count()
 
     The number of values for this EDNS option.