Hi,
Need small info on SNMPSET for the objects whose syntax is BITS.
example:
lets take one object xyz
whose syntax is BITS {
sunday(0),
manday(1),
tuesday(2),
wednesday(3)
}
i want to set sunday(0).
i tried like this,
snmpset -c private -v 2c 172.16.8.60:161 .1.3.6.1.4.1.3.4.0 b _(value)
01/"01"/0001
object id of xyz is = _.1.3.6.1.4.1.3.4.0
in the above set command the manager is encoding to some value which is
not predicted.
my questions is what value i need to give if i want to set
1. sunday
2. sunday, monday
3. sunday, monday,wednesday.
when i tried to the manager is behaving like this.
i want to set 1st bit 00000001 = 01
snmpset -c private -v 2c 172.16.8.60:161 .1.3.6.1.4.1.3.4.0 b 01
---------> the manager is encoding like this 40(h) ->1000000(b)
i want to set 2nd bit 00000010 = 02
snmpset -c private -v 2c 172.16.8.60:161 .1.3.6.1.4.1.3.4.0 b 02
---------> the manager is encoding like this 20(h) ->100000(b)
i want to set 2nd and 3rd bit 00000011 = 03
snmpset -c private -v 2c 172.16.8.60:161 .1.3.6.1.4.1.3.4.0 b 03
---------> the manager is encoding like this 10(h) ->10000(b)
i want to set 3rd bit 00000100 = 04
snmpset -c private -v 2c 172.16.8.60:161 .1.3.6.1.4.1.3.4.0 b 04
---------> the manager is encoding like this 08(h) ->1000(b)
i want to set 3rd and 1st bit 00000101 = 05
snmpset -c private -v 2c 172.16.8.60:161 .1.3.6.1.4.1.3.4.0 b 05
---------> the manager is encoding like this 04(h) ->10(b)
(h) -> hexdecimal,
(b) ->binary
Thanks and Regards,
Venkatgiri.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users