How to use snmp_add_var API for bitstring and octet string
Xiangyang Shen <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Organization | Lucent Technologies |
| Message-ID | <[email protected]> |
Hi All, I don't know how to use NetSnmp API snmp_add_var(...) for bitstring in order to send SET request. Using the example I found from the user-list, if I would like to set the bit #7 in following bit string where bits v0, v3, and v10 are set: bits=00000100 00001001 The new bits after set should be new_bits=00000100 10001001 If I understood RFC3416, the encoding of the new_bits should be like 10010001 00100000 I guess I should use type='b' but I don't know what's the way I should set char* value for the bitstring when invoking snmp_add_var() API. I thought to translate the new_bits to octets that would be 0x91 and 0x20. I could use type='x' but again I'm not sure what's the way I should set the char* value for those two octets. I would very appreciate your help on both cases: how to use snmp_add_var for octet string and bitstring. Thanks for your help in advance, Xiangyang ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ 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