I'm not updating loop_context. I've filled with a constant to test while querying the agent. This is my code.
get_first { netsnmp_variable_list *vptr; *my_loop_context = NULL /* XXX */; *my_data_context = NULL /* XXX */; vptr = put_index_data; snmp_set_var_value(vptr, (u_char *) "TEST"/* XXX: gpsMonitorID data */, strlen("TEST")/* XXX: length of gpsMonitorID data */); vptr = vptr->next_variable; return put_index_data; } get_next { netsnmp_variable_list *vptr; *my_loop_context = NULL /* XXX */; *my_data_context = NULL /* XXX */; vptr = put_index_data; snmp_set_var_value(vptr, (u_char *) "TEST1"/* XXX: gpsMonitorID data */, strlen("TEST1")/* XXX: length of gpsMonitorID data */); vptr = vptr->next_variable; //return put_index_data; return NULL; } When I query the table with the index TEST, the result comes to me. When I query with another index, I got this message: "No Such Instance currently exists at this OID." regards, Jordan Janeiro TelemÃdia - PUC-Rio ---------- Original Message ----------- From: Dave Shield <[EMAIL PROTECTED]> To: Jordan Janeiro Lopes da Silva <[EMAIL PROTECTED]> Cc: net-snmp-coders@lists.sourceforge.net Sent: Mon, 25 Jul 2005 15:40:50 +0100 Subject: Re: table generated by mib2c.iterate with timeout > On Mon, 2005-07-25 at 11:27 -0300, Jordan Janeiro Lopes da Silva wrote: > > Dave I'm sorry, I've forgotten to add the last part. The problem is when I > > return put_index_data, he keeps in a infinite loop. When I return NULL > > everything is "normal" and he is unable to return the rest of the data. > > Returning NULL indicates that the iteration hook has reached the end > of the table. If you do this too early, then it's not surprising if > the snmpwalk can't retrieve the whole table. > > I'll ask again - how are you updating the 'my_loop_context' pointer? > > Dave ------- End of Original Message ------- ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders