[prev in list] [next in list] [prev in thread] [next in thread]
List: net-snmp-coders
Subject: implement persistent data store
From: <deepak.sachan () deal ! drdo ! in>
Date: 2017-05-27 4:10:45
Message-ID: 2113304584.44719.1495857525351.JavaMail.root () 127 ! 0 ! 0 ! 1
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #4 (text/plain)]
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
[Attachment #5 (text/html)]
<HTML><HEAD><META content="text/html; charset=x-user-defined" \
http-equiv="Content-Type"><style type="text/css"><!--.MailHeader { font-family: \
"Arial"; font-size: 8pt; color: #000000; font-style: normal; font-weight: normal; \
text-decoration: none; }//--></style></HEAD><BODY><SPAN STYLE="font-size: \
16px;">Hi <br >I am trying to implement persistent data store.<br ><br >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.<br >(Should these token`s name \
same as the variables` names that i want to set using snmpset????? )<br >Then in \
myModule.c (generated through mib2c) inside the init_mymodule() i registered handler \
for token_1, token_2 .....<br \
>register_config_handler("myModule","token_1",token1_handler,NULL,NULL);<br \
> >register_config_handler("myModule","token_2",token2_handler,NULL,NULL);<br \
> > >.<br >.<br >then callback registration<br >snmp_register_callback( , , \
> > > module_store, );</SPAN> <br ><br ><SPAN STYLE="font-size: 16px;">I have to \
> > > implement token1_handler(); and module_store() .</SPAN> <br ><br ><SPAN \
> > > STYLE="font-size: 16px;">suppose e,g I want to set the value of \
> > > param1 by following command- </SPAN> <br ><SPAN STYLE="font-size: \
> > > 16px;">snmpset -On remote_host MY_MIB::param1.0 i \
> > > 123 </SPAN> <br ><br ><SPAN STYLE="font-size: 16px;">Where \
> > > should i implement the logic in token1_handler() or \
> > > module_store().????</SPAN> <br ><br ><SPAN STYLE="font-size: \
> > > 16px;">Could u provide any idea with more elaboration ?? <br ><br \
> > > >Thanks</SPAN> <br ><br >
<h3> </h3>
</BODY></HTML><img src=https://hqr.drdo.in:4498/images/drdologo_footer1.jpg \
/><br/><br/> The contents of this Email communication are confidential to the \
addressee. If you<br/> are not the intended recipient you may not disclose or \
distribute this communication <br/> in any form should immediately contact the \
sender. The information, images, documents<br/> and views expressed in this Email are \
personal to the Sender and do not expressly or<br/> implicitly represent official \
positions of DRDO and no authority exists on behalf of <br/> DRDO to make any \
agreements, or other binding commitment by means of Email.<br/> <br>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic