[Sorry for the delay in responding to this] On 29/08/06, Siva Prakash Reddy G <[EMAIL PROTECTED]> wrote: > When I say set, the value should set in to the structure as well as in > snmpd.conf, How can i do this.
Processing a SET request is handled by the 'write_xxx' routine (for v4 API modules) or the appropriate code blocks in the handler routine (for v5 API modules). In both cases, there are multiple passes used to process such a request. See section 8 of the file 'AGENT.txt' for a description. It's up to you to insert suitable code to update your data structures. As for saving the new value to the snmpd.conf file, this would normally be done as part of shutting the server down (using the SNMP_CALLBACK_STORE_DATA callback), rather than re-writing this file whenever the value changes. But it is possible to force this re-writing immediately. See 'mibII/system_mib.c' for an example of this (in the COMMIT pass of write_system()), as well as the normal shutdown handling (system_store()). Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
