Re: Trap handling

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Thu, 2005-11-10 at 10:33 +0530, [email protected] wrote:

> We have a requirement to support trap handling in our project. 
> Requirement is whenever a trap is received a function should be called
> which extracts the community string and performs some operation. 

> How can the same functionality be achieved using net-snmp

Have a look at 'snmptrapd' - in particular the routines
   netsnmp_add_traphandler()  and
   netsnmp_add_global_traphandler()


These can be used to invoke a specified routine when
either a particular trap arrives (1st form), or *any*
trap arrives (2nd form)

 
> I read about snmptrapd and snmptrapd.conf

Unfortunately, snmptrapd.conf won't help you here.
That can be used to configure various "standard" trap
handler routines, but not to add new ones.  If you
need to add this extra functionality, you're going
to have to start tweaking the snmptrapd code itself.


Have a look at some of the existing trap handlers
(in 'snmptrapd_handler.c'), and how they are registered
(in 'snmptrapd.c').

Any questions, just ask on the list.

Dave
> 


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.