This is a discussion on RE: activating snmp proxy during run-time - SNMP ; Hello Magnus. Thanks for replying my mail. It appers I didn't explain my self enough. I don't want to use the proxy functions by rereading the config file I simply calling them from another function I wrote and send them ...
Thanks for replying my mail. It appers I didn't explain my self enough.
I don't want to use the proxy functions by rereading the config file
I simply calling them from another function I wrote and send them the proper args.
Anyhow I think I found my bug. The proxy functions that were written were not intended
to be read in runtime. In order to use them in run time one needs to add "unregister_mib" calls before
registring with the proxy. Morover In order to erase proxy configuration and use the mib regularly one needs to add "regiser_mib"
call after calling "proxy_free_config".
From: Magnus Fromreide [mailto:email@example.com]
Sent: Tuesday, May 13, 2008 10:29 PM
To: Asaf Henig
Subject: Re: activating snmp proxy during run-time
On tis, 2008-05-13 at 14:37 +0300, Asaf Henig wrote:
> Hello all.
> I would like to use net-snmp proxy code to activate snmp proxy to a
> given OID during run-time (not only on startup).
Edit the config file to add the new proxy.
Send the agent a SIGHUP to make it reread the config.
> It appears that calling the function "proxy_parse_config" in proxy.c
> with the compatible params is good enough (though it works only on an
> exact OID and not on subtree). However, deactivating the proxy and
> returnning to regular operation mode is not working properly.
> From the code it appears that function "proxy_free_config" should do
> the job, but it doesn't. It appears that proxy_free_config totaly
> erases the mib registration and doesn't reestablish the former
> Can anyone advise ?
The purpose of proxy_free_config is to clear the old proxy config in
preparation for a reread of the config file.
Thus, when proxy_free_config is called all proxy entries should be
cleared and that is what seems to happen.
During a configuration reread proxy_parse_config will be called on every
line and reestablish all the proxy entries.
I would'n depend on those functions as I would doubt that they really
were intended to be public at all.
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Net-snmp-coders mailing list