Forwarding Traps and Other Alarms from OpManager Issue.

Forwarding Traps and Other Alarms from OpManager Issue.

Dear All,

Forwarding OpManager Alarms as Traps.

Our customer wants to convert the sendtrap.bat file to C program.

sendtrap.bat file.
-----------------------

snmptrap -v 1 -c public %1 .1.3.6.7.2.1.3.1 %2 1 6 10000 .1.3.6.7.2.1.3.1.1.2 s "%3,%4,%5,%6"

sendtrap.cpp file
---------------------------

#include "stdafx.h"
#include <process.h>


int _tmain(int argc, _TCHAR* argv[])
{
execlp("snmptrap.exe","-v","1","-c","public",argv[1],".1.3.6.7.2.1.3.1",argv[2],"1","6","'",".1.3.6.7.2.1.3.1.1.2","s","'",argv[3],argv[4],argv[5],argv[6],"'",0);

return 1;
}

Is it right?

Thank you in advance.

                  New to ADSelfService Plus?