Merge from vendor branch LIBARCHIVE:
[dragonfly.git] / contrib / bind-9.2.4rc7 / bin / named / include / named / control.h
1 /*
2  * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 2001, 2003  Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and 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
18 /* $Id: control.h,v 1.6.2.3 2004/03/09 06:09:21 marka Exp $ */
19
20 #ifndef NAMED_CONTROL_H
21 #define NAMED_CONTROL_H 1
22
23 /*
24  * The name server command channel.
25  */
26
27 #include <isccc/types.h>
28
29 #include <named/aclconf.h>
30 #include <named/types.h>
31
32 #define NS_CONTROL_PORT                 953
33
34 #define NS_COMMAND_STOP         "stop"
35 #define NS_COMMAND_HALT         "halt"
36 #define NS_COMMAND_RELOAD       "reload"
37 #define NS_COMMAND_RECONFIG     "reconfig"
38 #define NS_COMMAND_REFRESH      "refresh"
39 #define NS_COMMAND_DUMPSTATS    "stats"
40 #define NS_COMMAND_QUERYLOG     "querylog"
41 #define NS_COMMAND_DUMPDB       "dumpdb"
42 #define NS_COMMAND_TRACE        "trace"
43 #define NS_COMMAND_NOTRACE      "notrace"
44 #define NS_COMMAND_FLUSH        "flush"
45 #define NS_COMMAND_STATUS       "status"
46 #define NS_COMMAND_NULL         "null"
47
48 isc_result_t
49 ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp);
50 /*
51  * Create an initial, empty set of command channels for 'server'.
52  */
53
54 void
55 ns_controls_destroy(ns_controls_t **ctrlsp);
56 /*
57  * Destroy a set of command channels.
58  *
59  * Requires:
60  *      Shutdown of the channels has completed.
61  */
62
63 isc_result_t
64 ns_controls_configure(ns_controls_t *controls, cfg_obj_t *config,
65                       ns_aclconfctx_t *aclconfctx);
66 /*
67  * Configure zero or more command channels into 'controls'
68  * as defined in the configuration parse tree 'config'.
69  * The channels will evaluate ACLs in the context of
70  * 'aclconfctx'.
71  */
72
73 void
74 ns_controls_shutdown(ns_controls_t *controls);
75 /*
76  * Initiate shutdown of all the command channels in 'controls'.
77  */
78
79 isc_result_t
80 ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text);
81
82 #endif /* NAMED_CONTROL_H */