From: Vincent Bernat Date: Sun, 24 May 2009 17:16:01 +0000 (+0200) Subject: Add some debug output to track know remote systems/ports. X-Git-Tag: 0.5.0~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4c439022a952329264815d7fa55b23888e785fd;p=thirdparty%2Flldpd.git Add some debug output to track know remote systems/ports. --- 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; }