|
|
#include <snmp/snmp.h> void free_varbind_list(struct type_SNMP_VarBindList vbl_ptr);void link_varbind(PDU pdu_ptr, VarBindList vbl_ptr);
VarBindList make_varbind(OID oid_ptr, short type, unsigned long ul_value, long sl_value, OctetString os_value, OID oid_value);
#include <snmp/snmp.h> #include <snmp/snmpuser.h>
void print_varbind_list(VarBind vbl_ptr);
link_varbind completes a PDU (created by a call to make_pdu(3snmp)) by adding the VarBindList entry created by a call to make_varbind). link_varbind should be called exactly once for each vbl_ptr being associated with a PDU, as this association is used to reclaim memory when the PDU is freed.
make_varbind is called to create a VarBindList entry to be chained onto a PDU. It returns a pointer to a malloc'ed data structure of type VarBind. Usually, this pointer is then used in a call to link_varbind to associate this VarBindList with a PDU. The structure is freed when the PDU is freed with a call to free_pdu.
A VarBindList is a variable-value binding. It binds the name, the type, and the value of a variable into one construct. The current list of SNMP types and the value type associated with each is:
print_varbind_list(pdu_ptr->var_bind_list)