Retrieving node SYNTAX

Hi!
I need to get the sysntax of a node, like Counter32, Gauge32, etc. The type just tells me whether it's an interger or an unsigned integer. Is there any way to find out whether it has been declared as a Counter or a Gauge?
Thanks, Mayank.
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.

sndtrn4 writes:
sndtrn4> I need to get the sysntax of a node, like Counter32, Gauge32, sndtrn4> etc. The type just tells me whether it's an interger or an sndtrn4> unsigned integer. Is there any way to find out whether it has sndtrn4> been declared as a Counter or a Gauge?
I guess you are looking for a function which gives you the SNMP type for a given SmiType. Take a look at getSnmpType() in tools/dump-stools.c which does exactly that.
Well, it actually returns the SNMP tag names used by the gsnmp package - but it should be straight-forward to modify the code to do whatever you need. And this also explains why such a mapping is usually specific to the SNMP implementation and thus libsmi does not provide support for this kind of thing in the documented API.
/js -- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.
participants (2)
-
Juergen Schoenwaelder
-
sndtrn4@hss.hns.com