/contrib/bind9/bin/named/include/named/zoneconf.h

https://bitbucket.org/freebsd/freebsd-head/ · C Header · 78 lines · 18 code · 12 blank · 48 comment · 0 complexity · 86faa0640746c312328fa7c41a651fbb MD5 · raw file

  1. /*
  2. * Copyright (C) 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC")
  3. * Copyright (C) 1999-2002 Internet Software Consortium.
  4. *
  5. * Permission to use, copy, modify, and/or 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. /* $Id: zoneconf.h,v 1.28 2010/12/20 23:47:20 tbox Exp $ */
  18. #ifndef NS_ZONECONF_H
  19. #define NS_ZONECONF_H 1
  20. /*! \file */
  21. #include <isc/lang.h>
  22. #include <isc/types.h>
  23. #include <isccfg/aclconf.h>
  24. #include <isccfg/cfg.h>
  25. ISC_LANG_BEGINDECLS
  26. isc_result_t
  27. ns_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
  28. const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
  29. dns_zone_t *zone);
  30. /*%<
  31. * Configure or reconfigure a zone according to the named.conf
  32. * data in 'cctx' and 'czone'.
  33. *
  34. * The zone origin is not configured, it is assumed to have been set
  35. * at zone creation time.
  36. *
  37. * Require:
  38. * \li 'lctx' to be initialized or NULL.
  39. * \li 'cctx' to be initialized or NULL.
  40. * \li 'ac' to point to an initialized ns_aclconfctx_t.
  41. * \li 'czone' to be initialized.
  42. * \li 'zone' to be initialized.
  43. */
  44. isc_boolean_t
  45. ns_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
  46. /*%<
  47. * If 'zone' can be safely reconfigured according to the configuration
  48. * data in 'zconfig', return ISC_TRUE. If the configuration data is so
  49. * different from the current zone state that the zone needs to be destroyed
  50. * and recreated, return ISC_FALSE.
  51. */
  52. isc_result_t
  53. ns_zone_configure_writeable_dlz(dns_dlzdb_t *dlzdatabase, dns_zone_t *zone,
  54. dns_rdataclass_t rdclass, dns_name_t *name);
  55. /*%>
  56. * configure a DLZ zone, setting up the database methods and calling
  57. * postload to load the origin values
  58. *
  59. * Require:
  60. * \li 'dlzdatabase' to be a valid dlz database
  61. * \li 'zone' to be initialized.
  62. * \li 'rdclass' to be a valid rdataclass
  63. * \li 'name' to be a valid zone origin name
  64. */
  65. ISC_LANG_ENDDECLS
  66. #endif /* NS_ZONECONF_H */