I generated code with:
 mib2c -c mib2c.iterate_access.conf IBRIX-MIB::ibrixMibs.1 

My MIB has a table (read only) with 3 columns.  The table index (called
fsName) is a DisplayString.

I changed the code so I can do snmp-get, but snmp-get-next is not working.
This is the generated code and I changed the code where XXX is.  See my
comments.  But when I run it I get into infinite loop.

 netsnmp_variable_list *
fileSystemTable_get_next_data_point(void **my_loop_context,
                                    void **my_data_context,
                                    netsnmp_variable_list * put_index_data,
                                    netsnmp_iterator_info *mydata)
{

    netsnmp_variable_list *vptr;

    *my_loop_context = myLoopCtx /** XXX */ ;
    *my_data_context = myDataCtx /** XXX */ ;

    vptr = put_index_data;
    //Alex: find the next name of put_index_data->val.string and 
    // save it nextInst.  Return NULL if no nextInst
    snmp_set_var_value(vptr, (u_char *) nextInst/** XXX: name data */ ,
                       strlen(nextInst) /** XXX: length of name data */ );

    // Alex: save table index in myLoopCtx, so it can be used in a get
function
    vptr = vptr->next_variable;  // ??? what is this for?

    return put_index_data;
}

This is all I do.  Unless the function returns NULL this function is called
forever.  If I return NULL I get a call to get but for the next column in a
table and not for next instance in the same column.

Help!

Thanks!!!

Alex.



-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to