Hello,

To append what Robert stated. Yes of course you can do this. Basically ( I
hate using that word but at this time
it seems appropriate) you will register a callback function which is
associated to a token. The token eg a unique string pattern
will exist in the persistence file i.e snmpd.conf  in
/var/net-snmp/snmpd.conf. You need to register a callback function.
An example of how to do this can be seen /agent/mibgroup/mibII/system_mib.c.

This was my starting point.
The function of interest is:

snmpd_register_config_handler(token,CallbackFunction,NULL,NULL);

This callback function is called when the agent identifies the presence of
the token. Of course the callback function is something you will create and
not something provided from mib template generation.

Cheers,
Garyc

----- Original Message -----
From: "Robert Story (Users)" <[EMAIL PROTECTED]>
To: "Sridhar S" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 9:47 PM
Subject: Re: Using persistent file as config file


> On Mon, 15 Nov 2004 19:20:57 +0530 Sridhar wrote:
> SS> I am using net-snmp 5.1. My question is can I use persistent file as
> SS> configuration file ? As I observed, the configuration entries
> SS> (rwcommunity for example) being not written in the persitent file (as
> SS> warning says). How can I retain these configuration entries in the
> SS> persistent file ?
>
> You would have to make some modifications to the code, to add a save
routine
> for the variables in question. It would not be a supported configuration,
but
> it may very well work without problems.
>
> --
> Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
> <irc://irc.freenode.net/#net-snmp>
> Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>
>
> You are lost in a twisty maze of little standards, all different.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: InterSystems CACHE
> FREE OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a perfect match
> for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
> _______________________________________________
> Net-snmp-users mailing list
> [EMAIL PROTECTED]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to