z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


snmpBuildV2TrapOrInformPDU – Builds an SNMP V2 trap or inform PDU

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

#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:
    • sysUpTime
    • snmpTrapOid
    Your SNMP manager must call the snmpCreateVarBinds() and snmpAddVarBind() functions to create these VarBind structures, in this order, before calling this function

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014