I didn't get your point completely. 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. Also, I didn't find init_agent being called from the code of tools snmptrapd.c and snmpget.c I saw the following routines being called from snmptrapd.c
/* register our configuration handlers now so -H properly displays them */ register_config_handler("snmptrapd", "createUser", usm_parse_create_usmUser, NULL, "username (MD5|SHA) passphrase [DES passphrase]"); register_config_handler("snmptrapd", "usmUser", usm_parse_config_usmUser, NULL, NULL); /* we need to be called back later */ snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, usm_store_users, NULL); /* Initialize the world. Create initial user */ init_snmp("snmptrapd"); which I am also calling from my application. Still I don't understand why I get these "Unknown token" errors. Note: I am not calling the following(as in snmptrapd.conf file I mention only "createUser"). Can this cause some problems? register_config_handler("snmptrapd", "traphandle", snmptrapd_traphandle, NULL, "oid|\"default\" program [args ...] "); register_config_handler("snmptrapd", "format1", parse_trap1_fmt, free_trap1_fmt, "format"); register_config_handler("snmptrapd", "format2", parse_trap2_fmt, free_trap2_fmt, "format"); Thanks Soni Wes Hardaker wrote: > > >>>>> On Wed, 28 Jul 2004 14:47:25 +0200, Narinder Soni <[EMAIL PROTECTED]> said: > > Narinder> In my application the snmptrapd's code and snmpget/set's code work in > Narinder> parallel. Evevrything used to work fine till v2c. But when I start my > Narinder> application I get error as : > Narinder> Unknown token: engineBoots > Narinder> Unknown token: oldEngineId > > Ah, thats because it's trying to read configuration tokens you haven't > told it about. Generally, this is done automatically for you if you > had called the right init routines. My guess is that you never called > init_agent()? > > -- > Wes Hardaker > Sparta > > ------------------------------------------------------- > 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 ------------------------------------------------------- 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