2009/8/24 niepa inter <[email protected]>:
> /* enable row creation */
> table_set->allow_creation = 1;
> netsnmp_table_set_multi_add_default_row(table_set,
> COLUMN_PRTCONSOLEDISPLAYBUFFERINDEX, ASN_INTEGER, 0,
> pkt->index, sizeof(pkt->index),
> COLUMN_PRTCONSOLEDISPLAYBUFFERTEXT, ASN_OCTET_STR, 1,
> pkt->consolebuf,
> strlen(consolebuf),
> 0);
Those two statements mean that you can create new rows in the table,
using an SNMP SET command, and it will provide a default value for
these two objects.
Though since prtConsoleDisplayBufferIndex is one of the indexes of
the table, you would presumably be running SET command on the
prtConsoleDisplayBufferText object anyway, so these default values
are somewhat redundant.
>> What rows should it contain?
> My hope is that the row at COLUMN_PRTCONSOLEDISPLAYBUFFERTEXT,
That indicates the column, not the row.
If you are creating a new row, then you need to specify the index
values for that row. The agent can't make these indexes up
automatically - you need to tell it what to do.
> However if I create an additional row(COLUMN_PRTCONSOLEDISPLAYBUFFERTEXT.1)
> and load some data into it ,it works.
Yes - that's how this is meant to work.
Although judging by your code, there ought to be two index values,
not just one.
> But I do not want to add another row,
> I would like to be able to initialize COLUMN_PRTCONSOLEDISPLAYBUFFERTEXT.
That's not how SNMP tables work. You *always* have to specify the
index values.
That's the whole point of a table!
Management values are associated with an _instance_ of a column object (i.e.
a particular row of the table), not with the column as a whole.
Dave
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
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