From f4c439022a952329264815d7fa55b23888e785fd Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 24 May 2009 19:16:01 +0200 Subject: [PATCH] Add some debug output to track know remote systems/ports. --- src/lldpd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lldpd.c b/src/lldpd.c index 9a5fc6cf..13570a70 100644 --- a/src/lldpd.c +++ b/src/lldpd.c @@ -619,6 +619,8 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s, port->p_chassis = chassis; chassis->c_refcount = 0; TAILQ_INSERT_TAIL(&cfg->g_chassis, chassis, c_entries); + i = 0; TAILQ_FOREACH(ochassis, &cfg->g_chassis, c_entries) i++; + LLOG_DEBUG("Currently, we know %d different systems", i); } /* Add port */ port->p_lastchange = port->p_lastupdate = time(NULL); @@ -630,6 +632,9 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s, TAILQ_INSERT_TAIL(&hardware->h_rports, port, p_entries); port->p_chassis = chassis; port->p_chassis->c_refcount++; + i = 0; TAILQ_FOREACH(oport, &hardware->h_rports, p_entries) i++; + LLOG_DEBUG("Currently, %s known %d neighbors", + hardware->h_ifname, i); return; } -- 2.39.5