python-netsnmpagent
python-netsnmpagent copied to clipboard
Add support for BITS construct
Add BITS construct defined in RFC 2578 - 7.1.4
From agent code, this type can be used as integer and bits can be set and reset by simple math.
Reason for this special data type is that BITS are little bit tricky. Bits are reversed in memory and their bytes are in little-endian order.
So e.g. if the octet string has value (in hexadecimal) 80
, this means, that bit(0) is set. Value 00 01
means, that bit(15) is set.