|
Values in the snmp_dpi_set_packet structure are represented
as follows: - 32-bit integers are defined as long int or unsigned long int.
A long int is assumed to be 4 bytes.
- 64-bit integers are represented as an snmp_dpi_u64.
Unsigned
64 bit integers are dealt with only 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. These are assumed to be 4 bytes.
- Object identifiers are null-terminated strings in the selected
character set, representing the OID in ASN.1 dotted-decimal 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 and Opaque are implicit OCTET_STRING, so they are a
sequence of octets or bytes. This means, for instance, that the IP
address is in network byte order.
- NULL has a 0 length for the value, no value data, so a NULL pointer
is returned in the value_p field.
- noSuchObject, noSuchInstance, and endOfMibView are implicit NULL
and are 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 0 comes first and so on.
See the following related information.
|