1 /* $NetBSD: control.h,v 1.6 2014/12/10 04:37:52 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2004-2007, 2009-2012, 2014 Internet Systems Consortium, Inc. ("ISC") 5 * Copyright (C) 2001-2003 Internet Software Consortium. 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* Id: control.h,v 1.38 2012/01/31 23:47:31 tbox Exp */ 21 22 #ifndef NAMED_CONTROL_H 23 #define NAMED_CONTROL_H 1 24 25 /*! \file 26 * \brief 27 * The name server command channel. 28 */ 29 30 #include <isccc/types.h> 31 32 #include <isccfg/aclconf.h> 33 34 #include <named/types.h> 35 36 #define NS_CONTROL_PORT 953 37 38 #define NS_COMMAND_STOP "stop" 39 #define NS_COMMAND_HALT "halt" 40 #define NS_COMMAND_RELOAD "reload" 41 #define NS_COMMAND_RECONFIG "reconfig" 42 #define NS_COMMAND_REFRESH "refresh" 43 #define NS_COMMAND_RETRANSFER "retransfer" 44 #define NS_COMMAND_DUMPSTATS "stats" 45 #define NS_COMMAND_QUERYLOG "querylog" 46 #define NS_COMMAND_DUMPDB "dumpdb" 47 #define NS_COMMAND_SECROOTS "secroots" 48 #define NS_COMMAND_TRACE "trace" 49 #define NS_COMMAND_NOTRACE "notrace" 50 #define NS_COMMAND_FLUSH "flush" 51 #define NS_COMMAND_FLUSHNAME "flushname" 52 #define NS_COMMAND_FLUSHTREE "flushtree" 53 #define NS_COMMAND_STATUS "status" 54 #define NS_COMMAND_TSIGLIST "tsig-list" 55 #define NS_COMMAND_TSIGDELETE "tsig-delete" 56 #define NS_COMMAND_FREEZE "freeze" 57 #define NS_COMMAND_UNFREEZE "unfreeze" 58 #define NS_COMMAND_THAW "thaw" 59 #define NS_COMMAND_TIMERPOKE "timerpoke" 60 #define NS_COMMAND_RECURSING "recursing" 61 #define NS_COMMAND_NULL "null" 62 #define NS_COMMAND_NOTIFY "notify" 63 #define NS_COMMAND_VALIDATION "validation" 64 #define NS_COMMAND_SCAN "scan" 65 #define NS_COMMAND_SIGN "sign" 66 #define NS_COMMAND_LOADKEYS "loadkeys" 67 #define NS_COMMAND_ADDZONE "addzone" 68 #define NS_COMMAND_DELZONE "delzone" 69 #define NS_COMMAND_SYNC "sync" 70 #define NS_COMMAND_SIGNING "signing" 71 #define NS_COMMAND_ZONESTATUS "zonestatus" 72 73 isc_result_t 74 ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp); 75 /*%< 76 * Create an initial, empty set of command channels for 'server'. 77 */ 78 79 void 80 ns_controls_destroy(ns_controls_t **ctrlsp); 81 /*%< 82 * Destroy a set of command channels. 83 * 84 * Requires: 85 * Shutdown of the channels has completed. 86 */ 87 88 isc_result_t 89 ns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config, 90 cfg_aclconfctx_t *aclconfctx); 91 /*%< 92 * Configure zero or more command channels into 'controls' 93 * as defined in the configuration parse tree 'config'. 94 * The channels will evaluate ACLs in the context of 95 * 'aclconfctx'. 96 */ 97 98 void 99 ns_controls_shutdown(ns_controls_t *controls); 100 /*%< 101 * Initiate shutdown of all the command channels in 'controls'. 102 */ 103 104 isc_result_t 105 ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text); 106 107 #endif /* NAMED_CONTROL_H */ 108