--===============0241073159==
Content-Type: multipart/alternative; boundary="0-967833959-1201016258=:40937"
Content-Transfer-Encoding: 8bit

--0-967833959-1201016258=:40937
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

What I mean is that I want it to be able to run independently of any config files. I only want to have to link the librarys and not have any files being read from anything other than what I want it to use. And the netsnmp_config function seems to allow me to do that.

Dave Shield wrote: On 22/01/2008, Leif Pit**** wrote:
> Is it possible to set the community string, port, and SNMP version without
> using the .conf files from the code itself?


What do you mean by "setting the community string and SNMP version"
of the agent? A command-line client needs to specify a particular single
version/community for a given request - but that's not true for the agent.
An SNMP agent will typically accept requests using a variety of versions,
community strings and SNMPv3 usernames.

Note that you can enbed *any* snmpd.conf directive directly within the code,
using the statement:

netsnmp_config( "rocommunity public" );

Alternatively, you could call the relevant config parsing routine yourself:

vacm_parse_rocommunity ( "rocommunity", "public 127.0.0.1" );

Dave



Leif Pit****
(256) 656-2502

---------------------------------
Never miss a thing. Make Yahoo your homepage.
--0-967833959-1201016258=:40937
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

What I mean is that I want it to be able to run independently of any config files.  I only want to have to link the librarys and not have any files being read from anything other than what I want it to use.  And the netsnmp_config function seems to allow me to do that. 

Dave Shield <D.T.Shield@liverpool.ac.uk> wrote:
On 22/01/2008, Leif Pit**** wrote:
> Is it possible to set the community string, port, and SNMP version without
> using the .conf files from the code itself?

What do you mean by "setting the community string and SNMP version"
of the agent? A command-line client needs to specify a particular single
version/community for a given request - but that's not true for the agent.
An SNMP agent will typically accept requests using a variety of versions,
community strings and
SNMPv3 usernames.

Note that you can enbed *any* snmpd.conf directive directly within the code,
using the statement:

netsnmp_config( "rocommunity public" );

Alternatively, you could call the relevant config parsing routine yourself:

vacm_parse_rocommunity ( "rocommunity", "public 127.0.0.1" );

Dave



Leif Pit****
(256) 656-2502




Never miss a thing. Make Yahoo your homepage.


--0-967833959-1201016258=:40937--


--===============0241073159==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--===============0241073159==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============0241073159==--