|
From: Chris J. <cj...@cy...> - 2003-08-06 02:52:22
|
Hello,
I have version 5.0.8 running as a agent with a custom MIB. The MIB has a BITS object
defined similar to:
myStatus OBJECT-TYPE
SYNTAX BITS {
inTest (0),
outTest (1),
oneAlarm (2),
twoAlarm (3),
loopback (4),
inFail (5),
outFail (6),
shutdown (7)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The latched status of the device."
::= { status 1 }
The code uses 'ASN_BIT_STR' to encode the variable. I can see the MIB element with:
$ snmpget -c enterprise 10.10.10.133 myStatus.0
MY-MIB::myStatus.0 = BITS: 00
A commercial SNMP management product is having trouble viewing the MIB element. The
feedback from the support person is (and quoting):
"BITS is a mib construct that maps onto an OCTET STRING data type in
the SNMP PDU.
BIT STRING is not a mib construct. It is an actual data type that has
the same size as an INTEGER, but the SNMP PDU actually carries this as a
special type."
We were also told this is in the RFCs but I cannot find any reference to 'BIT STRING'
only BITS. Also I can only find 'ASN_BIT_STR' to encode the variable.
I would like to know if more than one way exists to encode BITS and if so where I can
find the specific RFCs.
Regards
--
Chris Johns, cjohns at cybertec . com . au
|