On 15 April 2010 10:32, phani kumar <kumarc...@yahoo.co.uk> wrote:
> Then walk should be like
>
> c1.ABDC
> c1.ABBEA
> c1.BCQF
> c1.DEAD
> c1.DEFC

I'd suggest that you separate the index strings, to make the division clearer
i.e.
     c1."AB"."DC"
     etc

But that's just presentational.
The order you list is correct.


>  And if second index is IMPLIED then the walk is :
>
> c1.ABBEA
> c1.ABDC
> c1.BCQF
> c1.DEAD
> c1.DEFC
>
> Am I right?

By George, I think he's got it!



> 2)You mentioned 'iterator' helper. Is this generic library helper or any 
> specific one?
> Can you provide some examples pl.?

It's one of the helpers from the 'libnetsnmpagent' library.
There are several examples of MIB implementations that use this
helper under 'agent/mibgroup'.
   It's also covered in the tutorials on the project website


> 3)If the example from my previous post is altered to
    [snip]
> In that case, the table **as reported via SNMP** should be walked in the order
>
>     c1."ab" = 1
>     c1."ag" = 1 <<<< Here goes the new one ..as 'a' in ab and 'a' in ag are 
> same then next comparision is between b and g so g comes second as per 
> lexicographis order am I right?

Yes

>     c1."bc" = 5
>     c1."cd" = 3
>     c1."ef" = 4
>     c1."hi" = 2
>     rowstatus."ab" = ...

You should also see
       rowstatus."ag" = ....
              here
>     rowstatus."bc" = ...
>     rowstatus."cd" = ...
>     rowstatus."ef" = ...
>     rowstatus."hi" = ...



> And again if this is modified to
>
> > index  c1  rowstatus
> > ----------------------
> > ab     1
> > abc       1 <<< new one and single letter
> > ag     1
     [snip]

> and assuming that the index is non-IMPLIED
> which one comes first in the walk
> c1.ab or c1.ag ? as both got 2 letters ?

If the index is non-IMPLIED, then it's sorted by length first,
then by lexicographic order.
   i.e.  ab, ag, bc, cd, ef, hi, abc

> May I assume this is going to be implementation specific

No!
SNMP is very clear about the mapping from index values
to the resulting OID - so that this is *NOT* implementation specific.
The order of a table is defined precisely - regardless of the
vendor(s) involved.
    That's what standards are all about!

Try writing these index values down using numeric subidentifiers
rather than characters
   i.e.   2.97.98      instead of    "ab"
          3.97.98.99 instead of  "abc"
          2.104.105  instead of  "hi"
   etc,
and compare the OIDs.  That should make it clear why things
come in the order that they do.



Dave

------------------------------------------------------------------------------
Download Intel&#174; 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

Reply via email to