Discussion:
implement persistent data store
deepak.sachan deepak.sachan
2017-05-27 03:58:45 UTC
Permalink
Hi
I am trying to implement persistent data store.
First I have manually created myModule.conf file . In which i defined four tokens (token_1,token_2,...) with value 1,2,3,4 respectively.
(Should these token`s name same as the variables` names that i want to set using snmpset????? )
Then in myModule.c (generated through mib2c) inside the init_mymodule() i registered handler for token_1, token_2 .....
register_config_handler("myModule","token_1",token1_handler,NULL,NULL);
register_config_handler("myModule","token_2",token2_handler,NULL,NULL);
.
.
then callback registration
snmp_register_callback( , , module_store, );
I have to implement token1_handler(); and module_store() .
suppose e,g I want to set the value of param1 by following command-
snmpset -On remote_host MY_MIB::param1.0 i 123
Where should i implement the logic in token1_handler() or module_store().????
Could u provide any idea with more elaboration ??
Thanks

Loading...