DNS Record¶
DNS record objects are returned by DNSQuestion:getRecords() and accepted by DNSQuestion:addAnswer(), DNSQuestion:addRecord() and DNSQuestion:setRecords().
- class DNSRecord¶
Represents a single DNS record. It has these attributes:
- DNSRecord.place¶
The place where the record is located,
0 for the question section
1 for the answer section
2 for the authority section
3 for the additional section
- DNSRecord.ttl¶
The TTL of the record
- DNSRecord.type¶
The type of the record (as an integer). Can for example be compared to
pdns.A.
And the following methods:
-
DNSRecord(): changeContent(
newcontent)¶ Replace the record content with
newcontent. The type and class cannot be changed.- Parameters:¶
newcontent (
str) – The replacing content
-
DNSRecord(): getCA():
ComboAddress¶ If the record type is A or AAAA, a
ComboAddressrepresenting the content is returned, nil otherwise.
-
DNSRecord(): getContent():
str¶ Return a string representation of the record content.