From 5f120ce962b03e4dcf6f1974b9b896f0fa7cacb0 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Thu, 12 Aug 1999 07:48:16 +0000 Subject: [PATCH] add dns_wildcardname constant --- lib/dns/include/dns/name.h | 1 + lib/dns/name.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/dns/include/dns/name.h b/lib/dns/include/dns/name.h index 8484df86a4..38f6d3b298 100644 --- a/lib/dns/include/dns/name.h +++ b/lib/dns/include/dns/name.h @@ -198,6 +198,7 @@ struct dns_name { #define DNS_NAMEATTR_DYNAMIC 0x0004 extern dns_name_t *dns_rootname; +extern dns_name_t *dns_wildcardname; /*** *** Initialization diff --git a/lib/dns/name.c b/lib/dns/name.c index d63c34a185..f26a0d993f 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -150,6 +150,17 @@ static struct dns_name root = { dns_name_t *dns_rootname = &root; +static struct dns_name wild = { + NAME_MAGIC, + (unsigned char *)"\001*", 2, 1, + DNS_NAMEATTR_READONLY, + (unsigned char *)"", NULL, + {(void *)-1, (void *)-1}, + {NULL, NULL} +}; + +dns_name_t *dns_wildcardname = &wild; + static void set_offsets(dns_name_t *name, unsigned char *offsets, isc_boolean_t set_labels, isc_boolean_t set_length, isc_boolean_t set_absolute);