logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: netsnmp_register_table_data_set + TableHandler??: msg#00313

Subject: Re: netsnmp_register_table_data_set + TableHandler??
        [Sorry for the delayed response]


> Hello guys. I need to use a table handler in 
> netsnmp_register_table_data_set().

> int myTable_handler(....)
> {
>     switch (reqinfo->mode) {
> 
>     case MODE_GET:
> /*
> how can I get the selected row's data here??
> */

    netsnmp_table_data_set_storage *data =
        netsnmp_extract_table_data_set_column(requests, WHICH_COLUMN);


Remember that this handler may well receive multiple varbind
requests within a single call, so this code really ought to be
wrapped within a
        for (request=requests; request; request=request->next)

loop, and everything works with 'request' instead.

 
> I've read the API documentation but I didn't manage to get the row's 
> data, in order to set it with different values.

If you're using the dataset handler, you don't need to do anything
for most SET requests.   This handler keeps the MIB values internally,
and will update them automatically in response to SET requests.
  It's only when changing one object will affect the value of another
column that you need to take any special handling.

Dave




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


<Prev in Thread] Current Thread [Next in Thread>