On Thu, 2005-10-27 at 22:54 -0400, Haizhu Liu wrote: > When you say "preliminary request to retrieve" the number of rows in > the table, does that mean the agent has to provide that information,
I actually said: > > That assumes you know in advance how many rows there will > > be - which may involve a preliminary request to retrieve this > > information. In order to slurp the whole table in one go, you need to know how many rows there are. It doesn't matter *how* you find this out. A preliminary request for some row-counter value is one possible approach. The size of a particular table may actually be constant. Or it may be guessable from some other information. > if it is not defined by the agent, that means this approach > is not doable, right? If you don't know the size of the table, then you can't really slurp the whole thing in one go, no. In that situation, there probably isn't an alternative to walking the table - or at least walking one column of the table. If you walk one column (either step-by-step, or using GETBULK), then you could extract the index values, and construct one final GET request for all the remaining columns in every row. Processing a GET request is typically simpler (and quicker) than processing a GETNEXT request. You'd have to do some tests to see whether this compensates for the extra traffic overheads. > By the way, I am using snmp_synch_response for BULKGET request, is there > something like snmp_asynch_response that I don't need to wait on it? Sort-of. There isn't a single-routine approach "snmp_asynch_response", since the whole point of "snmp_synch_response" is that it handles everything before returning with the results. That's inherently not possible with an asynchronous request. But there is a routine "snmp_async_send()" (note - no 'h') which can be used to trigger a callback routine when the response arrives. Have a look at the tutorial section of the project web pages. This includes both synchronous and asynch versions of a simple SNMP client. Dave ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
