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