winsnmp

SNMP trap not recognized by Manager

爷,独闯天下 提交于 2019-12-24 12:13:58
问题 I'm attempting to create a sample application utilizing Microsoft's WinSNMP library to create an example of a trap. See the code sample below: //Send a trap; LPSTR strSrcAddr = "10.12.0.21"; LPSTR strDstAddr = "10.2.255.8"; UINT32 nDstPort = 462; smiINT snmpPduType = SNMP_PDU_TRAP; HSNMP_VBL snmpVarBindList = SnmpCreateVbl(snmpSession, NULL, NULL); assert(snmpVarBindList != SNMPAPI_FAILURE); //Copy the src address to src entity; HSNMP_ENTITY snmpSrcEntity = SnmpStrToEntity(snmpSession,