Hi,

I have a small question concerning the value returned in "val_len" when
returning a variable of type "oid".


I have been writing a small program here in C using the net-snmp library
based on the examples on the net-snmp library.


It makes a snmp-query for a number of data-elements, one of them being
"SNMPv2-MIB::sysObjectID.0".

This returns a value of the type "oid".

However, I have noticed that size of the element (as found in
vars->val_len) is actually 4 times the number of elements in the oid.

So, a query to a cisco returns "SNMPv2-SMI::enterprises.9.1.46"
(1.3.6.1.4.1.9.1.46), vars->val_len will be 36!

I need the correct size as I want need to convert this to a string using
snprint_objid later.


Is this relation of "size = var_val_len / 4" something that is fixed and
the same on all platforms?

Or is there some other trick I need do to find the correct lenght of the
oid returned?



Cheerio! Kr. Bonne.


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
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