Re: non contiguous column index
Renaud Barbier <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
I must be doing something incorreclty.Based on an example I found in the
mailing list
I have tried the following:
#if 0
table_info->min_column = 1;
table_info->max_column = 13;
#else
col_info = SNMP_MALLOC_TYPEDEF(netsnmp_column_info);
col_info->isRange = 1;
col_info->details.range[0] = 1;
col_info->details.range[1] = 4;
col_info->next = SNMP_MALLOC_TYPEDEF(netsnmp_column_info);
col_info->isRange = 1;
col_info->details.range[0] = 6;
col_info->details.range[1] = 8;
col_info->next = SNMP_MALLOC_TYPEDEF(netsnmp_column_info);
col_info->isRange = 1;
col_info->details.range[0] = 11;
col_info->details.range[1] = 13;
col_info->next = NULL;
table_info->valid_columns = col_info;
#endif
Now in the table handler the column number is set to -1;
table_info->number_indexes is set to 0 while
table_info->reg_info->number_indexes is set to 1
and table_info->reg_info->valid_columns is NULL.
Is there a missing function call in my table registration?
Dave Shield wrote:
> On 30/01/07, Renaud Barbier <[email protected]> wrote:
>> Here is the initialization code from one of the table in XXX_tables.c
>> as generated by mib2c.
>
>> /** Define the minimum and maximum accessible columns. This
>> optimizes retrival. */
>> table_info->min_column = 1;
>> table_info->max_column = 13;
>
>
> OK - that's where you need to concentrate.
> This is saying that all columns from 1-13 are valid,
> which isn't true in your case.
>
> In order to handle non-contiguous columns sensibly, you should
> replace this with a suitably structured column specification.
> The field 'table_info->valid_columns' is a linked list of
> 'netsnmp_column_info' structures - use that to define which
> columns are valid or not.
>
> Dave
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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