1135446Strhodes/* 2254897Serwin * Copyright (C) 2004-2007, 2009-2012 Internet Systems Consortium, Inc. ("ISC") 3135446Strhodes * Copyright (C) 2001-2003 Internet Software Consortium. 4135446Strhodes * 5193149Sdougb * Permission to use, copy, modify, and/or distribute this software for any 6135446Strhodes * purpose with or without fee is hereby granted, provided that the above 7135446Strhodes * copyright notice and this permission notice appear in all copies. 8135446Strhodes * 9135446Strhodes * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10135446Strhodes * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11135446Strhodes * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12135446Strhodes * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13135446Strhodes * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14135446Strhodes * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15135446Strhodes * PERFORMANCE OF THIS SOFTWARE. 16135446Strhodes */ 17135446Strhodes 18254897Serwin/* $Id$ */ 19135446Strhodes 20135446Strhodes#ifndef NAMED_CONTROL_H 21135446Strhodes#define NAMED_CONTROL_H 1 22135446Strhodes 23170222Sdougb/*! \file 24170222Sdougb * \brief 25135446Strhodes * The name server command channel. 26135446Strhodes */ 27135446Strhodes 28135446Strhodes#include <isccc/types.h> 29135446Strhodes 30170222Sdougb#include <isccfg/aclconf.h> 31170222Sdougb 32135446Strhodes#include <named/types.h> 33135446Strhodes 34135446Strhodes#define NS_CONTROL_PORT 953 35135446Strhodes 36135446Strhodes#define NS_COMMAND_STOP "stop" 37135446Strhodes#define NS_COMMAND_HALT "halt" 38135446Strhodes#define NS_COMMAND_RELOAD "reload" 39135446Strhodes#define NS_COMMAND_RECONFIG "reconfig" 40135446Strhodes#define NS_COMMAND_REFRESH "refresh" 41135446Strhodes#define NS_COMMAND_RETRANSFER "retransfer" 42135446Strhodes#define NS_COMMAND_DUMPSTATS "stats" 43135446Strhodes#define NS_COMMAND_QUERYLOG "querylog" 44135446Strhodes#define NS_COMMAND_DUMPDB "dumpdb" 45224092Sdougb#define NS_COMMAND_SECROOTS "secroots" 46135446Strhodes#define NS_COMMAND_TRACE "trace" 47135446Strhodes#define NS_COMMAND_NOTRACE "notrace" 48135446Strhodes#define NS_COMMAND_FLUSH "flush" 49135446Strhodes#define NS_COMMAND_FLUSHNAME "flushname" 50254897Serwin#define NS_COMMAND_FLUSHTREE "flushtree" 51135446Strhodes#define NS_COMMAND_STATUS "status" 52193149Sdougb#define NS_COMMAND_TSIGLIST "tsig-list" 53193149Sdougb#define NS_COMMAND_TSIGDELETE "tsig-delete" 54135446Strhodes#define NS_COMMAND_FREEZE "freeze" 55135446Strhodes#define NS_COMMAND_UNFREEZE "unfreeze" 56135601Sdes#define NS_COMMAND_THAW "thaw" 57170222Sdougb#define NS_COMMAND_TIMERPOKE "timerpoke" 58135446Strhodes#define NS_COMMAND_RECURSING "recursing" 59135446Strhodes#define NS_COMMAND_NULL "null" 60170222Sdougb#define NS_COMMAND_NOTIFY "notify" 61170222Sdougb#define NS_COMMAND_VALIDATION "validation" 62224092Sdougb#define NS_COMMAND_SIGN "sign" 63224092Sdougb#define NS_COMMAND_LOADKEYS "loadkeys" 64224092Sdougb#define NS_COMMAND_ADDZONE "addzone" 65224092Sdougb#define NS_COMMAND_DELZONE "delzone" 66254897Serwin#define NS_COMMAND_SYNC "sync" 67254897Serwin#define NS_COMMAND_SIGNING "signing" 68135446Strhodes 69135446Strhodesisc_result_t 70135446Strhodesns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp); 71170222Sdougb/*%< 72135446Strhodes * Create an initial, empty set of command channels for 'server'. 73135446Strhodes */ 74135446Strhodes 75135446Strhodesvoid 76135446Strhodesns_controls_destroy(ns_controls_t **ctrlsp); 77170222Sdougb/*%< 78135446Strhodes * Destroy a set of command channels. 79135446Strhodes * 80135446Strhodes * Requires: 81135446Strhodes * Shutdown of the channels has completed. 82135446Strhodes */ 83135446Strhodes 84135446Strhodesisc_result_t 85165071Sdougbns_controls_configure(ns_controls_t *controls, const cfg_obj_t *config, 86170222Sdougb cfg_aclconfctx_t *aclconfctx); 87170222Sdougb/*%< 88135446Strhodes * Configure zero or more command channels into 'controls' 89135446Strhodes * as defined in the configuration parse tree 'config'. 90135446Strhodes * The channels will evaluate ACLs in the context of 91135446Strhodes * 'aclconfctx'. 92135446Strhodes */ 93135446Strhodes 94135446Strhodesvoid 95135446Strhodesns_controls_shutdown(ns_controls_t *controls); 96170222Sdougb/*%< 97135446Strhodes * Initiate shutdown of all the command channels in 'controls'. 98135446Strhodes */ 99135446Strhodes 100135446Strhodesisc_result_t 101135446Strhodesns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text); 102135446Strhodes 103135446Strhodes#endif /* NAMED_CONTROL_H */ 104