From: Ensar Sarajčić Date: Tue, 5 Aug 2025 14:33:38 +0000 (+0200) Subject: Add docs for new functions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75cc63dfd8e2cdf316d931a018049b05a5ffbcac;p=thirdparty%2Fpdns.git Add docs for new functions --- 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