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

https://bitbucket.org/freebsd/freebsd-head/ · C Header · 82 lines · 45 code · 19 blank · 18 comment · 0 complexity · 9e62e2866f72359062221753d7248461 MD5 · raw file

  1. /*
  2. * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
  3. * Copyright (C) 2001, 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: config.h,v 1.16 2009/06/11 23:47:55 tbox Exp $ */
  18. #ifndef NAMED_CONFIG_H
  19. #define NAMED_CONFIG_H 1
  20. /*! \file */
  21. #include <isccfg/cfg.h>
  22. #include <dns/types.h>
  23. #include <dns/zone.h>
  24. isc_result_t
  25. ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
  26. isc_result_t
  27. ns_config_get(const cfg_obj_t **maps, const char* name, const cfg_obj_t **obj);
  28. isc_result_t
  29. ns_checknames_get(const cfg_obj_t **maps, const char* name,
  30. const cfg_obj_t **obj);
  31. int
  32. ns_config_listcount(const cfg_obj_t *list);
  33. isc_result_t
  34. ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
  35. dns_rdataclass_t *classp);
  36. isc_result_t
  37. ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
  38. dns_rdatatype_t *typep);
  39. dns_zonetype_t
  40. ns_config_getzonetype(const cfg_obj_t *zonetypeobj);
  41. isc_result_t
  42. ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
  43. in_port_t defport, isc_mem_t *mctx,
  44. isc_sockaddr_t **addrsp, isc_uint32_t *countp);
  45. void
  46. ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
  47. isc_uint32_t count);
  48. isc_result_t
  49. ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
  50. isc_mem_t *mctx, isc_sockaddr_t **addrsp,
  51. dns_name_t ***keys, isc_uint32_t *countp);
  52. void
  53. ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
  54. dns_name_t ***keys, isc_uint32_t count);
  55. isc_result_t
  56. ns_config_getport(const cfg_obj_t *config, in_port_t *portp);
  57. isc_result_t
  58. ns_config_getkeyalgorithm(const char *str, dns_name_t **name,
  59. isc_uint16_t *digestbits);
  60. isc_result_t
  61. ns_config_getkeyalgorithm2(const char *str, dns_name_t **name,
  62. unsigned int *typep, isc_uint16_t *digestbits);
  63. #endif /* NAMED_CONFIG_H */