Re: Obtain the number of instances in a table
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAKoMtGYkVmQNqYsKiGEhwy5GQnkJVNdGFU1uaJtdNJdJfECCLA@mail.gmail.com> |
On 20 March 2012 14:26, Francois Bouchard <[email protected]> wrote: > How to obtain the number of row composing a table ? > > I've tried (fromo the handler) : > table_info = netsnmp_extract_table_info( request); > len = table_info->number_indexes; > > ...but len is always equal to 1, Yes - that's correct. Assuming that the table is indexed by a single integer, then there will be one index value. So the number of indexes is indeed 1. > not the actual existing row instances. The *value* of that index is given via the 'indexes' field. Try something like long idx = *(table_info->indexes->val.integer); Dave ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ 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