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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|