SNMP Manager Programmer's Guide

Using Header Files, Data Structures, and Defines
SNMP Manager Programmer’s Guide134249
4-7
Unencoded-Packet Structure (SNMP_PKT_T)
vb_obj_id
is the OID of the variable binding.
vb_data_flags_n_type
describes the class form and data type of the variable binding. The
following Manager Services defines describe values for this field:
#define VT_NUMBER A_INTEGER
#define VT_STRING A_OCTETSTRING
#define VT_OBJECT A_OBJECTID
#define VT_EMPTY A_NULL
#define VT_IPADDRESS (A_APPLICATION | 0)
#define VT_COUNTER (A_APPLICATION | 1)
#define VT_GAUGE (A_APPLICATION | 2)
#define VT_TIMETICKS (A_APPLICATION | 3)
#define VT_OPAQUE (A_APPLICATION | 4)
#define VT_NSAPADDRESS (A_APPLICATION | 5)
#define VT_UINTEGER32 (A_APPLICATION | 7)
vb_data_length
is the number of bytes in the encoded variable binding value.
value_u
is a tagged union capable of holding values for all the data types
described in RFC 1155. The variable binding’s value is assigned to one
of the fields depending on its type:
v_number holds signed integer values.
v_counter holds unsigned integer values.
v_string holds octet string values.
v_object holds OIDs.
v_network_address[4] holds network addresses.
trap_pdu
is a structure for holding a trap PDU. This structure contains six fields:
enterprise_objid
is an OID identifying the trap originator.
net_address[4]
is the IP address of the trap originator.