]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make it possible to read 'fancy records' using the zoneparser-tng, which in turn...
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 18 Nov 2008 12:48:42 +0000 (12:48 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 18 Nov 2008 12:48:42 +0000 (12:48 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1298 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/backends/bind/zone2sql.cc
pdns/dnsrecords.cc
pdns/dnsrecords.hh
regression-tests/test.com

index a3f3eec2a658385e073f95768520c9b8666f3622..bfaa0ae0d2da3238a914d566fe43a21f63b14dd1 100644 (file)
@@ -168,6 +168,7 @@ int main(int argc, char **argv)
 {
   try {
     reportAllTypes();
+    reportFancyTypes();
 #if __GNUC__ >= 3
     ios_base::sync_with_stdio(false);
 #endif
index 0588c0af27e6886676d3fa9bac88abe51442becb..ed58468860d6a12b365a499c0a272cfdb8566baa 100644 (file)
@@ -342,6 +342,9 @@ boilerplate_conv(DNSKEY, 48,
                 conv.xfrBlob(d_key);
                 )
 
+boilerplate_conv(URL, 256, 
+                conv.xfrLabel(d_url);
+                )
 
 bool getEDNSOpts(const MOADNSParser& mdp, EDNSOpts* eo)
 {
@@ -403,6 +406,11 @@ void reportOtherTypes()
    OPTRecordContent::report();
 }
 
+void reportFancyTypes()
+{
+  URLRecordContent::report();
+}
+
 void reportAllTypes()
 {
   reportBasicTypes();
index 96c0bb07e8ece4b3e551ee354be01ff85396f7b8..35f70d6c33fde513ebd310a1141db50ebe825734 100644 (file)
@@ -364,6 +364,14 @@ public:
 private:
 };
 
+class URLRecordContent : public DNSRecordContent // Fake, 'fancy record' with type 256
+{
+public:
+  includeboilerplate(URL)
+private:
+  string d_url;
+};
+
 #define boilerplate(RNAME, RTYPE)                                                                         \
 RNAME##RecordContent::DNSRecordContent* RNAME##RecordContent::make(const DNSRecord& dr, PacketReader& pr) \
 {                                                                                                  \
@@ -438,5 +446,6 @@ bool getEDNSOpts(const MOADNSParser& mdp, EDNSOpts* eo);
 void reportBasicTypes();
 void reportOtherTypes();
 void reportAllTypes();
+void reportFancyTypes();
 
 #endif 
index debd8fd34bfe02e4abdbf06cf3bd44060dd097aa..dfc9530538a3b55142bed5360cf1a555729cddb4 100644 (file)
@@ -23,3 +23,4 @@ _double._tcp.dc               IN      SRV     0 100 389 server1
 _double._tcp.dc                IN      SRV     1 100 389 server1
 blah                   IN      NS      blah
 blah                   IN      A       9.9.9.9
+images                 IN      URL     "http://www.ds9a.nl"