how to register a callback for receiving traps??

This is a discussion on how to register a callback for receiving traps?? within the SNMP Coders forums, part of the Networking and Network Related category; Hi All I need help to understand the callback mechanism for receiving traps. As per the wiki tutorial in asynchronous ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-29-2007
shyam
 
Posts: n/a
Default how to register a callback for receiving traps??

Hi All

I need help to understand the callback mechanism for receiving traps.

As per the wiki tutorial in asynchronous application, the
netsnmp_session structure itself has a variable for storing the
callback function name which is called every time a message is
received.

However, when I receive a trap, it maynot be bound to a session so I
need a global handler to process all the incoming traps.

I scrolled through the snmptrapd code and figured out
netsnmp_add_global_traphandler( ) which is used to register a
callback . Is this the way to go ? THis function is a part of the
snmptrap application and not the library itself, so I am not sure.

Can somebody please advice as to how do I capture a trap pdu once i
receive it via snmp_read

thanks
in advance
Shyam

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:40 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0