tags:

views:

95

answers:

0

I am writing an interface code using WINSNMP for SNMP manager application . The manager application expects traps in v1 format ( serialised - as it is received from wire). My interface code (using WINSNMP) receives the traps in v2 format , However I am not able to convert those traps to SNMP v1 trap format. I have set the translate mode as SNMPAPI_UNTRANSLATED_V1 and using SnmpEncodeMsg method, I am converting the received traps(decoded) to serialised format. But the serialised message buffer returned by SnmpEncodeMsg is in SNMP v2 format only. I have read somewhere that " If the dstEntity of an SNMP_TRAP_PDU submitted to SnmpSendMessage() or SnmpEncodeMsg() is a v1 entity, then the WinSNMP implementation must "downgrade" (translate) the trap into an SNMP_PDU_V1TRAP during assembly of the corresponding SNMP message". But this is not happening with my code . Basically i want to receive the trap in v1 format as it is sent by the agent . Please provide your suggestions if you have any input on this issue.