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 <[EMAIL PROTECTED]> wrote: On 22/01/2008, Leif Pitcock 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 Pitcock
(256) 656-2502
---------------------------------
Never miss a thing. Make Yahoo your homepage.-------------------------------------------------------------------------
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/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders