]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3056. [func] Added support for URI resource record. [RT #23386]
authorMark Andrews <marka@isc.org>
Fri, 26 Apr 2013 04:35:30 +0000 (14:35 +1000)
committerMark Andrews <marka@isc.org>
Fri, 26 Apr 2013 04:35:30 +0000 (14:35 +1000)
(cherry picked from commit 23f39935026e11aced2b4adcf7f0863761bd9a7f)

CHANGES
bin/tests/named.conf
bin/tests/rdata_test.c
bin/tests/system/genzone.sh
bin/tests/system/xfer/dig1.good
bin/tests/system/xfer/dig2.good
lib/dns/rdata.c
lib/dns/rdata/generic/uri_256.c [new file with mode: 0644]
lib/dns/rdata/generic/uri_256.h [new file with mode: 0644]
util/copyrights

diff --git a/CHANGES b/CHANGES
index 5f288d857fc11ac200330907513addf10cc81519..4b49732b1a58b9001ee9783832f8250d2d0e0c23 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -16,6 +16,8 @@
 3547.  [bug]           Some malformed unknown rdata records were not properly
                        detected and rejected. [RT #33129]
 
+3056.  [func]          Added support for URI resource record. [RT #23386]
+
        --- 9.8.5rc1 released ---
 
 3546.  [func]          Add EUI48 and EUI64 types. [RT #33082]
index 1f96981d117c082837ba78bb0806d8bb453cc62b..5766b3a7601cc40d5342603d7f6ed521de15204b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.58 2007/06/19 23:46:59 tbox Exp $ */
+/* $Id: named.conf,v 1.59 2011/03/03 14:10:26 fdupont Exp $ */
 
 /*
  * This is a worthless, nonrunnable example of a named.conf file that has
@@ -394,7 +394,7 @@ zone "non-default-acl.demo.zone" {
                grant root.domain. name host.domain. a ns md mf cname soa mb mg
                        mr "null" wks ptr hinfo minfo mx txt rp afsdb x25
                        isdn rt nsap sig "key" px gpos aaaa loc nxt srv naptr kx
-                       cert a6 dname opt unspec tkey tsig ;
+                       cert a6 dname opt unspec uri tkey tsig ;
                grant foo.bar.com. self foo.bar.com. a;
        };
 };
index 1aec63a2407ad0756c740e94c51eb5dd7313a0ff..0ccde9fc0883f7b6d07105ec65aa37ef21c9b89a 100644 (file)
@@ -15,8 +15,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rdata_test.c,v 1.48.814.2 2011/08/28 23:45:47 tbox Exp $ */
-
 #include <config.h>
 
 #include <stdlib.h>
@@ -279,6 +277,11 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
                result = dns_rdata_tostruct(rdata, sp = &unspec, NULL);
                break;
        }
+       case dns_rdatatype_uri: {
+               dns_rdata_uri_t uri;
+               result = dns_rdata_tostruct(rdata, sp = &uri, NULL);
+               break;
+       }
        case dns_rdatatype_wks: {
                static dns_rdata_in_wks_t in_wks;
                result = dns_rdata_tostruct(rdata, sp = &in_wks, NULL);
@@ -541,6 +544,11 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
                result = dns_rdata_tostruct(rdata, sp = &unspec, mctx);
                break;
        }
+       case dns_rdatatype_uri: {
+               dns_rdata_uri_t uri;
+               result = dns_rdata_tostruct(rdata, sp = &uri, mctx);
+               break;
+       }
        case dns_rdatatype_wks: {
                static dns_rdata_in_wks_t in_wks;
                result = dns_rdata_tostruct(rdata, sp = &in_wks, mctx);
@@ -833,6 +841,11 @@ viastruct(dns_rdata_t *rdata, isc_mem_t *mctx,
                result = dns_rdata_fromstruct(rdata2, rdc, rdt, &unspec, b);
                break;
        }
+       case dns_rdatatype_uri: {
+               dns_rdata_uri_t uri;
+               result = dns_rdata_fromstruct(rdata2, rdc, rdt, &uri, b);
+               break;
+       }
        case dns_rdatatype_wks: {
                dns_rdata_in_wks_t in_wks;
                result = dns_rdata_fromstruct(rdata2, rdc, rdt, &in_wks, b);
index da3baa08af4266a362f8fd0b3856d2ac0f5ba239..5b3ed8775b86c6ec24bb4b1885e2c93831e951e8 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 #
 # Set up a test zone
 #
@@ -289,4 +287,9 @@ eui64                       EUI64   01-23-45-67-89-ab-cd-ef
 
 ; type 255
 ; TSIG is a meta-type and should never occur in master files.
+
+; type 256
+uri01                  URI     10 20 "https://www.isc.org/"
+uri02                  URI     30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/"
+
 EOF
index cec8278a937a1db924ba16eb9bb8f8ac4d05415b..adfd6656fb47779d7cfeada04918f8c396d7f489 100644 (file)
@@ -82,6 +82,8 @@ txt09.example.                3600    IN      TXT     "foo\010bar"
 txt10.example.         3600    IN      TXT     "foo bar"
 txt11.example.         3600    IN      TXT     "\"foo\""
 txt12.example.         3600    IN      TXT     "\"foo\""
+uri01.example.         3600    IN      URI     10 20 "https://www.isc.org/"
+uri02.example.         3600    IN      URI     30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/"
 wks01.example.         3600    IN      WKS     10.0.0.1 6 0 1 2 21 23
 wks02.example.         3600    IN      WKS     10.0.0.1 17 0 1 2 53
 wks03.example.         3600    IN      WKS     10.0.0.2 6 65535
index 2cd53c98e52774013ea338b7e2df0328dd25cf8e..977720e54a64c522b86c9808f0f7067207261e4e 100644 (file)
@@ -82,6 +82,8 @@ txt09.example.                3600    IN      TXT     "foo\010bar"
 txt10.example.         3600    IN      TXT     "foo bar"
 txt11.example.         3600    IN      TXT     "\"foo\""
 txt12.example.         3600    IN      TXT     "\"foo\""
+uri01.example.         3600    IN      URI     10 20 "https://www.isc.org/"
+uri02.example.         3600    IN      URI     30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/"
 wks01.example.         3600    IN      WKS     10.0.0.1 6 0 1 2 21 23
 wks02.example.         3600    IN      WKS     10.0.0.1 17 0 1 2 53
 wks03.example.         3600    IN      WKS     10.0.0.2 6 65535
index 930ff74ea1ffafa43960b9c3463bbde11bd3df82..3865f42fe086e98ab74f948b725d3e39a9c226b9 100644 (file)
@@ -15,8 +15,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 /*! \file */
 
 #include <config.h>
@@ -124,6 +122,15 @@ txt_fromtext(isc_textregion_t *source, isc_buffer_t *target);
 static isc_result_t
 txt_fromwire(isc_buffer_t *source, isc_buffer_t *target);
 
+static isc_result_t
+multitxt_totext(isc_region_t *source, isc_buffer_t *target);
+
+static isc_result_t
+multitxt_fromtext(isc_textregion_t *source, isc_buffer_t *target);
+
+static isc_result_t
+multitxt_fromwire(isc_buffer_t *source, isc_buffer_t *target);
+
 static isc_boolean_t
 name_prefix(dns_name_t *name, dns_name_t *origin, dns_name_t *target);
 
@@ -1259,6 +1266,157 @@ txt_fromwire(isc_buffer_t *source, isc_buffer_t *target) {
        return (ISC_R_SUCCESS);
 }
 
+static isc_result_t
+multitxt_totext(isc_region_t *source, isc_buffer_t *target) {
+       unsigned int tl;
+       unsigned int n0, n;
+       unsigned char *sp;
+       char *tp;
+       isc_region_t region;
+
+       isc_buffer_availableregion(target, &region);
+       sp = source->base;
+       tp = (char *)region.base;
+       tl = region.length;
+
+       if (tl < 1)
+               return (ISC_R_NOSPACE);
+       *tp++ = '"';
+       tl--;
+       do {
+               n0 = n = *sp++;
+
+               REQUIRE(n0 + 1 <= source->length);
+
+               while (n--) {
+                       if (*sp < 0x20 || *sp >= 0x7f) {
+                               if (tl < 4)
+                                       return (ISC_R_NOSPACE);
+                               *tp++ = 0x5c;
+                               *tp++ = 0x30 + ((*sp / 100) % 10);
+                               *tp++ = 0x30 + ((*sp / 10) % 10);
+                               *tp++ = 0x30 + (*sp % 10);
+                               sp++;
+                               tl -= 4;
+                               continue;
+                       }
+                       /* double quote, semi-colon, backslash */
+                       if (*sp == 0x22 || *sp == 0x3b || *sp == 0x5c) {
+                               if (tl < 2)
+                                       return (ISC_R_NOSPACE);
+                               *tp++ = '\\';
+                               tl--;
+                       }
+                       if (tl < 1)
+                               return (ISC_R_NOSPACE);
+                       *tp++ = *sp++;
+                       tl--;
+               }
+               isc_region_consume(source, n0 + 1);
+       } while (source->length != 0);
+       if (tl < 1)
+               return (ISC_R_NOSPACE);
+       *tp++ = '"';
+       tl--;
+       isc_buffer_add(target, tp - (char *)region.base);
+       return (ISC_R_SUCCESS);
+}
+
+static isc_result_t
+multitxt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
+       isc_region_t tregion;
+       isc_boolean_t escape;
+       unsigned int n, nrem;
+       char *s;
+       unsigned char *t0, *t;
+       int d;
+       int c;
+
+       s = source->base;
+       n = source->length;
+       escape = ISC_FALSE;
+
+       do {
+               isc_buffer_availableregion(target, &tregion);
+               t0 = tregion.base;
+               nrem = tregion.length;
+               if (nrem < 1)
+                       return (ISC_R_NOSPACE);
+               /* length byte */
+               t = t0;
+               nrem--;
+               t++;
+               /* 255 byte character-string slice */
+               if (nrem > 255)
+                       nrem = 255;
+               while (n != 0) {
+                       --n;
+                       c = (*s++) & 0xff;
+                       if (escape && (d = decvalue((char)c)) != -1) {
+                               c = d;
+                               if (n == 0)
+                                       return (DNS_R_SYNTAX);
+                               n--;
+                               if ((d = decvalue(*s++)) != -1)
+                                       c = c * 10 + d;
+                               else
+                                       return (DNS_R_SYNTAX);
+                               if (n == 0)
+                                       return (DNS_R_SYNTAX);
+                               n--;
+                               if ((d = decvalue(*s++)) != -1)
+                                       c = c * 10 + d;
+                               else
+                                       return (DNS_R_SYNTAX);
+                               if (c > 255)
+                                       return (DNS_R_SYNTAX);
+                       } else if (!escape && c == '\\') {
+                               escape = ISC_TRUE;
+                               continue;
+                       }
+                       escape = ISC_FALSE;
+                       *t++ = c;
+                       nrem--;
+                       if (nrem == 0)
+                               break;
+               }
+               if (escape)
+                       return (DNS_R_SYNTAX);
+               *t0 = t - t0 - 1;
+               isc_buffer_add(target, *t0 + 1);
+       } while (n != 0);
+       return (ISC_R_SUCCESS);
+}
+
+static isc_result_t
+multitxt_fromwire(isc_buffer_t *source, isc_buffer_t *target) {
+       unsigned int n;
+       isc_region_t sregion;
+       isc_region_t tregion;
+
+       isc_buffer_activeregion(source, &sregion);
+       if (sregion.length == 0)
+               return(ISC_R_UNEXPECTEDEND);
+       n = 256U;
+       do {
+               if (n != 256U)
+                       return (DNS_R_SYNTAX);
+               n = *sregion.base + 1;
+               if (n > sregion.length)
+                       return (ISC_R_UNEXPECTEDEND);
+
+               isc_buffer_availableregion(target, &tregion);
+               if (n > tregion.length)
+                       return (ISC_R_NOSPACE);
+
+               memcpy(tregion.base, sregion.base, n);
+               isc_buffer_forward(source, n);
+               isc_buffer_add(target, n);
+               isc_buffer_activeregion(source, &sregion);
+       } while (sregion.length != 0);
+       return (ISC_R_SUCCESS);
+}
+
 static isc_boolean_t
 name_prefix(dns_name_t *name, dns_name_t *origin, dns_name_t *target) {
        int l1, l2;
diff --git a/lib/dns/rdata/generic/uri_256.c b/lib/dns/rdata/generic/uri_256.c
new file mode 100644 (file)
index 0000000..aa5b194
--- /dev/null
@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 2011-2013  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id: uri_256.c,v 1.2 2011/03/03 14:10:27 fdupont Exp $ */
+
+#ifndef GENERIC_URI_256_C
+#define GENERIC_URI_256_C 1
+
+#define RRTYPE_URI_ATTRIBUTES (0)
+
+static inline isc_result_t
+fromtext_uri(ARGS_FROMTEXT) {
+       isc_token_t token;
+
+       REQUIRE(type == 256);
+
+       UNUSED(type);
+       UNUSED(rdclass);
+       UNUSED(origin);
+       UNUSED(options);
+       UNUSED(callbacks);
+
+       /*
+        * Priority
+        */
+       RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+                                     ISC_FALSE));
+       if (token.value.as_ulong > 0xffffU)
+               RETTOK(ISC_R_RANGE);
+       RETERR(uint16_tobuffer(token.value.as_ulong, target));
+
+       /*
+        * Weight
+        */
+       RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+                                     ISC_FALSE));
+       if (token.value.as_ulong > 0xffffU)
+               RETTOK(ISC_R_RANGE);
+       RETERR(uint16_tobuffer(token.value.as_ulong, target));
+
+       /*
+        * Target URI
+        */
+       RETERR(isc_lex_getmastertoken(lexer, &token,
+                                     isc_tokentype_qstring, ISC_FALSE));
+       if (token.type != isc_tokentype_qstring)
+               RETTOK(DNS_R_SYNTAX);
+       RETTOK(multitxt_fromtext(&token.value.as_textregion, target));
+       return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+totext_uri(ARGS_TOTEXT) {
+       isc_region_t region;
+       unsigned short priority, weight;
+       char buf[sizeof("65000 ")];
+
+       UNUSED(tctx);
+
+       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->length != 0);
+
+       dns_rdata_toregion(rdata, &region);
+
+       /*
+        * Priority
+        */
+       priority = uint16_fromregion(&region);
+       isc_region_consume(&region, 2);
+       sprintf(buf, "%u ", priority);
+       RETERR(str_totext(buf, target));
+
+       /*
+        * Weight
+        */
+       weight = uint16_fromregion(&region);
+       isc_region_consume(&region, 2);
+       sprintf(buf, "%u ", weight);
+       RETERR(str_totext(buf, target));
+
+       /*
+        * Target URI
+        */
+       RETERR(multitxt_totext(&region, target));
+       return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+fromwire_uri(ARGS_FROMWIRE) {
+       isc_region_t region;
+
+       REQUIRE(type == 256);
+
+       UNUSED(type);
+       UNUSED(rdclass);
+       UNUSED(dctx);
+       UNUSED(options);
+
+       /*
+        * Priority, weight
+        */
+       isc_buffer_activeregion(source, &region);
+       if (region.length < 4)
+               return (ISC_R_UNEXPECTEDEND);
+       RETERR(mem_tobuffer(target, region.base, 4));
+       isc_buffer_forward(source, 4);
+
+       /*
+        * Target URI
+        */
+       RETERR(multitxt_fromwire(source, target));
+
+       return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+towire_uri(ARGS_TOWIRE) {
+       isc_region_t region;
+
+       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->length != 0);
+
+       UNUSED(cctx);
+
+       dns_rdata_toregion(rdata, &region);
+       return (mem_tobuffer(target, region.base, region.length));
+}
+
+static inline int
+compare_uri(ARGS_COMPARE) {
+       isc_region_t r1;
+       isc_region_t r2;
+       int order;
+
+       REQUIRE(rdata1->type == rdata2->type);
+       REQUIRE(rdata1->rdclass == rdata2->rdclass);
+       REQUIRE(rdata1->type == 256);
+       REQUIRE(rdata1->length != 0);
+       REQUIRE(rdata2->length != 0);
+
+       dns_rdata_toregion(rdata1, &r1);
+       dns_rdata_toregion(rdata2, &r2);
+
+       /*
+        * Priority
+        */
+       order = memcmp(r1.base, r2.base, 2);
+       if (order != 0)
+               return (order < 0 ? -1 : 1);
+       isc_region_consume(&r1, 2);
+       isc_region_consume(&r2, 2);
+
+       /*
+        * Weight
+        */
+       order = memcmp(r1.base, r2.base, 2);
+       if (order != 0)
+               return (order < 0 ? -1 : 1);
+       isc_region_consume(&r1, 2);
+       isc_region_consume(&r2, 2);
+
+       return (isc_region_compare(&r1, &r2));
+}
+
+static inline isc_result_t
+fromstruct_uri(ARGS_FROMSTRUCT) {
+       dns_rdata_uri_t *uri = source;
+       isc_region_t region;
+       isc_uint8_t len;
+
+       REQUIRE(type == 256);
+       REQUIRE(source != NULL);
+       REQUIRE(uri->common.rdtype == type);
+       REQUIRE(uri->common.rdclass == rdclass);
+       REQUIRE(uri->target != NULL && uri->tgt_len != 0);
+
+       UNUSED(type);
+       UNUSED(rdclass);
+
+       /*
+        * Priority
+        */
+       RETERR(uint16_tobuffer(uri->priority, target));
+
+       /*
+        * Weight
+        */
+       RETERR(uint16_tobuffer(uri->weight, target));
+
+       /*
+        * Target URI
+        */
+       len = 255U;
+       region.base = uri->target;
+       region.length = uri->tgt_len;
+       while (region.length > 0) {
+               REQUIRE(len == 255U);
+               len = uint8_fromregion(&region);
+               isc_region_consume(&region, 1);
+               if (region.length < len)
+                       return (ISC_R_UNEXPECTEDEND);
+               isc_region_consume(&region, len);
+       }
+
+       return (mem_tobuffer(target, uri->target, uri->tgt_len));
+}
+
+static inline isc_result_t
+tostruct_uri(ARGS_TOSTRUCT) {
+       dns_rdata_uri_t *uri = target;
+       isc_region_t sr;
+
+       REQUIRE(rdata->type == 256);
+       REQUIRE(target != NULL);
+       REQUIRE(rdata->length != 0);
+
+       uri->common.rdclass = rdata->rdclass;
+       uri->common.rdtype = rdata->type;
+       ISC_LINK_INIT(&uri->common, link);
+
+       dns_rdata_toregion(rdata, &sr);
+
+       /*
+        * Priority
+        */
+       if (sr.length < 2)
+               return (ISC_R_UNEXPECTEDEND);
+       uri->priority = uint16_fromregion(&sr);
+       isc_region_consume(&sr, 2);
+
+       /*
+        * Weight
+        */
+       if (sr.length < 2)
+               return (ISC_R_UNEXPECTEDEND);
+       uri->weight = uint16_fromregion(&sr);
+       isc_region_consume(&sr, 2);
+
+       /*
+        * Target URI
+        */
+       uri->tgt_len = sr.length;
+       uri->target = mem_maybedup(mctx, sr.base, sr.length);
+       if (uri->target == NULL)
+               return (ISC_R_NOMEMORY);
+
+       uri->mctx = mctx;
+       return (ISC_R_SUCCESS);
+}
+
+static inline void
+freestruct_uri(ARGS_FREESTRUCT) {
+       dns_rdata_uri_t *uri = (dns_rdata_uri_t *) source;
+
+       REQUIRE(source != NULL);
+       REQUIRE(uri->common.rdtype == 256);
+
+       if (uri->mctx == NULL)
+               return;
+
+       if (uri->target != NULL)
+               isc_mem_free(uri->mctx, uri->target);
+       uri->mctx = NULL;
+}
+
+static inline isc_result_t
+additionaldata_uri(ARGS_ADDLDATA) {
+       REQUIRE(rdata->type == 256);
+
+       UNUSED(rdata);
+       UNUSED(add);
+       UNUSED(arg);
+
+       return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+digest_uri(ARGS_DIGEST) {
+       isc_region_t r;
+
+       REQUIRE(rdata->type == 256);
+
+       dns_rdata_toregion(rdata, &r);
+
+       return ((digest)(arg, &r));
+}
+
+static inline isc_boolean_t
+checkowner_uri(ARGS_CHECKOWNER) {
+
+       REQUIRE(type == 256);
+
+       UNUSED(name);
+       UNUSED(type);
+       UNUSED(rdclass);
+       UNUSED(wildcard);
+
+       return (ISC_TRUE);
+}
+
+static inline isc_boolean_t
+checknames_uri(ARGS_CHECKNAMES) {
+
+       REQUIRE(rdata->type == 256);
+
+       UNUSED(rdata);
+       UNUSED(owner);
+       UNUSED(bad);
+
+       return (ISC_TRUE);
+}
+
+static inline int
+casecompare_uri(ARGS_COMPARE) {
+       return (compare_uri(rdata1, rdata2));
+}
+
+#endif /* GENERIC_URI_256_C */
diff --git a/lib/dns/rdata/generic/uri_256.h b/lib/dns/rdata/generic/uri_256.h
new file mode 100644 (file)
index 0000000..5061c03
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2011-2013  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef GENERIC_URI_256_H
+#define GENERIC_URI_256_H 1
+
+/* $Id: uri_256.h,v 1.2 2011/03/03 14:10:27 fdupont Exp $ */
+
+typedef struct dns_rdata_uri {
+       dns_rdatacommon_t       common;
+       isc_mem_t *             mctx;
+       isc_uint16_t            priority;
+       isc_uint16_t            weight;
+       unsigned char *         target;
+       isc_uint16_t            tgt_len;
+} dns_rdata_uri_t;
+
+#endif /* GENERIC_URI_256_H */
index dea19f9bb993acd7fba053c5325224b93ff9cd39..103a27eba59512e4c8d730e208d45c4f9ccfe312 100644 (file)
@@ -1,3 +1,5 @@
+./lib/dns/rdata/generic/uri_256.c              C       2011,2012,2013
+./lib/dns/rdata/generic/uri_256.h              C       2011,2012,2013
 ./.gitignore                                   X       2012
 ./Atffile                                      X       2011
 ./CHANGES                                      X       2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013