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
> registration. 
> 
> 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.

/MF


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to