Hi,
I am writing a MIB module and I want to pass an integer config token
from the command line to the module. I need the token to be available
in the module init function.
I am using Net-SNMP v5.4.4 and I am starting the agent like this:
snmpd --myInteger=2
This is my module init function:
static int myInteger = -1;
void init_my_module(void)
{
snmpd_register_config_handler("myInteger", parse_myInteger, NULL, NULL);
// <snipped> OID handler registrations
}
The myInteger variable will be read correctly, but only sometime after
init_my_module() returns. But I need the variable during the module
initialisation. Is there a way to make the config token available
inside init_my_module()?
If not, would it be possilble to register a callback handler which
gets called after the config tokens are read but before the first
gets/sets get processed?
Thanks in advance,
Holger
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders