Ethereal-dev: Re: [ethereal-dev] Clear warnings patch.

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

From: Tomislav Vujec <Tomislav.Vujec@xxxxxxxxx>
Date: Sun, 24 Oct 1999 16:12:05 +0200
Guy Harris wrote:
> I've applied the "packet-snmp.c" patch - hopefully, the warnings aren't
> telling us that the CMU or UCD SNMP library routines in question
> actually *do* modify the data to which their first arguments point.

You shouldn't worry about that. My colleagues from work assured me that
its just another const vs no-const code. Nevertheless, I picked up
ucd-snmp 4.0 source, and analyzed it a bit. asn_parse_header is in
smnplib/asn1.c. You can see there that first argument is treated as
input in pre function comment. If you go further, there is no
possibility to change value in that or in called functions. Same thing
for arg1 of snmp_comstr_parse in snmplib/snmp_auth.c. I guess they are
not fond of const :-)

> (I'd hoped to be able to eliminate the dependency on external SNMP
> libraries, but I didn't find any GPLed code to read MIB files and turn
> numerical object IDs into more human-readable OIDs; I have code that'll
> parse SNMP packets without using an external SNMP library, constructed
> by assaulting the GXSNMP code with a chainsaw, but it dumps the OIDs as
> long sequences of numbers with "."s between them, no words.
> 
> The SNACC ASN.1 compiler might let us do a better job, but it looks as
> if a significant amount of work might be necessary to adapt it to the
> task of reading MIB files.)

Well, I am not sure, what are the reasons against dependency on external
library, but you can always check another sources, like libsmi from
ftp://ftp.ibr.cs.tu-bs.de/pub/local/libsmi/. That library seems to be
part of scotty. On the other hand I am not an expert in the SNMP,
neither the licensing issues, so just discard my bubbling. I just want
to see code compiling without warnings, and all Makefile rules producing
correct results. Sort of a picky guy, you may say, but I can easily
adopt given good arguments, like those from Richard.

Regards,
Tomislav