Hello KM, I'm not super tuper expert in net-snmp, but from the trace log I would say: 1) your handler that cares for snmp object is NOT CALLED at all. Instead of it is called null handler->>
2005-03-07 15:19:35 handler:calling: calling handler null 2005-03-07 15:19:35 trace: netsnmp_null_handler(): null.c, 37 2005-03-07 15:19:35 helper:null: Got request 2005-03-07 15:19:35 trace: netsnmp_null_handler(): null.c, 39 2005-03-07 15:19:35 helper:null: oid:IF-MIB::interfaces.3.0 what points out, that you have problem with registration of handler. 2) Of course, handler null returns... guess what->> 2005-03-07 15:19:35 handler:returned: handler null returned 0 2005-03-07 15:19:35 trace: netsnmp_handle_request(): snmp_agent.c, 2530 2005-03-07 15:19:35 results: request results (status = 0): 2005-03-07 15:19:35 trace: netsnmp_handle_request(): snmp_agent.c, 2533 2005-03-07 15:19:35 results: IF-MIB::interfaces.3.0 = No Such Object ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To help you more, you should pass code, that cares for registration to this mailing list. Then I can help you a little bit more... :) Until that, start snmpd with -DALL switch and look at the log, esspecially part that print out registration of your handler... Have a nice day, Igor G. Igor Grasic, Ms. D. Development Engineer Iskra Transmission, d. d., Ljubljana Stegne 11, SI-1000 Ljubljana, Slovenia phone: +386 1 5003 000 fax: +386 1 5003 500 www.iskratr.si, www.iskratr.com ........................................................ From: Krishna Mohan <[EMAIL PROTECTED]> not invoking handler 2005-03-07 02:08 Dear All, I"m trying to add a private/dummy mib into netsnmp agent under interfaces group as +--interfaces(2) | +-- -R-- Integer32 ifNumber(1) | +-- -R-- Integer32 ifKMNumber(3) Steps followed : 1. Integrate ifKMNumber mib in IF-MIB.txt file. 2. mib2c -c mib2c.scalar.conf -f ifKMNumber .1.3.6.1.2.1.2.3 3. Modify ifKMNumber.c i.e in handle_ifKMNumber under switch case MODE_GET calling the function snmp_set_var_typed_value with suitable dataptr & len. 4. ./configure --with-mib-modules="ifKMNumber" 5. make ; make install Problem : I"m unable to retrieve the value using snmpget. (snmptranslate shows my mib at this OID) $snmpget -v2c -c public IPaddress .1.3.6.1.2.1.2.3.0 When tracing the code in /var/log/snmpd.log, I found the following lines : 2005-03-07 15:19:35 trace: netsnmp_add_varbind_to_cache(): snmp_agent.c, 1474 2005-03-07 15:19:35 snmp_agent: add_vb_to_cache(0x8103c20, 1, IF-MIB::interfaces.3.0, 0x806f930) 2005-03-07 15:19:35 trace: netsnmp_add_varbind_to_cache(): snmp_agent.c, 1504 2005-03-07 15:19:35 snmp_agent: tp->start IF-MIB::ifEntry.23, tp->end RFC1213-MIB::atIfIndex, 2005-03-07 15:19:35 trace: netsnmp_call_handlers(): agent_handler.c, 282 2005-03-07 15:19:35 handler:calling: calling main handler bulk_to_next 2005-03-07 15:19:35 trace: netsnmp_call_handler(): agent_handler.c, 322 2005-03-07 15:19:35 handler:calling: calling handler null 2005-03-07 15:19:35 trace: netsnmp_null_handler(): null.c, 37 2005-03-07 15:19:35 helper:null: Got request 2005-03-07 15:19:35 trace: netsnmp_null_handler(): null.c, 39 2005-03-07 15:19:35 helper:null: oid:IF-MIB::interfaces.3.0 2005-03-07 15:19:35 trace: netsnmp_call_handler(): agent_handler.c, 327 2005-03-07 15:19:35 handler:returned: handler null returned 0 2005-03-07 15:19:35 trace: netsnmp_handle_request(): snmp_agent.c, 2530 2005-03-07 15:19:35 results: request results (status = 0): 2005-03-07 15:19:35 trace: netsnmp_handle_request(): snmp_agent.c, 2533 2005-03-07 15:19:35 results: IF-MIB::interfaces.3.0 = No Such Object available on this agent at this OID Can anybody give me a solution in detail. Thanx in Advance KM ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders