control.h File Reference

The name server command channel. More...

#include <isccc/types.h>
#include <isccfg/aclconf.h>
#include <named/types.h>

Go to the source code of this file.

Defines

#define NAMED_CONTROL_H   1
#define NS_CONTROL_PORT   953
#define NS_COMMAND_STOP   "stop"
#define NS_COMMAND_HALT   "halt"
#define NS_COMMAND_RELOAD   "reload"
#define NS_COMMAND_RECONFIG   "reconfig"
#define NS_COMMAND_REFRESH   "refresh"
#define NS_COMMAND_RETRANSFER   "retransfer"
#define NS_COMMAND_DUMPSTATS   "stats"
#define NS_COMMAND_QUERYLOG   "querylog"
#define NS_COMMAND_DUMPDB   "dumpdb"
#define NS_COMMAND_SECROOTS   "secroots"
#define NS_COMMAND_TRACE   "trace"
#define NS_COMMAND_NOTRACE   "notrace"
#define NS_COMMAND_FLUSH   "flush"
#define NS_COMMAND_FLUSHNAME   "flushname"
#define NS_COMMAND_FLUSHTREE   "flushtree"
#define NS_COMMAND_STATUS   "status"
#define NS_COMMAND_TSIGLIST   "tsig-list"
#define NS_COMMAND_TSIGDELETE   "tsig-delete"
#define NS_COMMAND_FREEZE   "freeze"
#define NS_COMMAND_UNFREEZE   "unfreeze"
#define NS_COMMAND_THAW   "thaw"
#define NS_COMMAND_TIMERPOKE   "timerpoke"
#define NS_COMMAND_RECURSING   "recursing"
#define NS_COMMAND_NULL   "null"
#define NS_COMMAND_NOTIFY   "notify"
#define NS_COMMAND_VALIDATION   "validation"
#define NS_COMMAND_SCAN   "scan"
#define NS_COMMAND_SIGN   "sign"
#define NS_COMMAND_LOADKEYS   "loadkeys"
#define NS_COMMAND_ADDZONE   "addzone"
#define NS_COMMAND_MODZONE   "modzone"
#define NS_COMMAND_DELZONE   "delzone"
#define NS_COMMAND_SHOWZONE   "showzone"
#define NS_COMMAND_SYNC   "sync"
#define NS_COMMAND_SIGNING   "signing"
#define NS_COMMAND_ZONESTATUS   "zonestatus"
#define NS_COMMAND_NTA   "nta"
#define NS_COMMAND_TESTGEN   "testgen"
#define NS_COMMAND_MKEYS   "managed-keys"

Functions

isc_result_t ns_controls_create (ns_server_t *server, ns_controls_t **ctrlsp)
 Create an initial, empty set of command channels for 'server'.
void ns_controls_destroy (ns_controls_t **ctrlsp)
 Destroy a set of command channels.
isc_result_t ns_controls_configure (ns_controls_t *controls, const cfg_obj_t *config, cfg_aclconfctx_t *aclconfctx)
 Configure zero or more command channels into 'controls' as defined in the configuration parse tree 'config'. The channels will evaluate ACLs in the context of 'aclconfctx'.
void ns_controls_shutdown (ns_controls_t *controls)
 Initiate shutdown of all the command channels in 'controls'.
isc_result_t ns_control_docommand (isccc_sexpr_t *message, isc_buffer_t **text)
 This function is called to process the incoming command when a control channel message is received.


Detailed Description

The name server command channel.

Definition in file control.h.


Define Documentation

#define NAMED_CONTROL_H   1

Definition at line 21 of file control.h.

#define NS_CONTROL_PORT   953

Definition at line 34 of file control.h.

Referenced by ns_controls_configure(), and parse_config().

#define NS_COMMAND_STOP   "stop"

Definition at line 36 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_HALT   "halt"

Definition at line 37 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_RELOAD   "reload"

Definition at line 38 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_RECONFIG   "reconfig"

Definition at line 39 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_REFRESH   "refresh"

Definition at line 40 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_RETRANSFER   "retransfer"

Definition at line 41 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_DUMPSTATS   "stats"

Definition at line 42 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_QUERYLOG   "querylog"

Definition at line 43 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_DUMPDB   "dumpdb"

Definition at line 44 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_SECROOTS   "secroots"

Definition at line 45 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_TRACE   "trace"

Definition at line 46 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_NOTRACE   "notrace"

Definition at line 47 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_FLUSH   "flush"

Definition at line 48 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_FLUSHNAME   "flushname"

Definition at line 49 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_FLUSHTREE   "flushtree"

Definition at line 50 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_STATUS   "status"

Definition at line 51 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_TSIGLIST   "tsig-list"

Definition at line 52 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_TSIGDELETE   "tsig-delete"

Definition at line 53 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_FREEZE   "freeze"

Definition at line 54 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_UNFREEZE   "unfreeze"

Definition at line 55 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_THAW   "thaw"

Definition at line 56 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_TIMERPOKE   "timerpoke"

Definition at line 57 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_RECURSING   "recursing"

Definition at line 58 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_NULL   "null"

Definition at line 59 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_NOTIFY   "notify"

Definition at line 60 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_VALIDATION   "validation"

Definition at line 61 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_SCAN   "scan"

Definition at line 62 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_SIGN   "sign"

Definition at line 63 of file control.h.

Referenced by ns_control_docommand(), and ns_server_rekey().

#define NS_COMMAND_LOADKEYS   "loadkeys"

Definition at line 64 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_ADDZONE   "addzone"

Definition at line 65 of file control.h.

Referenced by ns_control_docommand(), and ns_server_changezone().

#define NS_COMMAND_MODZONE   "modzone"

Definition at line 66 of file control.h.

Referenced by ns_control_docommand(), and ns_server_changezone().

#define NS_COMMAND_DELZONE   "delzone"

Definition at line 67 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_SHOWZONE   "showzone"

Definition at line 68 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_SYNC   "sync"

Definition at line 69 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_SIGNING   "signing"

Definition at line 70 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_ZONESTATUS   "zonestatus"

Definition at line 71 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_NTA   "nta"

Definition at line 72 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_TESTGEN   "testgen"

Definition at line 73 of file control.h.

Referenced by ns_control_docommand().

#define NS_COMMAND_MKEYS   "managed-keys"

Definition at line 74 of file control.h.

Referenced by ns_control_docommand().


Function Documentation

isc_result_t ns_controls_create ( ns_server_t server,
ns_controls_t **  ctrlsp 
)

Create an initial, empty set of command channels for 'server'.

Definition at line 1472 of file controlconf.c.

References ISC_FALSE, ISC_LIST_INIT, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, isccc_cc_createsymtab(), ns_controls::listeners, ns_server::mctx, ns_controls::server, ns_controls::shuttingdown, and ns_controls::symtab.

Referenced by ns_server_create().

void ns_controls_destroy ( ns_controls_t **  ctrlsp  ) 

Destroy a set of command channels.

Requires: Shutdown of the channels has completed.

Definition at line 1493 of file controlconf.c.

References ISC_LIST_EMPTY, isc_mem_put, isccc_symtab_destroy(), ns_controls::listeners, ns_server::mctx, REQUIRE, ns_controls::server, and ns_controls::symtab.

Referenced by ns_server_destroy().

isc_result_t ns_controls_configure ( ns_controls_t controls,
const cfg_obj_t config,
cfg_aclconfctx_t aclconfctx 
)

Configure zero or more command channels into 'controls' as defined in the configuration parse tree 'config'. The channels will evaluate ACLs in the context of 'aclconfctx'.

Definition at line 1242 of file controlconf.c.

References add_listener(), cfg_list_first(), cfg_list_next(), cfg_listelt_value(), cfg_map_get(), cfg_obj_assockaddr(), cfg_obj_asstring(), cfg_tuple_get(), controls_shutdown(), in6addr_loopback, INADDR_LOOPBACK, ISC_LIST_APPEND, ISC_LIST_APPENDLIST, ISC_LIST_INIT, ISC_LIST_UNLINK, ISC_LOG_DEBUG, isc_log_write(), isc_net_probeipv4(), isc_net_probeipv6(), ISC_R_SUCCESS, isc_result_totext(), isc_sockaddr_format(), ISC_SOCKADDR_FORMATSIZE, isc_sockaddr_fromin(), isc_sockaddr_fromin6(), isc_sockaddr_frompath(), isc_sockaddr_getport(), isc_sockaddr_setport(), isc_sockettype_tcp, isc_sockettype_unix, controlconnection::listener, ns_controls::listeners, NS_CONTROL_PORT, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_CONTROL, and update_listener().

Referenced by load_configuration().

void ns_controls_shutdown ( ns_controls_t controls  ) 

Initiate shutdown of all the command channels in 'controls'.

Definition at line 673 of file controlconf.c.

References controls_shutdown(), ISC_TRUE, and ns_controls::shuttingdown.

Referenced by shutdown_server().

isc_result_t ns_control_docommand ( isccc_sexpr_t message,
isc_buffer_t **  text 
)

This function is called to process the incoming command when a control channel message is received.

Definition at line 62 of file control.c.

References command, command_compare(), DNS_R_UNKNOWNCOMMAND, isc_app_shutdown(), ISC_FALSE, ISC_LOG_DEBUG, ISC_LOG_INFO, isc_log_setdebuglevel(), ISC_LOG_WARNING, isc_log_write(), ISC_R_FAILURE, ISC_R_SUCCESS, isc_timermgr_poke(), ISC_TRUE, isccc_alist_lookup(), isccc_cc_lookupstring(), NS_COMMAND_ADDZONE, NS_COMMAND_DELZONE, NS_COMMAND_DUMPDB, NS_COMMAND_DUMPSTATS, NS_COMMAND_FLUSH, NS_COMMAND_FLUSHNAME, NS_COMMAND_FLUSHTREE, NS_COMMAND_FREEZE, NS_COMMAND_HALT, NS_COMMAND_LOADKEYS, NS_COMMAND_MKEYS, NS_COMMAND_MODZONE, NS_COMMAND_NOTIFY, NS_COMMAND_NOTRACE, NS_COMMAND_NTA, NS_COMMAND_NULL, NS_COMMAND_QUERYLOG, NS_COMMAND_RECONFIG, NS_COMMAND_RECURSING, NS_COMMAND_REFRESH, NS_COMMAND_RELOAD, NS_COMMAND_RETRANSFER, NS_COMMAND_SCAN, NS_COMMAND_SECROOTS, NS_COMMAND_SHOWZONE, NS_COMMAND_SIGN, NS_COMMAND_SIGNING, NS_COMMAND_STATUS, NS_COMMAND_STOP, NS_COMMAND_SYNC, NS_COMMAND_TESTGEN, NS_COMMAND_THAW, NS_COMMAND_TIMERPOKE, NS_COMMAND_TRACE, NS_COMMAND_TSIGDELETE, NS_COMMAND_TSIGLIST, NS_COMMAND_UNFREEZE, NS_COMMAND_VALIDATION, NS_COMMAND_ZONESTATUS, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_CONTROL, ns_os_shutdownmsg(), ns_server_changezone(), ns_server_delzone(), ns_server_dumpdb(), ns_server_dumprecursing(), ns_server_dumpsecroots(), ns_server_dumpstats(), ns_server_flushcache(), ns_server_flushnode(), ns_server_flushonshutdown(), ns_server_freeze(), ns_server_mkeys(), ns_server_notifycommand(), ns_server_nta(), ns_server_reconfigcommand(), ns_server_refreshcommand(), ns_server_rekey(), ns_server_reloadcommand(), ns_server_retransfercommand(), ns_server_scan_interfaces(), ns_server_setdebuglevel(), ns_server_showzone(), ns_server_signing(), ns_server_status(), ns_server_sync(), ns_server_testgen(), ns_server_togglequerylog(), ns_server_tsigdelete(), ns_server_tsiglist(), ns_server_validation(), ns_server_zonestatus(), and ns_smf_add_message().

Referenced by control_recvmessage().


Generated on Tue Apr 28 17:41:07 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha