Hi all, I am newbie in net-snmp.
Now I have a requirement that need pass "community string" and "protocol
version" to “pass_persist” command as two arguments.
For example:
In var_extensible_pass_persist()
Modify
...
if (exact)
snprintf(persistpassthru->command,
sizeof(persistpassthru->command), "get\n%s\n", buf);
else
snprintf(persistpassthru->command,
sizeof(persistpassthru->command), "getnext\n%s\n", buf);
...
TO
...
if (exact)
snprintf(persistpassthru->command,
sizeof(persistpassthru->command), "get\n%s\n%d\n%s\n", buf,
version4plugin, community4plugin);
else
snprintf(persistpassthru->command,
sizeof(persistpassthru->command), "getnext\n%s\n%d\n%s\n",
buf, version4plugin, community4plugin);
...
I found that I can get "community string" and "protocol version" in pdu, maybe
snmp_register_callback() is helpful.
Anyone have suggestions? Everything helpful is welcome.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders