- 32-bit integers are defined as long int or unsigned
long int. We assume that a long int is 4 bytes.
- 64-bit integers are represented as an snmp_dpi_u64.
We only deal with unsigned 64 bit integers in SNMP. In a structure that
has two fields, the high order piece and the low order piece, each is of
type unsigned long int. We assume these are 4-bytes.
- Object Identifiers are NULL terminated strings in
the selected character set, representing the OID in ASN.1 dotted notation.
The length includes the terminating NULL.
An ASCII example:
'312e332e362e312e322e312e312e312e3000'h
represents "1.3.6.1.2.1.1.1.0" which is sysDescr.0.
An EBCDIC example:
'f14bf34bf64bf14bf24bf14bf14bf14bf000'h
represents "1.3.6.1.2.1.1.1.0" which is sysDescr.0.
- DisplayStrings are in the selected character set.
The length specifies the length of the string.
An ASCII example:
'6162630d0a'h
represents "abc\r\n", no NULL.
An EBCDIC example:
'8182830d25'h
represents "abc\r\n", no NULL.
- IpAddress, NsapAddress, and Opaque are implicit OCTET_STRING,
so they are a sequence of octets/bytes. This means, for instance, that
the IP address is in network byte order.
- NULL has a zero length for the value, no value data,
so a NULL pointer in the value_p field.
- noSuchObject, noSuchInstance, and endOfMibView are
implicit NULL and represented as such.
- BIT_STRING is an OCTET_STRING of the form uubbbb...bb,
where the first octet (uu) is 0x00-0x07 and indicates the number of unused
bits in the last octet (bb). The bb octets represent the bit string itself,
where bit zero (0) comes first and so on.