More information dumping in SIGUSR1 in debug mode.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 22 Jan 2003 09:23:57 +0000 (09:23 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 22 Jan 2003 09:23:57 +0000 (09:23 +0000)
apps/silcd/silcd.c

index 7327758f017b61e339e7dc37b237f5e88df26cea..7b37ac6a43dd8d257d1f70eaf1e29e3f417fe189 100644 (file)
@@ -320,6 +320,23 @@ SILC_TASK_CALLBACK(dump_stats)
     fprintf(fdd, "  primary router         : %s\n", 
       silcd->router->server_name ? silcd->router->server_name : "");
 
+  /* Dump socket connections */
+  {
+    int i;
+    SilcSocketConnection s;
+
+    fprintf(fdd, "\nDumping socket connections\n");
+    for (i = 0; i < silcd->config->param.connections_max; i++) {
+      s = silcd->sockets[i];
+      if (!s)
+        continue;
+      fprintf(fdd, "  %d: host %s ip %s port %d type %d flags %ul\n",
+             s->sock, s->hostname ? s->hostname : "N/A",
+             s->ip ? s->ip : "N/A", s->port, s->type,
+             (unsigned int)s->flags);
+    }
+  }
+
   /* Dump lists */
   {
     SilcIDCacheList list = NULL;