Merge from vendor branch SENDMAIL:
[dragonfly.git] / contrib / bind-9.2.4rc7 / lib / dns / include / dns / view.h
1 /*
2  * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 1999-2003  Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  * PERFORMANCE OF THIS SOFTWARE.
16  */
17
18 /* $Id: view.h,v 1.73.2.8 2004/03/09 06:11:24 marka Exp $ */
19
20 #ifndef DNS_VIEW_H
21 #define DNS_VIEW_H 1
22
23 /*****
24  ***** Module Info
25  *****/
26
27 /*
28  * DNS View
29  *
30  * A "view" is a DNS namespace, together with an optional resolver and a
31  * forwarding policy.  A "DNS namespace" is a (possibly empty) set of
32  * authoritative zones together with an optional cache and optional
33  * "hints" information.
34  *
35  * Views start out "unfrozen".  In this state, core attributes like
36  * the cache, set of zones, and forwarding policy may be set.  While
37  * "unfrozen", the caller (e.g. nameserver configuration loading
38  * code), must ensure exclusive access to the view.  When the view is
39  * "frozen", the core attributes become immutable, and the view module
40  * will ensure synchronization.  Freezing allows the view's core attributes
41  * to be accessed without locking.
42  *
43  * MP:
44  *      Before the view is frozen, the caller must ensure synchronization.
45  *
46  *      After the view is frozen, the module guarantees appropriate
47  *      synchronization of any data structures it creates and manipulates.
48  *
49  * Reliability:
50  *      No anticipated impact.
51  *
52  * Resources:
53  *      <TBS>
54  *
55  * Security:
56  *      No anticipated impact.
57  *
58  * Standards:
59  *      None.
60  */
61
62 #include <stdio.h>
63
64 #include <isc/lang.h>
65 #include <isc/magic.h>
66 #include <isc/event.h>
67 #include <isc/mutex.h>
68 #include <isc/net.h>
69 #include <isc/refcount.h>
70 #include <isc/rwlock.h>
71 #include <isc/stdtime.h>
72
73 #include <dns/acl.h>
74 #include <dns/types.h>
75
76 ISC_LANG_BEGINDECLS
77
78 struct dns_view {
79         /* Unlocked. */
80         unsigned int                    magic;
81         isc_mem_t *                     mctx;
82         dns_rdataclass_t                rdclass;
83         char *                          name;
84         dns_zt_t *                      zonetable;
85         dns_resolver_t *                resolver;
86         dns_adb_t *                     adb;
87         dns_requestmgr_t *              requestmgr;
88         dns_cache_t *                   cache;
89         dns_db_t *                      cachedb;
90         dns_db_t *                      hints;
91         dns_keytable_t *                secroots;
92         dns_keytable_t *                trustedkeys;
93         isc_mutex_t                     lock;
94         isc_boolean_t                   frozen;
95         isc_task_t *                    task;
96         isc_event_t                     resevent;
97         isc_event_t                     adbevent;
98         isc_event_t                     reqevent;
99         /* Configurable data. */
100         dns_tsig_keyring_t *            statickeys;
101         dns_tsig_keyring_t *            dynamickeys;
102         dns_peerlist_t *                peers;
103         dns_fwdtable_t *                fwdtable;
104         isc_boolean_t                   recursion;
105         isc_boolean_t                   auth_nxdomain;
106         isc_boolean_t                   additionalfromcache;
107         isc_boolean_t                   additionalfromauth;
108         isc_boolean_t                   minimalresponses;
109         dns_transfer_format_t           transfer_format;
110         dns_acl_t *                     queryacl;
111         dns_acl_t *                     recursionacl;
112         dns_acl_t *                     v6synthesisacl;
113         dns_acl_t *                     sortlist;
114         isc_boolean_t                   requestixfr;
115         isc_boolean_t                   provideixfr;
116         dns_ttl_t                       maxcachettl;
117         dns_ttl_t                       maxncachettl;
118         in_port_t                       dstport;
119         dns_aclenv_t                    aclenv;
120         isc_boolean_t                   flush;
121         dns_namelist_t *                delonly;
122         isc_boolean_t                   rootdelonly;
123         dns_namelist_t *                rootexclude;
124
125         /*
126          * Configurable data for server use only,
127          * locked by server configuration lock.
128          */
129         dns_acl_t *                     matchclients;
130         dns_acl_t *                     matchdestinations;
131         isc_boolean_t                   matchrecursiveonly;
132
133         /* Locked by themselves. */
134         isc_refcount_t                  references;
135
136         /* Locked by lock. */
137         unsigned int                    weakrefs;
138         unsigned int                    attributes;
139         /* Under owner's locking control. */
140         ISC_LINK(struct dns_view)       link;
141 };
142
143 #define DNS_VIEW_MAGIC                  ISC_MAGIC('V','i','e','w')
144 #define DNS_VIEW_VALID(view)            ISC_MAGIC_VALID(view, DNS_VIEW_MAGIC)
145
146 #define DNS_VIEWATTR_RESSHUTDOWN        0x01
147 #define DNS_VIEWATTR_ADBSHUTDOWN        0x02
148 #define DNS_VIEWATTR_REQSHUTDOWN        0x04
149
150 isc_result_t
151 dns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
152                 const char *name, dns_view_t **viewp);
153 /*
154  * Create a view.
155  *
156  * Notes:
157  *
158  *      The newly created view has no cache, no resolver, and an empty
159  *      zone table.  The view is not frozen.
160  *
161  * Requires:
162  *
163  *      'mctx' is a valid memory context.
164  *
165  *      'rdclass' is a valid class.
166  *
167  *      'name' is a valid C string.
168  *
169  *      viewp != NULL && *viewp == NULL
170  *
171  * Returns:
172  *
173  *      ISC_R_SUCCESS
174  *      ISC_R_NOMEMORY
175  *
176  *      Other errors are possible.
177  */
178
179 void
180 dns_view_attach(dns_view_t *source, dns_view_t **targetp);
181 /*
182  * Attach '*targetp' to 'source'.
183  *
184  * Requires:
185  *
186  *      'source' is a valid, frozen view.
187  *
188  *      'targetp' points to a NULL dns_view_t *.
189  *
190  * Ensures:
191  *
192  *      *targetp is attached to source.
193  *
194  *      While *targetp is attached, the view will not shut down.
195  */
196
197 void
198 dns_view_detach(dns_view_t **viewp);
199 /*
200  * Detach '*viewp' from its view.
201  *
202  * Requires:
203  *
204  *      'viewp' points to a valid dns_view_t *
205  *
206  * Ensures:
207  *
208  *      *viewp is NULL.
209  */
210
211 void
212 dns_view_flushanddetach(dns_view_t **viewp);
213 /*
214  * Detach '*viewp' from its view.  If this was the last reference
215  * uncommited changed in zones will be flushed to disk.
216  *
217  * Requires:
218  *
219  *      'viewp' points to a valid dns_view_t *
220  *
221  * Ensures:
222  *
223  *      *viewp is NULL.
224  */
225
226 void
227 dns_view_weakattach(dns_view_t *source, dns_view_t **targetp);
228 /*
229  * Weakly attach '*targetp' to 'source'.
230  *
231  * Requires:
232  *
233  *      'source' is a valid, frozen view.
234  *
235  *      'targetp' points to a NULL dns_view_t *.
236  *
237  * Ensures:
238  *
239  *      *targetp is attached to source.
240  *
241  *      While *targetp is attached, the view will not be freed.
242  */
243
244 void
245 dns_view_weakdetach(dns_view_t **targetp);
246 /*
247  * Detach '*viewp' from its view.
248  *
249  * Requires:
250  *
251  *      'viewp' points to a valid dns_view_t *.
252  *
253  * Ensures:
254  *
255  *      *viewp is NULL.
256  */
257
258 isc_result_t
259 dns_view_createresolver(dns_view_t *view,
260                         isc_taskmgr_t *taskmgr, unsigned int ntasks,
261                         isc_socketmgr_t *socketmgr,
262                         isc_timermgr_t *timermgr,
263                         unsigned int options,
264                         dns_dispatchmgr_t *dispatchmgr,
265                         dns_dispatch_t *dispatchv4,
266                         dns_dispatch_t *dispatchv6);
267 /*
268  * Create a resolver and address database for the view.
269  *
270  * Requires:
271  *
272  *      'view' is a valid, unfrozen view.
273  *
274  *      'view' does not have a resolver already.
275  *
276  *      The requirements of dns_resolver_create() apply to 'taskmgr',
277  *      'ntasks', 'socketmgr', 'timermgr', 'options', 'dispatchv4', and
278  *      'dispatchv6'.
279  *
280  * Returns:
281  *
282  *      ISC_R_SUCCESS
283  *
284  *      Any error that dns_resolver_create() can return.
285  */
286
287 void
288 dns_view_setcache(dns_view_t *view, dns_cache_t *cache);
289 /*
290  * Set the view's cache database.
291  *
292  * Requires:
293  *
294  *      'view' is a valid, unfrozen view.
295  *
296  *      'cache' is a valid cache.
297  *
298  * Ensures:
299  *
300  *      The cache of 'view' is 'cached.
301  *
302  *      If this is not the first call to dns_view_setcache() for this
303  *      view, then previously set cache is detached.
304  */
305
306 void
307 dns_view_sethints(dns_view_t *view, dns_db_t *hints);
308 /*
309  * Set the view's hints database.
310  *
311  * Requires:
312  *
313  *      'view' is a valid, unfrozen view, whose hints database has not been
314  *      set.
315  *
316  *      'hints' is a valid zone database.
317  *
318  * Ensures:
319  *
320  *      The hints database of 'view' is 'hints'.
321  */
322
323 void
324 dns_view_setkeyring(dns_view_t *view, dns_tsig_keyring_t *ring);
325 /*
326  * Set the view's static TSIG keys
327  *
328  * Requires:
329  *
330  *      'view' is a valid, unfrozen view, whose static TSIG keyring has not
331  *      been set.
332  *
333  *      'ring' is a valid TSIG keyring
334  *
335  * Ensures:
336  *
337  *      The static TSIG keyring of 'view' is 'ring'.
338  */
339
340 void
341 dns_view_setdstport(dns_view_t *view, in_port_t dstport);
342 /*
343  * Set the view's destination port.  This is the port to
344  * which outgoing queries are sent.  The default is 53,
345  * the standard DNS port.
346  *
347  * Requires:
348  *
349  *      'view' is a valid view.
350  *
351  *      'dstport' is a valid TCP/UDP port number.
352  *
353  * Ensures:
354  *      External name servers will be assumed to be listning
355  *      on 'dstport'.  For servers whose address has already
356  *      obtained obtained at the time of the call, the view may
357  *      continue to use the previously set port until the address
358  *      times out from the view's address database.
359  */
360
361
362 isc_result_t
363 dns_view_addzone(dns_view_t *view, dns_zone_t *zone);
364 /*
365  * Add zone 'zone' to 'view'.
366  *
367  * Requires:
368  *
369  *      'view' is a valid, unfrozen view.
370  *
371  *      'zone' is a valid zone.
372  */
373
374 void
375 dns_view_freeze(dns_view_t *view);
376 /*
377  * Freeze view.
378  *
379  * Requires:
380  *
381  *      'view' is a valid, unfrozen view.
382  *
383  * Ensures:
384  *
385  *      'view' is frozen.
386  */
387
388 isc_result_t
389 dns_view_find(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
390               isc_stdtime_t now, unsigned int options, isc_boolean_t use_hints,
391               dns_db_t **dbp, dns_dbnode_t **nodep, dns_name_t *foundname,
392               dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
393 /*
394  * Find an rdataset whose owner name is 'name', and whose type is
395  * 'type'.
396  *
397  * Notes:
398  *
399  *      See the description of dns_db_find() for information about 'options'.
400  *      If the caller sets DNS_DBFIND_GLUEOK, it must ensure that 'name'
401  *      and 'type' are appropriate for glue retrieval.
402  *
403  *      If 'now' is zero, then the current time will be used.
404  *
405  *      If 'use_hints' is ISC_TRUE, and the view has a hints database, then
406  *      it will be searched last.  If the answer is found in the hints
407  *      database, the result code will be DNS_R_HINT.  If the name is found
408  *      in the hints database but not the type, the result code will be
409  *      DNS_R_HINTNXRRSET.
410  *
411  *      'foundname' must meet the requirements of dns_db_find().
412  *
413  *      If 'sigrdataset' is not NULL, and there is a SIG rdataset which
414  *      covers 'type', then 'sigrdataset' will be bound to it.
415  *
416  * Requires:
417  *
418  *      'view' is a valid, frozen view.
419  *
420  *      'name' is valid name.
421  *
422  *      'type' is a valid dns_rdatatype_t, and is not a meta query type
423  *      except dns_rdatatype_any.
424  *
425  *      dbp == NULL || *dbp == NULL
426  *
427  *      nodep == NULL || *nodep == NULL.  If nodep != NULL, dbp != NULL.
428  *
429  *      'foundname' is a valid name with a dedicated buffer or NULL.
430  *
431  *      'rdataset' is a valid, disassociated rdataset.
432  *
433  *      'sigrdataset' is NULL, or is a valid, disassociated rdataset.
434  *
435  * Ensures:
436  *
437  *      In successful cases, 'rdataset', and possibly 'sigrdataset', are
438  *      bound to the found data.
439  *
440  *      If dbp != NULL, it points to the database containing the data.
441  *
442  *      If nodep != NULL, it points to the database node containing the data.
443  *
444  *      If foundname != NULL, it contains the full name of the found data.
445  *
446  * Returns:
447  *
448  *      Any result that dns_db_find() can return, with the exception of
449  *      DNS_R_DELEGATION.
450  */
451
452 isc_result_t
453 dns_view_simplefind(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
454                     isc_stdtime_t now, unsigned int options,
455                     isc_boolean_t use_hints,
456                     dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
457 /*
458  * Find an rdataset whose owner name is 'name', and whose type is
459  * 'type'.
460  *
461  * Notes:
462  *
463  *      This routine is appropriate for simple, exact-match queries of the
464  *      view.  'name' must be a canonical name; there is no DNAME or CNAME
465  *      processing.
466  *
467  *      See the description of dns_db_find() for information about 'options'.
468  *      If the caller sets DNS_DBFIND_GLUEOK, it must ensure that 'name'
469  *      and 'type' are appropriate for glue retrieval.
470  *
471  *      If 'now' is zero, then the current time will be used.
472  *
473  *      If 'use_hints' is ISC_TRUE, and the view has a hints database, then
474  *      it will be searched last.  If the answer is found in the hints
475  *      database, the result code will be DNS_R_HINT.  If the name is found
476  *      in the hints database but not the type, the result code will be
477  *      DNS_R_HINTNXRRSET.
478  *
479  *      If 'sigrdataset' is not NULL, and there is a SIG rdataset which
480  *      covers 'type', then 'sigrdataset' will be bound to it.
481  *
482  * Requires:
483  *
484  *      'view' is a valid, frozen view.
485  *
486  *      'name' is valid name.
487  *
488  *      'type' is a valid dns_rdatatype_t, and is not a meta query type
489  *      (e.g. dns_rdatatype_any), or dns_rdatatype_sig.
490  *
491  *      'rdataset' is a valid, disassociated rdataset.
492  *
493  *      'sigrdataset' is NULL, or is a valid, disassociated rdataset.
494  *
495  * Ensures:
496  *
497  *      In successful cases, 'rdataset', and possibly 'sigrdataset', are
498  *      bound to the found data.
499  *
500  * Returns:
501  *
502  *      ISC_R_SUCCESS                   Success; result is desired type.
503  *      DNS_R_GLUE                      Success; result is glue.
504  *      DNS_R_HINT                      Success; result is a hint.
505  *      DNS_R_NCACHENXDOMAIN            Success; result is a ncache entry.
506  *      DNS_R_NCACHENXRRSET             Success; result is a ncache entry.
507  *      DNS_R_NXDOMAIN                  The name does not exist.
508  *      DNS_R_NXRRSET                   The rrset does not exist.
509  *      ISC_R_NOTFOUND                  No matching data found,
510  *                                      or an error occurred.
511  */
512
513 isc_result_t
514 dns_view_findzonecut(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
515                      isc_stdtime_t now, unsigned int options,
516                      isc_boolean_t use_hints,
517                      dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
518
519 isc_result_t
520 dns_view_findzonecut2(dns_view_t *view, dns_name_t *name, dns_name_t *fname,
521                       isc_stdtime_t now, unsigned int options,
522                       isc_boolean_t use_hints, isc_boolean_t use_cache,
523                       dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset);
524 /*
525  * Find the best known zonecut containing 'name'.
526  *
527  * This uses local authority, cache, and optionally hints data.
528  * No external queries are performed.
529  *
530  * Notes:
531  *
532  *      If 'now' is zero, then the current time will be used.
533  *
534  *      If 'use_hints' is ISC_TRUE, and the view has a hints database, then
535  *      it will be searched last.
536  *
537  *      If 'use_cache' is ISC_TRUE, and the view has a cache, then it will be
538  *      searched.
539  *
540  *      If 'sigrdataset' is not NULL, and there is a SIG rdataset which
541  *      covers 'type', then 'sigrdataset' will be bound to it.
542  *
543  *      If the DNS_DBFIND_NOEXACT option is set, then the zonecut returned
544  *      (if any) will be the deepest known ancestor of 'name'.
545  *
546  * Requires:
547  *
548  *      'view' is a valid, frozen view.
549  *
550  *      'name' is valid name.
551  *
552  *      'rdataset' is a valid, disassociated rdataset.
553  *
554  *      'sigrdataset' is NULL, or is a valid, disassociated rdataset.
555  *
556  * Returns:
557  *
558  *      ISC_R_SUCCESS                           Success.
559  *
560  *      Many other results are possible.
561  */
562
563 isc_result_t
564 dns_viewlist_find(dns_viewlist_t *list, const char *name,
565                   dns_rdataclass_t rdclass, dns_view_t **viewp);
566 /*
567  * Search for a view with name 'name' and class 'rdclass' in 'list'.
568  * If found, '*viewp' is (strongly) attached to it.
569  *
570  * Requires:
571  *
572  *      'viewp' points to a NULL dns_view_t *.
573  *
574  * Returns:
575  *
576  *      ISC_R_SUCCESS           A matching view was found.
577  *      ISC_R_NOTFOUND          No matching view was found.
578  */
579
580 isc_result_t
581 dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep);
582 /*
583  * Search for the zone 'name' in the zone table of 'view'.
584  * If found, 'zonep' is (strongly) attached to it.  There
585  * are no partial matches.
586  *
587  * Requires:
588  *
589  *      'zonep' points to a NULL dns_zone_t *.
590  *
591  * Returns:
592  *      ISC_R_SUCCESS           A matching zone was found.
593  *      ISC_R_NOTFOUND          No matching zone was found.
594  *      others                  An error occurred.
595  */
596
597 isc_result_t
598 dns_view_load(dns_view_t *view, isc_boolean_t stop);
599
600 isc_result_t
601 dns_view_loadnew(dns_view_t *view, isc_boolean_t stop);
602 /*
603  * Load zones attached to this view.  dns_view_load() loads
604  * all zones whose master file has changed since the last
605  * load; dns_view_loadnew() loads only zones that have never 
606  * been loaded.
607  *
608  * If 'stop' is ISC_TRUE, stop on the first error and return it.
609  * If 'stop' is ISC_FALSE, ignore errors.
610  *
611  * Requires:
612  *
613  *      'view' is valid.
614  */
615
616 isc_result_t
617 dns_view_gettsig(dns_view_t *view, dns_name_t *keyname,
618                  dns_tsigkey_t **keyp);
619 /*
620  * Find the TSIG key configured in 'view' with name 'keyname',
621  * if any.
622  *
623  * Reqires:
624  *      keyp points to a NULL dns_tsigkey_t *.
625  *
626  * Returns:
627  *      ISC_R_SUCCESS   A key was found and '*keyp' now points to it.
628  *      ISC_R_NOTFOUND  No key was found.
629  *      others          An error occurred.
630  */
631
632 isc_result_t
633 dns_view_getpeertsig(dns_view_t *view, isc_netaddr_t *peeraddr,
634                      dns_tsigkey_t **keyp);
635 /*
636  * Find the TSIG key configured in 'view' for the server whose
637  * address is 'peeraddr', if any.
638  *
639  * Reqires:
640  *      keyp points to a NULL dns_tsigkey_t *.
641  *
642  * Returns:
643  *      ISC_R_SUCCESS   A key was found and '*keyp' now points to it.
644  *      ISC_R_NOTFOUND  No key was found.
645  *      others          An error occurred.
646  */
647
648 isc_result_t
649 dns_view_checksig(dns_view_t *view, isc_buffer_t *source, dns_message_t *msg);
650 /*
651  * Verifies the signature of a message.
652  *
653  * Requires:
654  *
655  *      'view' is a valid view.
656  *      'source' is a valid buffer containing the message
657  *      'msg' is a valid message
658  *
659  * Returns:
660  *      see dns_tsig_verify()
661  */
662
663 void
664 dns_view_dialup(dns_view_t *view);
665 /*
666  * Perform dialup-time maintenance on the zones of 'view'.
667  */
668
669 isc_result_t
670 dns_view_dumpdbtostream(dns_view_t *view, FILE *fp);
671 /*
672  * Dump the current state of the view 'view' to the stream 'fp'
673  * for purposes of analysis or debugging.
674  *
675  * Currently the dumped state includes the view's cache; in the future
676  * it may also include other state such as the address database.
677  * It will not not include authoritative data since it is voluminous and
678  * easily obtainable by other means.
679  *
680  * Requires:
681  *      
682  *      'view' is valid.
683  *
684  *      'fp' refers to a file open for writing.
685  *
686  * Returns:
687  *      ISC_R_SUCCESS   The cache was successfully dumped.
688  *      others          An error occurred (see dns_master_dump)
689  */
690
691 isc_result_t
692 dns_view_flushcache(dns_view_t *view);
693 /*
694  * Flush the view's cache (and ADB).
695  *
696  * Requires:
697  *      'view' is valid.
698  *
699  *      No other tasks are executing.
700  *
701  * Returns:
702  *      ISC_R_SUCCESS
703  *      ISC_R_NOMEMORY
704  */
705
706 isc_result_t
707 dns_view_adddelegationonly(dns_view_t *view, dns_name_t *name);
708 /*
709  * Add the given name to the delegation only table.
710  * 
711  *
712  * Requires:
713  *      'view' is valid.
714  *      'name' is valid.
715  *
716  * Returns:
717  *      ISC_R_SUCCESS
718  *      ISC_R_NOMEMORY
719  */
720
721 isc_result_t
722 dns_view_excludedelegationonly(dns_view_t *view, dns_name_t *name);
723 /*
724  * Add the given name to be excluded from the root-delegation-only.
725  * 
726  *
727  * Requires:
728  *      'view' is valid.
729  *      'name' is valid.
730  *
731  * Returns:
732  *      ISC_R_SUCCESS
733  *      ISC_R_NOMEMORY
734  */
735
736 isc_boolean_t
737 dns_view_isdelegationonly(dns_view_t *view, dns_name_t *name);
738 /*
739  * Check if 'name' is in the delegation only table or if
740  * rootdelonly is set that name is not being excluded.
741  *
742  * Requires:
743  *      'view' is valid.
744  *      'name' is valid.
745  *
746  * Returns:
747  *      ISC_TRUE if the name is is the table.
748  *      ISC_FALSE othewise.
749  */
750
751 void
752 dns_view_setrootdelonly(dns_view_t *view, isc_boolean_t value);
753 /*
754  * Set the root delegation only flag.
755  *
756  * Requires:
757  *      'view' is valid.
758  */
759
760 isc_boolean_t
761 dns_view_getrootdelonly(dns_view_t *view);
762 /*
763  * Get the root delegation only flag.
764  *
765  * Requires:
766  *      'view' is valid.
767  */
768
769 #endif /* DNS_VIEW_H */