#include <snmpntfy.h>
int snmpBuildPDU(SnmpPDU **pdu, const SnmpSession *snmpSession ,
const int pduType, const SnmpVarBinds *varbinds,
smiUINT32 *req_id)
Rules: - The snmpBuildSession() and snmpCreateVarBinds() functions must
have been successfully called before calling this function, because
the output from the snmpBuildSession() and snmpCreateVarBinds() functions
is required as input for this function. After you are finished using
the SnmpPDU structure created by this function, you must free the
storage allocated by calling the snmpFreePDU() function.
- SNMPv2 traps and informs require the following two VarBind structures
in the VarBind array:
Your SNMP manager must call the snmpCreateVarBinds() and snmpAddVarBind()
functions to create these VarBind structures, in this order, before
calling this function