Subject: Re: [MIB-DOCTORS] Float32? and NHDP-MIB reviewer

From: "Bert (IETF) Wijnen" <[email-masked]>
Date: Mon, 29 Nov 2010 09:50:03 +0100

Hi Bob, there is indeed not "float32" SMI type.
I believe people  have done floats by defining 2 32bit integer objetcs,
one for the component and one for the mantissa. But I would have to
go search for examples.

I am copying the mib-doctors list, maybe someone has an immediate exa,ple
handy.

Bert

On 11/28/10 9:32 PM, Robert G Cole wrote:
> Dan,
> Bert,
>
> Ulrich and I are writing the Neighborhood Discovery Protocol (NHDP) -
> MIB within the MANET WG.  Two questions:
>
> 1) The NHDP protocol has several objects of type Float.  We would like
> to provide access to these objects through the MIB, e.g.
>
>> nhdpInitialQuality  OBJECT-TYPE
>>        SYNTAX      Float32
>>        MAX-ACCESS  read-write
>>        STATUS      current
>>        DESCRIPTION
>>           "nhdpInitialQuality corresponds to
>>           INITIAL_QUALITY of NHDP.
>>
>>            The following constraint applies to this
>>            parameter:
>>                0<= nhdpInitialQuality<= 1.0"
>>        REFERENCE
>>           "The NHDP draft.
>>            Section 5 on Protocol Parameters and
>>            Constraints."
>>        -- DEFVAL { 1.0 }
>>     ::= { nhdpInterfaceEntry 10 }
>
> However, we do not know of any type Float objects within SMI?  How
> should we address this?  I searched the MIB-Doctors list but did not
> find a relevant discussion.
>
>
> 2) We are very close to wrapping up the NHDP-MIB and would like to have
> someone do a careful review prior to our asking for WG last call.  Could
> you recommend someone for us to work with?
>
>
> Thanks,
> Bob
>
>
>
>

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Mon, 29 Nov 2010 10:17:04 +0100

> I am copying the mib-doctors list, maybe someone has an immediate exa,ple

TeLinkBandwidth ::= TEXTUAL-CONVENTION
   STATUS       current
   DESCRIPTION
       "This type is used to represent link bandwidth in bps.  This
        value is represented using a 4 octet IEEE floating point
        format [IEEE].  The floating point representation is not
        used to represent fractional value but rather to allow
        specification of large numbers that cannot be expressed
        with 32-bit integers."
   REFERENCE
       "IEEE Standard for Binary Floating-Point Arithmetic,
        Standard 754-1985"
   SYNTAX       OCTET STRING (SIZE(4))

draft-ietf-ipfix-psamp-mib-02.txt:

   PsampFloat64 ::= TEXTUAL-CONVENTION
       STATUS       current       DESCRIPTION
               "Represents the float64 data type and MUST be encoded as
               an IEEE double-precision 64-bit floating point-type, as
               specified in IEEE 754."
       SYNTAX       OCTET STRING (SIZE (8))

Perhaps time to have someone write a document that defines reusable
Float32, Float64 and Flat128 textual conventions based on IEEE 754
carried in an OCTET STRING?

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Ulrich Herberg <[email-masked]>
Date: Mon, 29 Nov 2010 10:22:32 +0100

Jürgen,

> draft-ietf-ipfix-psamp-mib-02.txt:

Thanks, that seems to be what we need.

> carried in an OCTET STRING?

I agree that this would be a useful document.

Ulrich

---

From: "Randy Presuhn" <[email-masked]>
Date: Mon, 29 Nov 2010 14:47:52 -0800

Hi -

> From: "Juergen Schoenwaelder" <[email-masked]>
> To: "Bert (IETF) Wijnen" <[email-masked]>
> Cc: <[email-masked]>; "Robert G Cole" <[email-masked]>; "Ulrich Herberg" <[email-masked]>; "Juergen Quittek"
<[email-masked]>
> Sent: Monday, November 29, 2010 1:17 AM
> Subject: Re: [MIB-DOCTORS] Float32? and NHDP-MIB reviewer
...
> carried in an OCTET STRING?

I've just posted a drafty draft.  Comments welcome, particularly if
someone recalls how to get xml2rfc to reference the current (2008)
version of IEEE 754 rather than the obsolete 1985 version.

http://www.ietf.org/internet-drafts/draft-presuhn-floats-00.txt

Randy

---

From: Robert G Cole <[email-masked]>
Date: Tue, 30 Nov 2010 12:39:37 -0500

Thanks Bert,
Bob

---

From: Robert G Cole <[email-masked]>
Date: Tue, 30 Nov 2010 12:43:02 -0500

Juergen,

Thanks.  Ulrich and I are looking for a Float defined from 0 to unity.
Do you believe the below representation is appropriate for our purposes?

Bob

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 30 Nov 2010 21:47:06 +0100

> Do you believe the below representation is appropriate for our purposes?

We should really have clean Float types and avoid rather arbitrary
references between MIB modules. draft-presuhn-floats-00.txt is the
right way to go in general.

If in a specific case where you only need to represent the range
[0..1], you might instead of a float simply use an Unsigned32 or
Unsigned64 to be devided by the maximum value. This way, you end up
getting more precision with fewer bits and without a need for floats
at all.

/js