Re: SNMP trap handling
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2009/1/15 jayesh km <[email protected]>: > Can some one please point me how can I get > sarted with this? How to get an application call back when a trap is > received and how to match OID to actual name and extract variables from trap > PDU The simplest approach is probably to start with snmptrapd, and then write your own trap handler, using something like 'print_handler' (in snmptrapd_handlers.c) as a template. Then tweak the main routine (in snmptrapd.c) to add a call to 'netsnmp_add_global_traphandler', specifying your new handler. That will then invoke your code whenever a trap is received, passing it the decoded trap PDU. Dave ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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