On 27/02/2008, Ajit J Clarence wrote:
> a) Is there any way, we could associate a C program as a trap handler

The "traphandle" directive simply invokes a program to process the trap.
It doesn't care whether that program is written in perl, C, Java, Pascal,
Basic, Ada, Lisp, Modula-2, Forth, Logo, or something that you've
invented yourself.
As long as it accepts the trap information in the format specified,
you can code it however you like.

> b) Is it possible to associate trap handlers using some piece of code
> (in snmptrapd daemon) rather than changing the snmptrapd.conf file

Yes - this is possible.
See 'apps/snmptrapd_handlers.c' for examples of the internal trap handler

Unfortunately there isn't any support for cleanly linking in separate
C code files (equivalent to the --with-mib-modules mechanism for the
agent). So you'll have to add your handler to the snmptrapd code
yourself, and recompile.
But it's certainly possible.


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: