On Fri, 2005-06-03 at 05:36, Alaios wrote:
> Hi i try to find how the oid struct is defined.. I
> have search in the /usr/include/net-snmp but i cant
> figure out.
I'm not sure where you looked, but:
/usr/include/net-snmp/types.h:
#ifndef EIGHTBIT_SUBIDS
typedef u_long oid;
#define MAX_SUBID 0xFFFFFFFF
#else
typedef u_char oid;
#define MAX_SUBID 0xFF
#endif
So 'oid' is actually a single integer, and really
corresponds to a "subidentifier". A full OID is
an array of these:
oid someObject[ MAX_OID_LEN ];
> i want to take
> the value from a counter type... how i must parse it?
> I have used the same actions as with an integer
> intvalue=*vars->val.integer and seems to work out. Is
> this correct...
That's correct.
Counter32 is a subtype of INTEGER, so uses the 'integer'
field of the val union
Dave
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders