]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add docs for new functions
authorEnsar Sarajčić <dev@ensarsarajcic.com>
Tue, 5 Aug 2025 14:33:38 +0000 (16:33 +0200)
committerEnsar Sarajčić <dev@ensarsarajcic.com>
Tue, 5 Aug 2025 14:33:38 +0000 (16:33 +0200)
pdns/dnsdistdist/docs/reference/dnsparser.rst

index 5661b7edc2f1ce7bfd5f20c47b0357ccbec502ba..5d010c84bbf169feb150b947b3e65ad83d4287bf 100644 (file)
@@ -42,6 +42,50 @@ and then to create a :class:`DNSPacketOverlay` object:
 
   :param str packet: The DNS payload
 
+
+.. function:: parseARecord(packet, record) -> ComboAddress
+
+  .. versionadded:: 2.1.0
+
+  Returns the address from the record, as a :ref:`ComboAddress`, if it's qtype is A.
+  Nil is returned otherwise.
+
+  :param str packet: The DNS payload.
+  :param DNSRecord record: The record to parse.
+
+
+.. function:: parseAAAARecord(packet, record) -> ComboAddress
+
+  .. versionadded:: 2.1.0
+
+  Returns the address from the record, as a :ref:`ComboAddress`, if it's qtype is AAAA.
+  Nil is returned otherwise.
+
+  :param str packet: The DNS payload.
+  :param DNSRecord record: The record to parse.
+
+
+.. function:: parseAddressRecord(packet, record) -> ComboAddress
+
+  .. versionadded:: 2.1.0
+
+  Returns the address from the record, as a :ref:`ComboAddress`, if it's qtype is A or AAAA.
+  Nil is returned otherwise.
+
+  :param str packet: The DNS payload.
+  :param DNSRecord record: The record to parse.
+
+
+.. function:: parseCNAMERecord(packet, record) -> DNSName
+
+  .. versionadded:: 2.1.0
+
+  Returns the name from the record, as a :ref:`DNSName`, if it's qtype is CNAME.
+  Nil is returned otherwise.
+
+  :param str packet: The DNS payload.
+  :param DNSRecord record: The record to parse.
+
 .. _DNSPacketOverlay:
 
 DNSPacketOverlay