[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Enumerated INTEGER - start with zero or one (0 or 1) ?



On Wed, 1 Jan 2003, C. M. Heard wrote:

> On Wed, 1 Jan 2003, Wijnen, Bert (Bert) wrote:
> 
> > basically OK with me... although I would rather have a reference
> > to an example in an RFC than in an I-D.
> 
> Does anyone on the list know of such a reference?  What I want is
> an RFC that contains a definition using an enumerated integer with
> values that don't start at 1 and/or are non-contiguous for a "good
> reason".  The example I cited was this TC from "Syslog Device
> Configuration MIB", <draft-ietf-syslog-device-mib-01.txt> ...

Answering my own question:  the InetAddressType TC in RFC 3291.

Incorporating this and the forwarded comments from Keith, the stuff
on enumerations now reads as follows:

   - For integer-valued enumerations:

     - INTEGER is REQUIRED;
     - Integer32, Unsigned32, and Gauge32 MUST NOT be used.

   Note that RFC 2578 recommends (but does not require) that integer-
   valued enumerations start at 1 and be numbered contiguously.  This
   recommendation SHOULD be followed unless there is a valid reason to
   do otherwise, e.g., to match values of external data or to indicate
   special cases.  For an example see the InetAddressType TC [RFC3291].

I removed the "SHOULD be documented" language, mainly because the
note that RFC 3291 doesn't follow that recommendation.  The original
version in RFC 2851 had the following ASN.1 comments to explain why
the enumerations were not contiguous:

                     unknown(0),
                     ipv4(1),    -- these named numbers are aligned
                     ipv6(2),    -- with AddressFamilyNumbers from
                     dns(16)     -- IANA-ADDRESS-FAMILY-NUMBERS-MIB

However, those comments are no longer present in RFC 3291.

//cmh