ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [ethereal-dev] building with ucd-snmp v4.01

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Sat, 11 Dec 1999 18:37:53 -0800
> Does it not simply find the relevant include files and libraries if you
> run "configure" *without* any "--with-ucd-snmp"?

The way it finds the include files is to attempt to build a program that
includes the include file, and see if the build succeeds.

Given that UCD SNMP bogusly requires that you link with "-lkstat" even
if your program doesn't care about kernel statistics, that attempt
fails.

> > ucd-snmp also wants to be linked with libkstat on solaris,
> 
> Well, that's annoying - does UCD SNMP labor under the delusion that the
> only thing ever linked with it is an SNMP agent that has to use
> "-lkstat" to dredge information out of the kernel?

Yes.

> That's probably because you're the first person to try using Ethereal
> and UCD SNMP on Solaris (I didn't bother installing SNMP on the Solaris
> partition on my home machine, and we have CMU SNMP installed at work).

I installed UCD SNMP, and it fails even with the reduced dependence on
UCD SNMP.

However, given that I have no time whatsoever to devote to fixing this
problem, somebody who uses a Solaris box with UCD SNMP on it on a
regular basis (I *very* rarely run Solaris on my home machine, and don't
plan to run it frequently) would have to work on coming up with a way to
include "-lkstat" when necessary without including it when it doesn't
exist.

The right long-term fix might be to do our own MIB parsing (given that
UCD and CMU SNMP drag along a whole bunch of stuff useless to us, *and*
seem to cause all sorts of annoying problems, e.g. some mysterious
version of UCD SNMP on somebody's IRIX box that used the "_P()" hack to
surround prototype declarations, unlike standard UCD SNMP, causing
program that didn't include the right other header files, whatever they
might be, e.g. Ethereal, to fail to compile, and this "-lkstat" stuff),
but that's a fair bit of work, and then you have to worry about getting
it to find where the MIB files are.

"libsmi" is another possibility, but it looks as if it's a sufficiently
low-level library that it'd be a fair bit of work just to do the sort of
stuff we'd want - and it doesn't get the DISPLAY-HINT information from
MIB files, so it won't let you use that to display values.