From: Bert Hubert Date: Sun, 24 Aug 2008 15:37:11 +0000 (+0000) Subject: make it possible to generate ARecords from 32 bit integers directly X-Git-Tag: rec-3.2~263 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=efb265e3d802b63322542e9244430ed76de76a2c;p=pdns make it possible to generate ARecords from 32 bit integers directly git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1259 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index 8c59a7690..373eddbca 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -21,6 +21,11 @@ boilerplate_conv(A, ns_t_a, conv.xfrIP(d_ip)); +ARecordContent::ARecordContent(uint32_t ip) : DNSRecordContent(ns_t_a) +{ + d_ip = ip; +} + uint32_t ARecordContent::getIP() const { return d_ip; diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index e8b2968bb..96c0bb07e 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -54,6 +54,7 @@ private: class ARecordContent : public DNSRecordContent { public: + explicit ARecordContent(uint32_t ip); includeboilerplate(A); void doRecordCheck(const DNSRecord& dr); uint32_t getIP() const;