class DNSResourceRecord
{
public:
- DNSResourceRecord() : qclass(1), signttl(0), last_modified(0), d_place(ANSWER), auth(1), disabled(0), scopeMask(0) {};
+ DNSResourceRecord() : last_modified(0), signttl(0), qclass(1), d_place(ANSWER), scopeMask(0), auth(1), disabled(0) {};
DNSResourceRecord(const struct DNSRecord&);
~DNSResourceRecord(){};
+ enum Place : uint8_t {QUESTION=0, ANSWER=1, AUTHORITY=2, ADDITIONAL=3}; //!< Type describing the positioning of a DNSResourceRecord within, say, a DNSPacket
void setContent(const string& content);
string getZoneRepresentation() const;
// data
-
- QType qtype; //!< qtype of this record, ie A, CNAME, MX etc
- uint16_t qclass; //!< class of this record
string qname; //!< the name of this record, for example: www.powerdns.com
string wildcardname;
string content; //!< what this record points to. Example: 10.1.2.3
+
+ // Aligned on 8-byte boundries on systems where time_t is 8 bytes and int
+ // is 4 bytes, aka modern linux on x86_64
+ time_t last_modified; //!< For autocalculating SOA serial numbers - the backend needs to fill this in
+
uint32_t ttl; //!< Time To Live of this record
uint32_t signttl; //!< If non-zero, use this TTL as original TTL in the RRSIG
+
int domain_id; //!< If a backend implements this, the domain_id of the zone this record is in
- time_t last_modified; //!< For autocalculating SOA serial numbers - the backend needs to fill this in
- enum Place {QUESTION=0, ANSWER=1, AUTHORITY=2, ADDITIONAL=3}; //!< Type describing the positioning of a DNSResourceRecord within, say, a DNSPacket
- Place d_place; //!< This specifies where a record goes within the packet
+ QType qtype; //!< qtype of this record, ie A, CNAME, MX etc
+ uint16_t qclass; //!< class of this record
+ Place d_place; //!< This specifies where a record goes within the packet
+ uint8_t scopeMask;
bool auth;
bool disabled;
- uint8_t scopeMask;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)