On 3 August 2010 10:14, Julian Cebulla <cebu...@ferrari-electronic.de> wrote:

> Here the code of init_mib_physicalInterfacesTable():


> void initialize_table_physicalInterfacesTable(void)
> {
      [snip]
>    retval=netsnmp_register_table_data_set(netsnmp_create_handler_registration
>                                    ("physicalInterfacesTable",
>                                     physicalInterfacesTable_handler,
>                                     physicalInterfacesTable_oid,
>                                     physicalInterfacesTable_oid_len,
>                                     HANDLER_CAN_RWRITE),
>                                    physicalInterfacesTable_table_set,
>                                    NULL);

OK - so you are using the 'table_data_set' helper.
That's useful information.

This particular helper is designed for holding the data for the table within
the agent itself.    So the agent knows what rows exist in the table,
and can provide the relevant values itself.   Your handler is optional,
and will only be called once the helper has finished processing the request.

So this helper relies on you populating the table with initial contents.
See 'examples/data_set.c'  and  'testhandler.c'   (both in agent/mibgroup)
for examples.


>From the code you've provided, you don't seem to be populating the table
with anything.   So when the agent received a request for this (empty) table,
it returns the information that it has (i.e. nothing).


So no - your handler will never be called.
You need to populate the table (or use a different framework)

Dave

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to