According to X.690, all Integers (which Counter32 is internally) must be transmitted signed. In the current implementation, a value of 33000 will be encoded as 0x80e8, which will be parsed as a signed int on the client, resulting in -32536 and failing with a ValueRangeConstraint (PySNMP) or Net-SNMP first expanding 0x80e8 to 0xffff80e8 (as it should contain 32 bits and the first bit indicates a negative value) and then parsing the value as unsigned int for no obvious reason, resulting in 4294934760.
Therefore, mini-snmpd must encode values like 33000 with a leading zero-byte: 0x0080e8.
According to X.690, all Integers (which Counter32 is internally) must be transmitted signed. In the current implementation, a value of
33000
will be encoded as0x80e8
, which will be parsed as a signed int on the client, resulting in-32536
and failing with a ValueRangeConstraint (PySNMP) or Net-SNMP first expanding0x80e8
to0xffff80e8
(as it should contain 32 bits and the first bit indicates a negative value) and then parsing the value as unsigned int for no obvious reason, resulting in4294934760
. Therefore, mini-snmpd must encode values like33000
with a leading zero-byte:0x0080e8
.