Commit de4f679a authored by Michael Graff's avatar Michael Graff
Browse files

revert changes accidently committed to mainline

parent 1a79585f
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2006 Internet Systems Consortium, Inc. ("ISC")
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
......@@ -16,8 +14,9 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: bind9.xsl,v 1.8 2007/01/10 15:18:24 explorer Exp $ -->
<!-- $Id: bind9.xsl,v 1.9 2007/01/10 18:49:36 explorer Exp $ -->
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
......@@ -109,129 +108,28 @@ tr.lrow {
</xsl:for-each>
</table>
<br />
<br />
<xsl:for-each select="views/view">
<table>
<tr class="rowh">
<th colspan="11">Zones for View <xsl:value-of select="name" /></th>
</tr>
<tr class="rowh">
<th>Name</th>
<th>Class</th>
<th>Serial</th>
<th>Success</th>
<th>Referral</th>
<th>NXRRSET</th>
<th>NXDOMAIN</th>
<th>Recursion</th>
<th>Failure</th>
<th>Duplicate</th>
<th>Dropped</th>
</tr>
<xsl:for-each select="zones/zone">
<tr class="lrow">
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="rdataclass"/></td>
<td><xsl:value-of select="serial"/></td>
<td><xsl:value-of select="counters/success"/></td>
<td><xsl:value-of select="counters/referral"/></td>
<td><xsl:value-of select="counters/nxrrset"/></td>
<td><xsl:value-of select="counters/nxdomain"/></td>
<td><xsl:value-of select="counters/recursion"/></td>
<td><xsl:value-of select="counters/failure"/></td>
<td><xsl:value-of select="counters/duplicate"/></td>
<td><xsl:value-of select="counters/dropped"/></td>
</tr>
</xsl:for-each>
</table>
<br />
</xsl:for-each>
<br />
<table>
<tr class="rowh">
<th colspan="6">Network Status</th>
<th colspan="4">Zones for View <xsl:value-of select="name" /></th>
</tr>
<tr class="rowh">
<th>ID</th>
<th>Type</th>
<th>References</th>
<th>LocalAddress</th>
<th>PeerAddress</th>
<th>State</th>
</tr>
<xsl:for-each select="socketmgr/sockets/socket">
<tr class="lrow">
<td><xsl:value-of select="id"/></td>
<td><xsl:value-of select="type"/></td>
<td><xsl:value-of select="references"/></td>
<td><xsl:value-of select="local-address"/></td>
<td><xsl:value-of select="peer-address"/></td>
<td>
<xsl:for-each select="states">
<xsl:value-of select="."/>
</xsl:for-each>
</td>
</tr>
</xsl:for-each>
</table>
<br />
<table>
<tr class="rowh"><th colspan="2">Task Manager Configuration</th></tr>
<tr class="lrow">
<td>Thread-Model</td>
<td>
<xsl:value-of select="taskmgr/thread-model/type"/>
</td>
</tr>
<tr class="lrow">
<td>Worker Threads</td>
<td>
<xsl:value-of select="taskmgr/thread-model/worker-threads"/>
</td>
</tr>
<tr class="lrow">
<td>Default Quantum</td>
<td>
<xsl:value-of select="taskmgr/thread-model/default-quantum"/>
</td>
</tr>
<tr class="lrow">
<td>Tasks Running</td>
<td>
<xsl:value-of select="taskmgr/thread-model/tasks-running"/>
</td>
</tr>
</table>
<br/>
<table>
<tr class="rowh">
<th colspan="5">Tasks</th>
</tr>
<tr class="rowh">
<th>ID</th>
<th>Name</th>
<th>References</th>
<th>State</th>
<th>Quantum</th>
<th>Class</th>
<th>Serial</th>
</tr>
<xsl:for-each select="taskmgr/tasks/task">
<xsl:for-each select="zones/zone">
<tr class="lrow">
<td><xsl:value-of select="id"/></td>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="references"/></td>
<td><xsl:value-of select="state"/></td>
<td><xsl:value-of select="quantum"/></td>
<td><xsl:value-of select="rdataclass"/></td>
<td><xsl:value-of select="serial"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</table>
<br />
</xsl:for-each>
</body>
</html>
</xsl:template>
......
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.473 2007/01/04 00:01:13 marka Exp $ */
/* $Id: server.c,v 1.474 2007/01/10 18:50:37 explorer Exp $ */
/*! \file */
......@@ -5200,14 +5200,6 @@ server_generatexml(ns_server_t *server, unsigned int *buflen, xmlChar **buf)
}
TRY0(xmlTextWriterEndElement(writer)); /* views */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "socketmgr"));
isc_socketmgr_renderxml(ns_g_socketmgr, writer);
TRY0(xmlTextWriterEndElement(writer)); /* socketmgr */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "taskmgr"));
isc_taskmgr_renderxml(ns_g_taskmgr, writer);
TRY0(xmlTextWriterEndElement(writer)); /* taskmgr */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "server"));
xmlTextWriterStartElement(writer, ISC_XMLCHAR "boot-time");
xmlTextWriterWriteString(writer, ISC_XMLCHAR boottime);
......
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.h,v 1.68 2007/01/04 00:01:13 marka Exp $ */
/* $Id: socket.h,v 1.69 2007/01/10 18:56:20 explorer Exp $ */
#ifndef ISC_SOCKET_H
#define ISC_SOCKET_H 1
......@@ -64,7 +64,6 @@
#include <isc/time.h>
#include <isc/region.h>
#include <isc/sockaddr.h>
#include <isc/xml.h>
ISC_LANG_BEGINDECLS
......@@ -796,14 +795,6 @@ isc_socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
* \li #ISC_R_FAILURE
*/
#ifdef HAVE_LIBXML2
void
isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer);
/*%<
* Render internal statistics and other state into the XML document.
*/
#endif /* HAVE_LIBXML2 */
ISC_LANG_ENDDECLS
#endif /* ISC_SOCKET_H */
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: task.h,v 1.57 2007/01/04 00:01:13 marka Exp $ */
/* $Id: task.h,v 1.58 2007/01/10 18:55:54 explorer Exp $ */
#ifndef ISC_TASK_H
#define ISC_TASK_H 1
......@@ -84,7 +84,6 @@
#include <isc/lang.h>
#include <isc/stdtime.h>
#include <isc/types.h>
#include <isc/xml.h>
#define ISC_TASKEVENT_FIRSTEVENT (ISC_EVENTCLASS_TASK + 0)
#define ISC_TASKEVENT_SHUTDOWN (ISC_EVENTCLASS_TASK + 1)
......@@ -612,14 +611,6 @@ isc_taskmgr_destroy(isc_taskmgr_t **managerp);
* have been freed.
*/
#ifdef HAVE_LIBXML2
void
isc_taskmgr_renderxml(isc_taskmgr_t *mgr, xmlTextWriterPtr writer);
/*%<
* Render internal statistics and other state into the XML document.
*/
#endif /* HAVE_LIBXML2 */
ISC_LANG_ENDDECLS
#endif /* ISC_TASK_H */
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: task.c,v 1.100 2007/01/05 07:24:51 marka Exp $ */
/* $Id: task.c,v 1.101 2007/01/10 18:51:27 explorer Exp $ */
/*! \file
* \author Principal Author: Bob Halley
......@@ -67,12 +67,6 @@ typedef enum {
task_state_done
} task_state_t;
#ifdef HAVE_LIBXML2
static const char *statenames[] = {
"idle", "ready", "running", "done",
};
#endif
#define TASK_MAGIC ISC_MAGIC('T', 'A', 'S', 'K')
#define VALID_TASK(t) ISC_MAGIC_VALID(t, TASK_MAGIC)
......@@ -1302,82 +1296,3 @@ isc_task_endexclusive(isc_task_t *task) {
UNUSED(task);
#endif
}
#ifdef HAVE_LIBXML2
void
isc_taskmgr_renderxml(isc_taskmgr_t *mgr, xmlTextWriterPtr writer)
{
isc_task_t *task;
LOCK(&mgr->lock);
/*
* Write out the thread-model, and some details about each depending
* on which type is enabled.
*/
xmlTextWriterStartElement(writer, ISC_XMLCHAR "thread-model");
#ifdef ISC_PLATFORM_USETHREADS
xmlTextWriterStartElement(writer, ISC_XMLCHAR "type");
xmlTextWriterWriteString(writer, ISC_XMLCHAR "threaded");
xmlTextWriterEndElement(writer); /* type */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "worker-threads");
xmlTextWriterWriteFormatString(writer, "%d", mgr->workers);
xmlTextWriterEndElement(writer); /* worker-threads */
#else /* ISC_PLATFORM_USETHREADS */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "type");
xmlTextWriterWriteString(writer, ISC_XMLCHAR "non-threaded");
xmlTextWriterEndElement(writer); /* type */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
xmlTextWriterWriteFormatString(writer, "%d", mgr->refs);
xmlTextWriterEndElement(writer); /* references */
#endif /* ISC_PLATFORM_USETHREADS */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "default-quantum");
xmlTextWriterWriteFormatString(writer, "%d", mgr->default_quantum);
xmlTextWriterEndElement(writer); /* default-quantum */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "tasks-running");
xmlTextWriterWriteFormatString(writer, "%d", mgr->tasks_running);
xmlTextWriterEndElement(writer); /* tasks-running */
xmlTextWriterEndElement(writer); /* thread-model */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "tasks");
task = ISC_LIST_HEAD(mgr->tasks);
while (task != NULL) {
LOCK(&task->lock);
xmlTextWriterStartElement(writer, ISC_XMLCHAR "task");
if (task->name[0] != 0) {
xmlTextWriterStartElement(writer, ISC_XMLCHAR "name");
xmlTextWriterWriteFormatString(writer, "%s",
task->name);
xmlTextWriterEndElement(writer); /* name */
}
xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
xmlTextWriterWriteFormatString(writer, "%d", task->references);
xmlTextWriterEndElement(writer); /* references */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "state");
xmlTextWriterWriteFormatString(writer, "%s",
statenames[task->state]);
xmlTextWriterEndElement(writer); /* state */
xmlTextWriterStartElement(writer, ISC_XMLCHAR "quantum");
xmlTextWriterWriteFormatString(writer, "%d", task->quantum);
xmlTextWriterEndElement(writer); /* quantum */
xmlTextWriterEndElement(writer);
UNLOCK(&task->lock);
task = ISC_LIST_NEXT(task, link);
}
xmlTextWriterEndElement(writer); /* tasks */
UNLOCK(&mgr->lock);
}
#endif /* HAVE_LIBXML2 */
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.267 2007/01/04 00:01:13 marka Exp $ */
/* $Id: socket.c,v 1.268 2007/01/10 18:56:20 explorer Exp $ */
/*! \file */
......@@ -56,7 +56,6 @@
#include <isc/task.h>
#include <isc/thread.h>
#include <isc/util.h>
#include <isc/xml.h>
#include "errno2result.h"
......@@ -3959,98 +3958,3 @@ isc__socketmgr_dispatch(fd_set *readset, fd_set *writeset, int maxfd) {
return (ISC_R_SUCCESS);
}
#endif /* ISC_PLATFORM_USETHREADS */
#ifdef HAVE_LIBXML2
static const char *
_socktype(int type)
{
if (type == 1)
return ("udp");
else if (type == 2)
return ("tcp");
else if (type == 3)
return ("unix");
else if (type == 4)
return ("fdwatch");
else
return ("not-initialized");
}
void
isc_socketmgr_renderxml(isc_socketmgr_t *mgr, xmlTextWriterPtr writer)
{
isc_socket_t *sock;
char peerbuf[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_t addr;
ISC_SOCKADDR_LEN_T len;
LOCK(&mgr->lock);
#ifndef ISC_PLATFORM_USETHREADS
xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
xmlTextWriterWriteFormatString(writer, "%d", mgr->refs);
xmlTextWriterEndElement(writer);
#endif
xmlTextWriterStartElement(writer, ISC_XMLCHAR "sockets");
sock = ISC_LIST_HEAD(mgr->socklist);
while (sock != NULL) {
LOCK(&sock->lock);
xmlTextWriterStartElement(writer, ISC_XMLCHAR "socket");
xmlTextWriterStartElement(writer, ISC_XMLCHAR "references");
xmlTextWriterWriteFormatString(writer, "%d", sock->references);
xmlTextWriterEndElement(writer);
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "type",
ISC_XMLCHAR _socktype(sock->type));
if (sock->connected) {
isc_sockaddr_format(&sock->peer_address, peerbuf,
sizeof(peerbuf));
xmlTextWriterWriteElement(writer,
ISC_XMLCHAR "peer-address",
ISC_XMLCHAR peerbuf);
}
len = sizeof(addr);
if (getsockname(sock->fd, &addr.type.sa, (void *)&len) == 0) {
isc_sockaddr_format(&addr, peerbuf, sizeof(peerbuf));
xmlTextWriterWriteElement(writer,
ISC_XMLCHAR "local-address",
ISC_XMLCHAR peerbuf);
}
if (sock->pending_recv)
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
ISC_XMLCHAR "pending-receive");
if (sock->pending_send)
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
ISC_XMLCHAR "pending-send");
if (sock->pending_accept)
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
ISC_XMLCHAR "pending_accept");
if (sock->listener)
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
ISC_XMLCHAR "listener");
if (sock->connected)
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
ISC_XMLCHAR "connected");
if (sock->connecting)
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
ISC_XMLCHAR "connecting");
if (sock->bound)
xmlTextWriterWriteElement(writer, ISC_XMLCHAR "state",
ISC_XMLCHAR "bound");
xmlTextWriterEndElement(writer); /* socket */
UNLOCK(&sock->lock);
sock = ISC_LIST_NEXT(sock, link);
}
xmlTextWriterEndElement(writer); /* sockets */
UNLOCK(&mgr->lock);
}
#endif /* HAVE_LIBXML2 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment