python-netsnmpagent icon indicating copy to clipboard operation
python-netsnmpagent copied to clipboard

Add support for BITS construct

Open j123b567 opened this issue 4 years ago • 0 comments

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.

j123b567 avatar Sep 09 '20 14:09 j123b567