How to implement C++ API for agent MIB implementation?

"Makavy, Erez (Erez)" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <AAB4B3D3CF0F454F98272CBE187FDE2F09C37A7F@is0004avexu1.global.avaya.com>
Hey,
 
I'd like a simple C++ API for implementing MIBs.
Basically I'd like the new API to allow an object to implement a leaf, 
meaning that the object should register for handling a certain leaf, and
it would have some predefined handle() method which will be called when
leaf processing is needed.
This would require some sort of special registration.
 
Possibilities I thought of:
1) find out if there is already a C++ API?
 
2) Use the OLD-API, and register a variableN array in which the
FindVarMethod would
    use the oid as a key to lookup an handler_object in a global
data-structure, 
    and invokes a "handle" method of the handle_object.

3) Use the new Net-SNMP handler mechanism to register a handler with
some cookie which will contain the object (this) pointer.

 
 
Questions:
---------------
 
A) Is there a C++ API for this? ( I guess not...not yet)
 
B) since possibility number 1 is a bit awkward, I'll refer to the 2nd
possibility:
    1) How do I register a handler with a cookie?
 
C) Any better Ideas?
 
thanks,
Erez.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.