On Thu, 2005-07-28 at 18:25 +0200, Torben Surmer wrote:
> I am writing a netsnmp 5.x subagent and I am wondering, if there is a comon 
> way, where I should store my persistant configuration data, like the netsnmp 
> agent himself stores his configuration data in the snmpd.conf file. And if 
> so, are there probably already functions to read this file, if they are 
> stored in a key value styled way?

Have a look at the file  'agent/mibgroup/mibII/system_mib.c' - in
particular the various 'system_parse_xxx()' routines, 'system_store()',
and the initialisation code that refers to these names.
   That should give you the basic idea.

If your subagent includes a call to
                init_snmp("subagent");

then it will try to read settings from (and save them to) the
configuration file "subagent.conf".

Dave


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to