RE: Running agent without snmpd.conf

"Mani, Sathish" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Dave,
Thanks for the response.
I saw that piece of code before sending the email to you, but it looked
a bit complicated. I was expecting a simpler API.
Anyway, I am creating the snmpd.conf file during runtime and all I have
in that file is
rwcommunity xyzabc 
and it works fine.

Also, I noticed that even though I set the configuration directory to a
specific directory, the code still tries to use the SNMPCONFPATH
environment variable (In windows it looks for the registry entries
also). May be its design intent, but from a user perspective its not
that useful!. Just a thought!
netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_CONFIGURATION_DIR, CONFIG_FILE_DIR);

Thanks
Sathish

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dave Shield
Sent: Monday, January 07, 2008 1:17 AM
To: Mani, Sathish
Cc: [email protected]
Subject: Re: Running agent without snmpd.conf

On 04/01/2008, Mani, Sathish <[email protected]> wrote:
> I want the users to just change one XML and not touch the snmpd.conf.

> 1)  Configure the agent not to use conf file
>        netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
>              NETSNMP_DS_LIB_DISABLE_CONFIG_LOAD, 1);
> 2)  Get the agent listen port from XML and configure the agent to use
it.
>        netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,
>              NETSNMP_DS_AGENT_PORTS, AGENT_LISTEN_PORT);
> 3)  Get the community string from the XML file and
>           configure the agent to use it.
>
> I AM NOT sure what function I have to call for this.

See the code file 'mibgroup/mibII/vacm_conf.c' - in particular the
routines 'vacm_parse_r{o,w}community()' and related code.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.