SNMP Manager Programmer's Guide
Reference Summary
SNMP Manager Programmer’s Guide–134249
9-34
Releasing Packet Memory
Releasing Packet Memory
This function releases memory that was dynamically allocated by an earlier call to
SNMP_Create_Request(), SNMP_Create_Trap(), or SNMP_Decode_Packet_WER().
Interpreting Received Packets
instance-
components
A pointer to a structure of type OIDC_T that contains the
instance identifier of the variable binding.
data-type
Indicates the SNMP data type of the object being bound. Assign
one of these values:
VT_COUNTER
VT_GAUGE
VT_TIMETICKS
VT_UINTEGER32
value
An unsigned integer value to assign to the variable binding.
SNMP_Free(packet);
int SNMP_Free(SNMP_PKT_T *packet)
packet
A pointer to the packet you no longer want to retain in memory.
Retrieve This Packet
Information From This Field in SNMP_PKT_T
version snmp_version
community community
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