SNMP Manager Programmer's Guide
Constructing and Interpreting Packets
SNMP Manager Programmer’s Guide–134249
5-11
Interpreting Received Packets
PDU type
2 (Response PDU)
4 (Trap PDU)
pdu_type
For responses:
request-id
error-status
error-index
For traps:
enterprise
address
generic-trap
specific-trap
time-stamp
pdu.std_pdu.request_id
pdu.std_pdu.error_status
pdu.std_pdu.error_index
pdu.trap_pdu.enterprise_objid.component-list
pdu.trap_pdu.net_address
pdu.trap_pdu.generic_trap
pdu.trap_pdu.specific_trap
pdu.trap_pdu.trap_time_ticks
Number of variable
bindings
For responses: pdu.std_pdu.std_vbl.vbl_count
For traps: pdu.trap_pdu.trap_vbl.vbl_count
Instance identifiers of
variable bindings
For responses: pdu.std_pdu.std_vbl.vblist.vb_obj_id
For traps: pdu.trap_pdu.trap_vbl.vblist.vb_obj_id
Values of variable
bindings
For responses: pdu.std_pdu.std_vbl.vblist.value_u.field
For traps: pdu.trap_pdu.trap_vbl.vblist.value_u.field
where field depends on the data type of the variable binding:
For signed integer (INTEGER) values: v_number
For unsigned integer (Counter, Gauge, Timeticks, or
UNINTEGER32) values: v_counter
For octet string (OCTET_STRING, Opaque, or DisplayString)
values: v_string
For OIDs (OBJECT_IDENTIFIER) values: v_object
For network address (IpAddress) values: v_network_address
Syntax of variable
bindings
For responses: pdu.std_pdu.std_vbl.vblist.vb_data_flags_n_type
For traps: pdu.trap_pdu.trap_vbl.vblist.vb_data_flags_n_type
Values that can appear in this field are:
For signed integers: VT_NUMBER
For unsigned integers: VT_COUNTER, VT_GAUGE,
VT_TIMETICKS, or VT_UINTEGER32
For octet strings: VT_STRING, VT_NSAPADDRESS, or
VT_OPAQUE
For OIDs, VT_OBJECT
For network addresses: VT_IPADDRESS
For null values: VT_EMPTY
Table 5-5. Using SNMP_PKT_T to Interpret Received Packets (page 2 of 2)
Retrieve This Packet
Information From This Field in SNMP_PKT_T