About two years ago I modified some net-snmp code for my Project and am now finally able to post this patch. I have another patch that depends on this one that I will post next. Comments are appreciated. Actual patch is submitted to sourceforge tracker->patches.
Patch is for clean-cvs-V5-2-patches branch (2/21/2005) Tested on Linux: Redhat ES3 This patch allows the user to register for activity on external (non-SNMP) file descriptors and have callbacks called in snmpd and snmptrapd applications. This function previously existed for snmpd, but was coded right in snmpd.c and agent_registry.c. This change, moves these changes to a new unit called fd_event_manager.c which can then be used in other places (snmptrapd). An example of what can now be easily done is creating a new publisher or client/server in snmpd or snmptrapd will be easy. All you do, is open the socket and register for activity using the register_xfd() functions. Now when activity is received, the callback is called. Again, this type of thing could be done in snmpd already with these same functions, but this patch allows it to be done in snmptrapd using the same code and also reduces redundant code. This patch is setup for a second patch which allows SNMP traps to be published to an arbitrary application over TCP/IP. The most obvious use is to allow a management application to receive SNMP traps to process quickly and efficiently. The ability to register for SNMP traps exists if you want to use perl or shell scripts, but this allows easy/efficient integration with C/C++ management applications. Sten ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
