I am sorry but still I didn't find 
init_agent("snmptrapd") in snmptrapd.c of ucd-snmp-0.4.2.5 rather
init_snmp("snmptrapd") is there. 
And I am also calling this function. Does this routine also do same as
init_agent?? or should I explicitly use init_agent instead od init_snmp
or BOTH?

Thanks 
Soni

Dave Shield wrote:
> 
> >                              Why should I call init_agent() from
> > my management application i.e. the code which will either receive
> > traps or make snmpget/set commands only.
> 
> Because "init_agent" is the bit that handles some of the
> persistent configuration information.   You don't need that
> for a "run-once" application like 'snmpget' or 'snmpset'.
> But you *do* for a trap handler.
> 
> >                    Also, I didn't find init_agent being
> > called from the code of tools snmptrapd.c and snmpget.c
> 
> It's not present in snmpget.c, no.
> But it *is* there in snmptrapd.c - about line 840 or 850-ish:
> 
>     /*
>      * initialize the agent library
>      */
>     init_agent("snmptrapd");
> 
> 
> > Note: I am not calling the following(as in snmptrapd.conf file I mention
> > only "createUser"). Can this cause some problems?
> 
> No - that's fine.
> If you don't need to support those particular config settings,
> then you don't need to register handlers for them.
> 
> But you do need to initialise the agent library as well as the
> main snmp library.
> 
> Dave


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
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

Reply via email to