On Thu, 2005-08-25 at 00:07 +0200, Anthony Novatsis wrote:
> I am not sure what initalisation code that you are referring to?

The code where you first register the table, and set up the
cache handler.  I'd expect this to look something like:


    init_myTable() {
        reg   = netsnmp_create_handler_registration(...);
        table = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info);
        iinfo = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info);
        iinfo->table_reginfo = table;

        netsnmp_register_table_iterator( reg, iinfo );


        netsnmp_cache *cache = netsnmp_cache_create( ... );
        netsnmp_inject_handler_somewhere( reg,
                        netsnmp_cache_handler_get( cache ));
    }


(not quite accurate, but you get the idea).

So:
> > However, there is a 'myvoid' pointer in the iterator info structure,
> > which doesn't appear to be used anywhere.  So you could set this
> > to hold the cache structure as part of the initialisation code,

would mean adding the line:

         iinfo->myvoid = (void*)cache;

into the above routine.

This is untested, but I don't see why it shouldn't work.


Dave


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to