how to add rows to table in c agent dynamically

Ruth Glushkin <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CALDRwipv6uDopH3y_DdXYh4Vh_d-tWp7Sqtvu6SHmFwZKAfM9Q@mail.gmail.com>
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.

------------------------------------------------------------------------------

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.