[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&nbsp;<br >I am trying to implement persistent data store.<br ><br >First I \
have manually created myModule.conf file . In which i defined &nbsp;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(&quot;myModule&quot;,&quot;token_1&quot;,token1_handler,NULL,NULL);<br \
> >register_config_handler(&quot;myModule&quot;,&quot;token_2&quot;,token2_handler,NULL,NULL);<br \
> > >.<br >.<br >then callback registration<br >snmp_register_callback( , &nbsp;, \
> > > module_store, );</SPAN>&nbsp;<br ><br ><SPAN STYLE="font-size: 16px;">I have to \
> > > implement token1_handler(); and module_store() .</SPAN>&nbsp;<br ><br ><SPAN \
> > > STYLE="font-size: 16px;">suppose e,g &nbsp;I want to set &nbsp;the value of \
> > > param1 by following command- &nbsp;</SPAN>&nbsp;<br ><SPAN STYLE="font-size: \
> > > 16px;">snmpset &nbsp;-On &nbsp;remote_host MY_MIB::param1.0 &nbsp;i \
> > > &nbsp;123&nbsp;</SPAN>&nbsp;<br ><br ><SPAN STYLE="font-size: 16px;">Where \
> > > should i implement the logic in&nbsp;token1_handler() or \
> > > &nbsp;module_store().????</SPAN>&nbsp;<br ><br ><SPAN STYLE="font-size: \
> > > 16px;">Could u provide any idea with more elaboration&nbsp;??&nbsp;<br ><br \
> > > >Thanks</SPAN>&nbsp;<br ><br >&nbsp;
<h3>&nbsp;</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