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: Jochen Friedrich <jochen@xxxxxxxx>
Date: Sun, 24 Oct 1999 23:22:28 +0200 (CEST)
Hi Guy,

> 	7) not all SNMP libraries can cope with 64-bit data types - I
> 	   just found out that GLib checks whether your compiler
> 	   supports "long long", and defines "gint64"/"guint64" if it
> 	   does (I think most if not all UNIX compilers that support
> 	   64-bit integral data types use "long long {int, unsigned
> 	   int}" for it - even on 64-bit platforms, "long long" is 64
> 	   bits, rather than being 128 bits, i.e. twice a "long" -
> 	   although I think it's "__int64" or something like that in
> 	   Visual C++ on Windows) - and it'd be nice to be able to
> 	   handle that even if whatever SNMP library you have on your
> 	   machine doesn't;

And even worse, ASN.1 can encode variables of arbitrary lengths (and even
indefinite encoding is possible - most SNMP libraries aren't even capable
of decoding this form of encoding as it's not allowed for SNMP). If you
want to get them right, you might even be forced to use a library for
arbitrary precision like libgmp...

Cheers,
Jochen