Re: Regarding string as index for tables
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 15 April 2010 09:08, phani kumar <[email protected]> wrote: > I am trying to implement a table having two index values both being strings. > Could any one tell me how the getnext works It depends on exactly how the table is defined. What is the INDEX clause from the MIB file? > Lets say the row one indexed by mike and hello > Row 2 by amfi and chris Each string will be turning into a sequence of individual ASCII characters. So the index for row 1 will probably be 4.'m'.'i'.'k'.'e'.5.'h'.'e'.'l'.'l'.'o' and for row 2 4.'a'.'m'.'f'.'i'.5.'c'.'h'.'r'.'i'.'s' Note that each string is preceded by its length. If the INDEX clause looks like { index1, IMPLIED index2 } then you should omit the second length value (i.e. 4.'m'.'i'.'k'.'e'.'h'.'e'.'l'.'l'.'o') But this *only* holds for the final index value. All others will include the length subidentifier. (That's not strictly true in the case of fixed-length strings, but my guess is that this isn't relevant here) OK? Dave ------------------------------------------------------------------------------ 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 [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users