On 26 July 2010 10:17,  <[email protected]> wrote:
> the following two commands are showing nothing to me
>
> c:\usr\bin\snmptrap -v 2c -c public host "" 
> UCD-NOTIFICATION-TEST-MIB::demoNotif \
>       SNMPv2-MIB::sysLocation.0 s "Just here"

That's sending to 'host' rather than 'localhost'


> c:\usr\bin\snmptrap -v 1 -c public localhost TRAP-TEST-MIB::demotraps 
> localhost 2 0 "" \
>       IF-MIB::ifIndex i 1

But that command should work, I think


> Kinldy tell me how to configure snmptrapd to receive traps?

The snmptrapd.conf file you posted should accept (and log) both of these traps.
How are you starting the snmptrapd receiver?

   Have you looked in the log file that it uses?

Note that the first command wouldn't attempt to call your trap handler,
as this is only registered for coldStart, warmStart, linkUp and linkDown.
It's not registered for demoNotif.

The second command is a linkDown trap, so ought to trigger your
handler.   But I'd suggest you get things working with simple logging
first, and only then move on to trap handlers.



> and would you provide information on how to write traphandlers in c?

There's no real documentation on this.
The best advice would be to look at the code in snmptrapd_handlers.c
There are several examples in there.

Dave

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to