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

Net-snmp opaque float implementation problem

342 views
Skip to first unread message

Dave Shield

unread,
Apr 14, 2004, 11:48:40 AM4/14/04
to

> The purpose of implementing this mib module is so that our customer can=
use =

> their own MIB browser to talk to the agent running in our proprietary =
box. =

> =

> If I want to implement some floating point object so that customer coul=
d
> also get and set it as floats what would be the best way to implement?

Use an ASCII string containing a printable representation of the value,
and translate it to/from an actual float within your MIB module code.

I.e. following UCD-SNMP-MIB::laLoad rather than UCD-SNMP-MIB::laLoadFloat=


Dave

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Sabina Sayeed

unread,
Apr 14, 2004, 11:54:35 AM4/14/04
to
I am sorry about sending the private email. I got confused.

Anyway thanks again for your time.=20

The purpose of implementing this mib module is so that our customer can =

use=20


their own MIB browser to talk to the agent running in our proprietary =

box.=20

If I want to implement some floating point object so that customer could =
also=20


get and set it as floats what would be the best way to implement?

Is there any example anywhere that I could refer to?

Thanks again,
Sabina

-----Original Message-----
From: Dave Shield [mailto:D.T.S...@csc.liv.ac.uk]
Sent: Wednesday, April 14, 2004 10:21 AM
To: Sabina Sayeed
Cc: net-snm...@lists.sourceforge.net
Subject: Re: Net-snmp opeque float implementation problem=20


[ First - *please* don't mail me privately, without copying
any responses to the mailing list. I don't have the time
or inclination to offer private, unpaid, SNMP consultancy.
Keep discussions to the list, where others can both learn
and offer advice. Thanks. ]

> 1. Thanks for the suggestion. Yes it works from the local host now.

Good.


> 2. I have a MG_Soft MIB Browser running on my PC. If I try to get
> this object from MIB browser I get the following output in hex again.

Very likely.
The opaque-wrapped float syntax is a private enhancement with the
Net-SNMP suite. I wouldn't expect it to be understood by any other
SNMP toolkit or most SNMP applications.

> 3. If I do a set 2.1 on type opaque from my MIB Browser I get an =
error:


> ***** SNMP SET-RESPONSE START *****
> Error: Wrong type
> Error index: 1
> 1: macDefConfRcstXcoord.0 (opaque) 32.2E.31 (hex)
> ***** SNMP SET-RESPONSE END *****

Yes - you will.
The value of an opaque-wrapped float is *NOT* simply an ascii string.
See the DEFINITION of the Float type in NET-SNMP-TC.txt for the
gory details.


> Is OPAQUE FLOAT some special type that is not supported by my tools.

Yes.

> Is there any way=20
> for my MIB Browser to identify and do the wrapping for this type?

Unless you've got the source to the browser, then probably not.

Sabina Sayeed

unread,
Apr 15, 2004, 10:28:09 AM4/15/04
to
It works perfectly now.

Thanks,
Sabina

-----Original Message-----
From: Dave Shield [mailto:D.T.S...@csc.liv.ac.uk]
Sent: Wednesday, April 14, 2004 10:45 AM
To: Sabina Sayeed
Cc: net-snm...@lists.sourceforge.net

Subject: Re: Net-snmp opaque float implementation problem=20

> The purpose of implementing this mib module is so that our customer =
can use=20


> their own MIB browser to talk to the agent running in our proprietary =
box.=20
>=20

> If I want to implement some floating point object so that customer =
could


> also get and set it as floats what would be the best way to implement?

Use an ASCII string containing a printable representation of the value,
and translate it to/from an actual float within your MIB module code.

I.e. following UCD-SNMP-MIB::laLoad rather than =
UCD-SNMP-MIB::laLoadFloat

0 new messages