Hello all,
I’ve just started using Snmp++ and Agent++ and have a couple of questions.
There doesn’t seem to be any mention of the lifetime/ownership of the objects in this library. In the example programs, I see lots of “new MibTable”, “new OctetStr”, etc. But I don’t see any deletes. Does the library handle the destruction of everything. For example, if I create a MibTable and add several OctetStr objects to it, when I delete the table, do all the OctetStr objects get deleted too? Otherwise, I would expect lots of memory leaks.
Are there any tutorial-style documents as an introduction to the library? I can see the example programs, but was wondering if there was anything more descriptive of the various classes etc. I realise that I’ve got this software for free, so I can’t expect too much. But it would be great if there was a bit of a description of each class and its purpose.
Finally, I want my program to act as an SNMP agent but don’t want the main program to block. All of the example programs loop forever at the bottom of main(). I want that loop to run in a sub-thread so my main() can go on and do other things. Is it just a matter of moving that while loop to the thread. Are there any synchronisation precautions that I need to take?
Thanks very much for this great software and for any answers to these questions.
Regards,
Graham