On Wed, 2005-10-26 at 15:52 +0200, Robert Iakobashvili wrote:
> Looking at the SNMP-TARGET-MIB and SNMP-USER-BASED-SM-MIB,
> I do not see any persistance of the implementation, so that if a target
> or a user is added it would remain after net-snmp restart.
It's not clear whether you're referring to the MIBs themselves,
or our implementation. But as far as the MIBs are concerned:
SNMP-TARGET-MIB:
snmpTargetAddrStorageType OBJECT-TYPE
SYNTAX StorageType
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The storage type for this conceptual row.
Conceptual rows having the value 'permanent' need not
allow write-access to any columnar objects in the row."
DEFVAL { nonVolatile }
::= { snmpTargetAddrEntry 8 }
(and similarly for SNMP-USER-BASED-SM-MIB::usmUserStorageType)
So these tables *do* include persistence information.
This has been implemented in the net-snmp agent.
See snmplib/snmpusm.c:
void
init_usm_conf(const char *app)
{
snmp_register_callback(SNMP_CALLBACK_LIBRARY,
SNMP_CALLBACK_STORE_DATA,
usm_store_users, NULL);
}
There's something similar in init_snmpTargetAddrEntry() as well.
> Is it the right direction for adding persistance is
> to add in the existing functions output to snmpd.conf configuration for
> targets
> and users, respectively? What is appropriate?
Persistence should already be there.
Have you tried doing this?
Dave
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders