SNMP Manager Programmer's Guide
Constructing and Interpreting Packets
SNMP Manager Programmer’s Guide–134249
5-10
Interpreting Received Packets
Interpreting Received Packets
Table 5-5 summarizes the fields in SNMP_PKT_T to use when parsing response and
trap packets.
syntax Manager
Services
For request and trap packets,
Manager Services determines
the data type of the variable
binding from the SNMP_Bind_
call you use.
For response packets and trap
packets assembled elsewhere,
Manager Services determines
the data type from the way the
value is encoded.
The values 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
For requests and
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
Table 5-5. Using SNMP_PKT_T to Interpret Received Packets (page 1 of 2)
Retrieve This Packet
Information From This Field in SNMP_PKT_T
version snmp_version
community community
Table 5-4. Assigning Variable Bindings (page 3 of 3)
Data Item
Assigned
Value By Value Description SNMP_PKT_T Field