> I have extended the net-snmp agent with my own module. It contains scalars, 
> including one which is of type ASN_OBJECT_ID. In my handler function, when 
> this scalar is set, the only value I see is the OID for the object, not the 
> name. This is the case even when the object is specified by name in the 
> snmpset call.

Correct.
The SNMP protocol works with numeric OIDs throughout.
The names are only a convenience for the (human) manager.
Converting between numeric OID and textual labels tends to
be done at the "edges" of the management system.  Internally,
everything works with numbers.


> Is there a function I can call to get the name given the OID?

        snprint_objid()

> Once I have  the name, is there a function I can call to get the OID?

        snmp_parse_oid()

> If no function  exists to do this in a tidy way,
> is there any other way to do it?

Oh ye of little faith....

Dave



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to