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

https://bitbucket.org/freebsd/freebsd-head/ · C Header · 100 lines · 47 code · 14 blank · 39 comment · 0 complexity · 967156185961989c70fa3ef3f4256e2f MD5 · raw file

  1. /*
  2. * Copyright (C) 2004-2007, 2009, 2010 Internet Systems Consortium, Inc. ("ISC")
  3. * Copyright (C) 2001-2003 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: control.h,v 1.31 2010/08/16 22:21:06 marka Exp $ */
  18. #ifndef NAMED_CONTROL_H
  19. #define NAMED_CONTROL_H 1
  20. /*! \file
  21. * \brief
  22. * The name server command channel.
  23. */
  24. #include <isccc/types.h>
  25. #include <isccfg/aclconf.h>
  26. #include <named/types.h>
  27. #define NS_CONTROL_PORT 953
  28. #define NS_COMMAND_STOP "stop"
  29. #define NS_COMMAND_HALT "halt"
  30. #define NS_COMMAND_RELOAD "reload"
  31. #define NS_COMMAND_RECONFIG "reconfig"
  32. #define NS_COMMAND_REFRESH "refresh"
  33. #define NS_COMMAND_RETRANSFER "retransfer"
  34. #define NS_COMMAND_DUMPSTATS "stats"
  35. #define NS_COMMAND_QUERYLOG "querylog"
  36. #define NS_COMMAND_DUMPDB "dumpdb"
  37. #define NS_COMMAND_SECROOTS "secroots"
  38. #define NS_COMMAND_TRACE "trace"
  39. #define NS_COMMAND_NOTRACE "notrace"
  40. #define NS_COMMAND_FLUSH "flush"
  41. #define NS_COMMAND_FLUSHNAME "flushname"
  42. #define NS_COMMAND_STATUS "status"
  43. #define NS_COMMAND_TSIGLIST "tsig-list"
  44. #define NS_COMMAND_TSIGDELETE "tsig-delete"
  45. #define NS_COMMAND_FREEZE "freeze"
  46. #define NS_COMMAND_UNFREEZE "unfreeze"
  47. #define NS_COMMAND_THAW "thaw"
  48. #define NS_COMMAND_TIMERPOKE "timerpoke"
  49. #define NS_COMMAND_RECURSING "recursing"
  50. #define NS_COMMAND_NULL "null"
  51. #define NS_COMMAND_NOTIFY "notify"
  52. #define NS_COMMAND_VALIDATION "validation"
  53. #define NS_COMMAND_SIGN "sign"
  54. #define NS_COMMAND_LOADKEYS "loadkeys"
  55. #define NS_COMMAND_ADDZONE "addzone"
  56. #define NS_COMMAND_DELZONE "delzone"
  57. isc_result_t
  58. ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp);
  59. /*%<
  60. * Create an initial, empty set of command channels for 'server'.
  61. */
  62. void
  63. ns_controls_destroy(ns_controls_t **ctrlsp);
  64. /*%<
  65. * Destroy a set of command channels.
  66. *
  67. * Requires:
  68. * Shutdown of the channels has completed.
  69. */
  70. isc_result_t
  71. ns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config,
  72. cfg_aclconfctx_t *aclconfctx);
  73. /*%<
  74. * Configure zero or more command channels into 'controls'
  75. * as defined in the configuration parse tree 'config'.
  76. * The channels will evaluate ACLs in the context of
  77. * 'aclconfctx'.
  78. */
  79. void
  80. ns_controls_shutdown(ns_controls_t *controls);
  81. /*%<
  82. * Initiate shutdown of all the command channels in 'controls'.
  83. */
  84. isc_result_t
  85. ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text);
  86. #endif /* NAMED_CONTROL_H */