Date: Thu, 21 Nov 1996 14:33:26 +1100 (EST) From: michael butler <imb@scgt.oz.au> To: peter@spinner.DIALix.COM (Peter Wemm) Cc: freebsd-hackers@FreeBSD.org Subject: Re: Help: ucd-snmpd w/freebsd Message-ID: <199611210333.OAA02484@asstdc.scgt.oz.au> In-Reply-To: <56vo8j$irv$1@haywire.DIALix.COM> from Peter Wemm at "Nov 20, 96 08:04:35 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm writes: > I ran into this when setting up mrtg, and disabled the "optimisation" in > the snmpd code. I was unsure whether to commit the patch to the ports > collection, it makes very little difference in cpu resource consumption > but certainly makes a lot of strange side effects disappear. While you're at it .. if this hasn't already been addressed, could you please fix snmpnetstat to correct the byte-order of port numbers .. *** inet.c Sat Sep 30 06:43:19 1995 --- /root/inet.c Fri Aug 2 16:15:33 1996 *************** *** 509,519 **** cp = (char *) index(line, '\0'); #endif if (!nflag && port) ! sp = getservbyport((int)port, proto); if (sp || port == 0) sprintf(cp, "%.8s", sp ? sp->s_name : "*"); else ! sprintf(cp, "%d", ntohs((u_short)port)); width = 22; printf(" %-*.*s", width, width, line); } --- 509,519 ---- cp = (char *) index(line, '\0'); #endif if (!nflag && port) ! sp = getservbyport(ntohs(port), proto); if (sp || port == 0) sprintf(cp, "%.8s", sp ? sp->s_name : "*"); else ! sprintf(cp, "%d", (u_short)port); width = 22; printf(" %-*.*s", width, width, line); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611210333.OAA02484>