I'm writing an agent which takes a few command line switches, including a YAML
configuration file. My agent initializes itself like this:

init_agent("some string");
init_mibs();
init_snmp("some string");

init_mibs() is my own function that registers the MIBs this agent will
support.

The problem is that my agent needs some special configuration, so I've given
it a command line switch (-Q, to be specific, which I've picked mostly
randomly, trying to not break anything); the user should follow that switch
with the name of a YAML file providing the necessary configuration.

All this works fine. init_mibs() calls the stuff I need it to call to read the
YAML file and claim some OIDs. But then, init_snmp() gets called, which ends
up calling Net-SNMP's read_config(), which tries to re-read my YAML config
file, and spits out lots of errors about unknown tokens and invalid blank
lines and things.

How can I pass this config file to my agent without read_config() trying to
parse it as an snmpd config file? Thanks.

--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to