From 75cc63dfd8e2cdf316d931a018049b05a5ffbcac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 5 Aug 2025 16:33:38 +0200 Subject: [PATCH] Add docs for new functions --- pdns/dnsdistdist/docs/reference/dnsparser.rst | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/pdns/dnsdistdist/docs/reference/dnsparser.rst b/pdns/dnsdistdist/docs/reference/dnsparser.rst index 5661b7edc2..5d010c84bb 100644 --- a/pdns/dnsdistdist/docs/reference/dnsparser.rst +++ b/pdns/dnsdistdist/docs/reference/dnsparser.rst @@ -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 -- 2.47.3