From 18a4aa1dc87dcede6cf8f8edb8d340929d2ee52b Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Thu, 30 Mar 2000 00:57:23 +0000 Subject: [PATCH] Add dns_name_dupwithoffsets(). --- lib/dns/include/dns/name.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/dns/include/dns/name.h b/lib/dns/include/dns/name.h index 6eae9d442d..0d6045b4ec 100644 --- a/lib/dns/include/dns/name.h +++ b/lib/dns/include/dns/name.h @@ -197,6 +197,7 @@ struct dns_name { #define DNS_NAMEATTR_ABSOLUTE 0x0001 #define DNS_NAMEATTR_READONLY 0x0002 #define DNS_NAMEATTR_DYNAMIC 0x0004 +#define DNS_NAMEATTR_DYNOFFSETS 0x0008 /* * Attributes below 0x0100 reserved for name.c usage. */ @@ -1034,6 +1035,24 @@ dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target); * 'mctx' is a valid memory context. */ +isc_result_t +dns_name_dupwithoffsets(dns_name_t *source, isc_mem_t *mctx, + dns_name_t *target); +/* + * Make 'target' a read-only dynamically allocated copy of 'source'. + * 'target' will also have a dynamically allocated offsets table. + * + * Requires: + * + * 'source' is a valid non-empty name. + * + * 'target' is a valid name that is not read-only. + * + * 'target' has no offsets table. + * + * 'mctx' is a valid memory context. + */ + void dns_name_free(dns_name_t *name, isc_mem_t *mctx); /*