Skip to main content

8.1. Usage Example

8.1. Usage Example

For example, consider the encoding of a GetRequest-PDU:

GetRequest-PDU ::= SEQUENCE {
request-id Integer32,
error-status INTEGER,
error-index INTEGER,
variable-bindings VarBindList
}

Assuming the following values:

  • request-id = 608172092 (hexadecimal 0x24410F3C)
  • error-status = 0
  • error-index = 0
  • variable-bindings = a list containing one VarBind for sysUpTime.0 with an unspecified value

The encoding would appear as follows (in hexadecimal):

30 26           ; SEQUENCE, 38 octets
02 04 24 41 0F 3C ; INTEGER request-id
02 01 00 ; INTEGER error-status
02 01 00 ; INTEGER error-index
30 18 ; SEQUENCE variable-bindings, 24 octets
30 16 ; SEQUENCE VarBind, 22 octets
06 08 2B 06 01 02 01 01 03 00 ; OBJECT IDENTIFIER 1.3.6.1.2.1.1.3.0
05 00 ; NULL (unspecified value)

This encoding is then placed in an SNMP message and transmitted using the appropriate transport mapping.