From 451947b7bed5ba6c9c925ceb10df39c42a330614 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sun, 1 Nov 2026 21:38:11 +0100 Subject: Live logging networks was defunc for a while, does not work with v6, so we remove it --- ot_stats.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'ot_stats.c') diff --git a/ot_stats.c b/ot_stats.c index d38355a..eb046a0 100644 --- a/ot_stats.c +++ b/ot_stats.c @@ -117,10 +117,6 @@ union stats_network_node { stats_network_node *children[STATS_NETWORK_NODE_COUNT]; }; -#ifdef WANT_LOG_NETWORKS -static stats_network_node *stats_network_counters_root; -#endif - static int stat_increase_network_count(stats_network_node **pnode, int depth, uintptr_t ip) { int foo = __LDR(ip, depth); stats_network_node *node; @@ -504,36 +500,6 @@ static void stats_return_numwants(char **reply, const char *reply_en } #endif -#ifdef WANT_FULLLOG_NETWORKS -static void stats_return_fulllog(size_t *iovec_entries, struct iovec **iovector, char *r) { - ot_log *loglist = g_logchain_first, *llnext; - char *re = r + OT_STATS_TMPSIZE; - - g_logchain_first = g_logchain_last = 0; - - while (loglist) { - if (r + (loglist->size + 64) >= re) { - r = iovec_next_chunk(iovec_entries, iovector, r, 32 * OT_STATS_TMPSIZE); - if (!r) - return; - re = r + 32 * OT_STATS_TMPSIZE; - } - char ip_readable[64]; - - ip_readable[ip_format(ip_readable, loglist->ip)] = 0; - fmt_append(&r, re, "%08ld: %s\n", loglist->time, ip_readable); - fmt_bytes(&r, re, loglist->data, loglist->size); - fmt_append(&r, re, "\n*\n\n"); - - llnext = loglist->next; - free(loglist->data); - free(loglist); - loglist = llnext; - } - iovec_trim_last(iovec_entries, iovector, r); -} -#endif - static void stats_return_everything(char **reply, const char *reply_end) { unsigned long long total[OT_COUNTER_COUNT]; @@ -670,11 +636,6 @@ static void stats_make(size_t *iovec_entries, struct iovec **iovector, ot_taskty case TASK_STATS_WOODPECKERS: stats_return_woodpeckers(&r, r_end, 128); break; -#endif -#ifdef WANT_FULLLOG_NETWORKS - case TASK_STATS_FULLLOG: - stats_return_fulllog(iovec_entries, iovector, r); - return; #endif default: iovec_free(iovec_entries, iovector); @@ -693,9 +654,6 @@ void stats_issue_event(struct ot_workstruct *ws, ot_status_event event, PROTO_FL COUNT(OT_COUNTER_TCP_CONNECTIONS, 1); else COUNT(OT_COUNTER_UDP_CONNECTIONS, 1); -#ifdef WANT_LOG_NETWORKS - stat_increase_network_count(&stats_network_counters_root, 0, event_data); -#endif break; case EVENT_ANNOUNCE: if (proto == FLAG_TCP) -- cgit v1.3