On 15 April 2010 09:34, phani kumar <kumarc...@yahoo.co.uk> wrote: > Thanks for quick response and as you said lets assume the index looks like > > { index1, IMPLIED index2 } > > and lets simplify the index from two to one
Which? Are you asking about a two-string indexed table, or a single-string indexed table? > and lets say this looks like > > index c1 rowstatus > ---------------------- > ab 1 > hi 2 > cd 3 > ef 4 > bc 5 In that case, the table **as reported via SNMP** should be walked in the order c1."ab" = 1 c1."bc" = 5 c1."cd" = 3 c1."ef" = 4 c1."hi" = 2 rowstatus."ab" = ... rowstatus."bc" = ... rowstatus."cd" = ... rowstatus."ef" = ... rowstatus."hi" = ... > In the above scenario, the index is not according to lexicographical > (am i correct?) order and this is because its is not sorted(lets assume). I presume this is how the data is represented internally? (Either within the agent, or in the underlying subsystem). In which case, one of the tasks of the MIB implementation module is to present the data in lexicographical order, as above. That's precisely the purpose of the 'iterator' helper. > So, how does the getnext works here? > How is the next lexicographically index found? Is this like this > > ab then bc then cd then ef and hi Correct. Note that this works "as expected" because all the strings are the same length. If some of the index strings were longer than others, then the order depends on whether the table is IMPLIED or not. An IMPLIED index would continue to work in dictionary order. A non-IMPLIED index would sort by length first. So short index strings would come before longer ones. OK? Dave > Could you pl also answer ip address being index from my earlier post Patience - I'll get onto that once I'm happy that you're confident with the stuff above! ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users