2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Partial support for "rndc status". Not all of the fields are filled in yet.

This commit is contained in:
Brian Wellington
2001-05-08 04:09:41 +00:00
parent cf186bf745
commit e4cd5a1e5d
6 changed files with 66 additions and 11 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.321 2001/05/08 03:42:30 gson Exp $ */
/* $Id: server.c,v 1.322 2001/05/08 04:09:39 bwelling Exp $ */
#include <config.h>
@@ -2777,3 +2777,26 @@ ns_server_flushcache(ns_server_t *server) {
isc_task_endexclusive(server->task);
return (result);
}
isc_result_t
ns_server_status(ns_server_t *server, isc_buffer_t *text) {
int n;
n = snprintf((char *)isc_buffer_used(text),
isc_buffer_availablelength(text),
"number of zones: %d\n"
"debug level: %d\n"
"xfers running: %d\n"
"xfers deferred: %d\n"
"soa queries in progress: %d\n"
"query logging is %s\n"
"server is up and running",
-1, /* XXX */
ns_g_debuglevel,
-1, -1, -1, /* XXX */
server->log_queries ? "ON" : "OFF");
if (n < 0)
return (ISC_R_NOSPACE);
isc_buffer_add(text, n);
return (ISC_R_SUCCESS);
}