Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to add rows to table in c agent dynamically

10 views
Skip to first unread message

Ruth Glushkin

unread,
Aug 1, 2016, 11:37:01 AM8/1/16
to

Hello, dear friends,

I can successfully create table with rows immediately after netsnmp_tdata_create_table() call, but I can't add the rows to existing table from agent. I don't need to add rows on snmpset request, I need to add rows using agent itself.

My table has two integer indexes.

My agent is a library, it creates the thread after calling it the first time, in this thread it registers the agent, table handlers, etc., and starts the loop for agent_check_and_process(). The register function exits, the thread continues its own loop. After that, other program calls the other agent function, where the agent must add rows to already created table.

I can't get the netsnmp_tdata * pointer, even if I save it as static variable in code for table, or try to return it to register agent function.

Maybe I should use other tables method, like dataset?
I tried different mib2c templates, but still didn't succeeded.

Please help.

0 new messages