Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

INTEGER vs. Integer32 in SMIv2

856 views
Skip to first unread message

Frank Fock

unread,
Oct 28, 1999, 3:00:00 AM10/28/99
to

Hi,

in SMIv2 "the type INTEGER, when not used for enumerated integers,
is called Integer32" (quote from "Understanding SNMP MIBs").

The SMIv2 ENTITY-MIB, for example, is not compliant to this rule.
Is this rule mostly ignored or should my MIB compiler enforce it?

TIA,
Frank Fock

--
-----------------------------------------------------------------------
Frank Fock Bosch Telecom Software-Systeme GmbH & Co. KG
Software-Technik TSS/SWT4
Email: frank...@de.bosch.com Blumenstrasse 22-24
Phone: +49 7191 13-4851 D-71522 Backnang
Fax: +49 7191 13-2502 Germany
-----------------------------------------------------------------------

dper...@snmpinfo.com

unread,
Oct 28, 1999, 3:00:00 AM10/28/99
to Frank Fock
HI,

The INTEGER/Integer32/ENUM is a highly political issue. The
bottom line is that type INTEGER must either be used with
a range specified, or used for enumerations.

On Thu, 28 Oct 1999, Frank Fock wrote:
> Hi,
>
> in SMIv2 "the type INTEGER, when not used for enumerated integers,
> is called Integer32" (quote from "Understanding SNMP MIBs").
>
> The SMIv2 ENTITY-MIB, for example, is not compliant to this rule.
> Is this rule mostly ignored or should my MIB compiler enforce it?
>
> TIA,
> Frank Fock

Regards,
/david t. perkins


Frank Strauss

unread,
Oct 28, 1999, 3:00:00 AM10/28/99
to
Hi!

dperkins> The INTEGER/Integer32/ENUM is a highly political issue. The
dperkins> bottom line is that type INTEGER must either be used with
dperkins> a range specified, or used for enumerations.

RFC 2578 says something else:

7.1.1. Integer32 and INTEGER

The Integer32 type represents integer-valued information between
-2^31 and 2^31-1 inclusive (-2147483648 to 2147483647 decimal). This
type is indistinguishable from the INTEGER type. Both the INTEGER
and Integer32 types may be sub-typed to be more constrained than the
Integer32 type.

Hence, INTEGER is also allowed without enumeration or range restrictions.

Frank

dper...@snmpinfo.com

unread,
Oct 28, 1999, 3:00:00 AM10/28/99
to Frank Strauss
HI,

Your conclusion does not follow from the text.

Regards,
/david t. perkins


m...@no.spam.please

unread,
Oct 28, 1999, 3:00:00 AM10/28/99
to
dper...@snmpinfo.com writes:

I'm still trying to get a handhold on this stuff, but I would say the
text is a bit confusing here. The quoted paragraph, by itself can be
understood to support the original poster's conclusion. The RFC says
the two types are indistinguishable, and if that's true, then what
applies to one can be applied to the other.

Actually, it's clear from the quoted paragraph that the two types are,
in fact, distinguishable, since INTEGER can represent values which
Integer32 cannot. I would say the RFC is confusing when it uses a word
like this which it doesn't mean. I've been wading my way through
fields of redundant verbiage in other RFCs which apparently have no
purpose other than to avoid this kind of confusion, so I'm a little
surprised at this.

However, the following paragraph (which wasn't quoted) would clue me
in to the fact that it didn't really mean "indistinguishable", or at
least should have qualified its use of it:

"The INTEGER type (but not the Integer32 type) may also be used to
represent integer-valued information as named-number
enumerations..."

So I'd have to say that while I wind up agreeing with you, I have some
sympathy for Frank as well.

Joe

Juergen Schoenwaelder

unread,
Oct 29, 1999, 3:00:00 AM10/29/99
to
Frank Fock <frank...@de.bosch.com> wrote:

: in SMIv2 "the type INTEGER, when not used for enumerated integers,


: is called Integer32" (quote from "Understanding SNMP MIBs").

: The SMIv2 ENTITY-MIB, for example, is not compliant to this rule.
: Is this rule mostly ignored or should my MIB compiler enforce it?

I think that most people will agree that it is good style to use
INTEGER only for enumerated types. But it is nevertheless legal
to use INTEGER on non-enumerated types. SMIv2 does not forbid this
usage. (And this probably makes sense in order to keep existing
SMIv2 definitions valid.)

Recommendation: A compiler which is potentially used during MIB
development should be able to warn about such a construction. But
you are not allowed to complain and to reject a MIB just because
it uses INTEGER for non-enumerated types.

/js

--
Juergen Schoenwaelder Technical University Braunschweig
<sch...@ibr.cs.tu-bs.de> Dept. Operating Systems & Computer Networks
Phone: +49 531 391 3289 Bueltenweg 74/75, 38106 Braunschweig, Germany
Fax: +49 531 391 5936 <URL:http://www.ibr.cs.tu-bs.de/~schoenw/>

0 new messages