Hi All
I would like to thank
Andriy K. who has been very generous and updated the SNMP stack to include SNMP V1/2 (
with all operations, tables support [without row adding/deleting]).
- The new version has been very well tested and used it in production environment.
- It uses code from bsnmp package distributed under BSD license and license for this code is also BSD.
Andriy's new module will be included in subsequent uTasker releases. In the meantime please send me an email if you would like to try/use this. Below are some details from Andriy concerning its use. Although the module is not fully supported, Andriy is also willing to answer questions so please use this thread in case of questions or difficulties.
How to use it:
- unpack to directory somewhere in your project, add to project and start by calling fnSNMPStart(); (don't forget to increase number of UDP sockets by 1, or by 2 if you want to use traps).
- SNMP stack itself doesn't need task, but traps need task which is defined in trap.c, you must also add it to TaskConfig.h:
#define TASK_TRAP 'r' // tRap sending tas;
...
{ "r", fnTrapTask, SMALL_QUEUE, (DELAY_LIMIT)(1 * SEC), 0, UTASKER_STOP}, // SNMP trap sending task
...
All supported OIDs are defined in big table in oids.h file. They MUST be keep sorted in order walk operation to work. For each OID you just define function which will handle get/set operations. I've included few function as example.
I've tried to separate the code as much as possible from the entire application, however it may complain on some defines. Fixing of this should be simple, and I can always help.
Regards
Mark