DNS Record

DNS record objects are returned by DNSQuestion:getRecords().

class DNSRecord

Represents a single DNS record.

DNSRecord.name -> DNSName

The name of the record.

DNSRecord.place -> int

The place where the record is located, - 1 for the answer section - 2 for the authority section - 3 for the additional section

DNSRecord.ttl -> int

The TTL of the record

DNSRecord.type -> int

The type of the record, for example pdns.A

classmethod DNSRecord:changeContent(newcontent)

Replace the record content with newcontent. The type and class cannot be changed.

Parameters:newcontent (str) – The replacing content
classmethod DNSRecord:getCA() → ComboAddress

If the record type is A or AAAA, a ComboAddress representing the content is returned, nil otherwise.

classmethod DNSRecord:getContent() → str

Return a string representation of the record content.