X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=apps%2Fsilcd%2Fsilcd.c;h=d7e276a6175e65325f9ba997766ca3bbdeb73666;hp=33a5043cc7ca12475dc117c538a5930024e62773;hb=ecb19b3983b3e74bc4aaa82277abd125c53c3623;hpb=382d15d447b7a95390decfa783836ae4fe255b3d diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index 33a5043c..d7e276a6 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -306,6 +306,37 @@ SILC_TASK_CALLBACK(dump_stats) #undef STAT_OUTPUT #ifdef SILC_DEBUG + /* Dump internal flags */ + fprintf(fdd, "\nDumping internal flags\n"); + fprintf(fdd, " server_type : %d\n", silcd->server_type); + fprintf(fdd, " standalone : %d\n", silcd->standalone); + fprintf(fdd, " listenning : %d\n", silcd->listenning); + fprintf(fdd, " background : %d\n", silcd->background); + fprintf(fdd, " backup_router : %d\n", silcd->backup_router); + fprintf(fdd, " backup_primary : %d\n", silcd->backup_primary); + fprintf(fdd, " backup_noswitch : %d\n", silcd->backup_noswitch); + fprintf(fdd, " wait_backup : %d\n", silcd->wait_backup); + if (silcd->router) + 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 0x%x\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;