Hi,
I have to instrumnet MIB OIDs which having data type as BITS.
1. How i can send response to BITS data-type oids, now i am filling set_var_type_value as follows.
snmp_set_var_typed_value (requests, ASN_OCTET_STR, (u_char *) "1",strlen ("1"));
When i am giving snmpget on this oid, it is displaying as
snmpget -v2c -c public 10.201.114.135 myOid.1.1
MY-MIB::myOid.1.1 = BITS: 30
noPiggybackReq(2) noFragmentData(3)
Do i have to pass the value in different format or i am sending in the right format which is not able to understand by snmpget application?
2. While getting the value to set for the BITS data type mibs, i am sending snmpset as follows,
snmpset -v2c -c private 10.201.114.135 myOid.1.1 b 1
In the mib2c instrumentation code, for getting the value from the netsnmp_vardata union, i am having val.bitstring as 64. This is in what format, how i can covert to the received data to actual data? when i am sending request as "snmpset -v2c -c private 10.201.114.135 myOid.1.1 b 11", i am not having any value in val.bitstring ( containing null as value ). Do i have to access other member in this union or I have to do some convertion on received data?
Regards,
Kanda
Title: Handling BITS data type in mib2c code.
- Handling BITS data type in mib2c code. kanda.samy
- Re: Handling BITS data type in mib2c code. Wes Hardaker
