>>The 'snmp_set_var_value' call takes a *pointer* to the value being
set. Try:
>> snmp_set_var_value( vptr, (u_char*)&this_index,
>> sizeof(this_index));
>>You need to pass the address of 'this_index'.
>>Dave
Thanks, that worked (opps I missed the & on the &this_index.
The walk now returns the first row for each colume in the table, but not
the other rows.
Appears to work like this
getFirstDataPoint
getNextDataPoint
ContentTable_handler
collects data for first column, first row
getFirstDataPoint
getNextDataPoint
ContentTable_handler
collects data for second column, first row
getFirstDataPoint
getNextDataPoint
ContentTable_handler
collects data for third column, first row
Should the flow look more like this (assuming multiple (2) rows for each
column)?
get_first_data_point
get_next_data_point
get_next_data_point
ContentTable_handler
collects data for first column, first row
collects data for first column, second row
get_first_data_point
get_next_data_point
get_next_data_point
ContentTable_handler
collects data for second column, first row
collects data for second column, second row
get_first_data_point
get_next_data_point
get_next_data_point
ContentTable_handler
collects data for third column, first row
collects data for third column, second row
If this flow is correct, then this would mean that in the
ContentTable_handler, the
"netsnmp_request_info *requests" variable passed to ContentTable_handler
would have
requests for each row in the column. The loop :
for (request = requests; request; request = request->next) {
would collect the data for a row and place it in the request
If this is correct, than does this mean that the getNextDataPoint is
where the
data structure is built up to allow the correct generation of the
requests structure for
the ContentTable_handler?
If this is true, then I would expect the "netsnmp_variable_list *
put_index_data"
structure that is passed to getNextDataPoint would check the row data in
the passed in
put_index_data, determine whether there was a valid next row, then if
there is a valid next
row add it to the put_index_data.
In this case, what methods are used to add the additional row data to
put_index_data?
Is it "snmp_varlist_add_variable"?
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders