On 22/01/2008, Leif Pitcock <[EMAIL PROTECTED]> 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
-------------------------------------------------------------------------
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