Hello every body,

I did a lot of playing recently with registering handlers for extended range
of the oids. When I setup up range_subid to the *length* of the registration
oid of the handler (and also setup some upper limit with range _ubound),
appropriate handler is *not called* for range above the rootoid of the
registration.

EXAMPLE code:
====================================================================
    static oid      dsx1IntervalIndex_oid[] =
        { 1, 3, 6, 1, 2, 1, 10, 18, 8, 1, 1, 101 };
        netsnmp_create_handler_registration("dsx1IntervalIndex",
                                                handle_dsx1IntervalIndex,
                                                dsx1IntervalIndex_oid,
                                                OID_LENGTH
                                                (dsx1IntervalIndex_oid),
                                                HANDLER_CAN_RONLY);
        handler_reginfo->range_subid = OID_LENGTH(dsx1IntervalIndex_oid);
        handler_reginfo->range_ubound = 108;


TRACE at registering:
=====================================================================
trace: netsnmp_register_handler(): agent_handler.c, 189:
handler::register: Registering dsx1IntervalIndex (::dsx1IntervalIndex) at
.1.3.6.1.2.1.10.18.8.1.1.101.101--108
trace: netsnmp_inject_handler_before(): agent_handler.c, 300:
handler:inject: injecting bulk_to_next before dsx1IntervalIndex
trace: netsnmp_register_mib(): agent_registry.c, 556:
register_mib: registering "dsx1IntervalIndex" at
.1.3.6.1.2.1.10.18.8.1.1.101.101--108
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace: netsnmp_subtree_find_first(): agent_registry.c, 160:
subtree: found one for: ""
trace: snmp_call_callbacks(): callback.c, 176:
callback: START calling callbacks for maj=1 min=1
trace: snmp_call_callbacks(): callback.c, 196:
callback: END calling callbacks for maj=1 min=1 (0 called)
=====================================================================


1) RUNNING:
=====================================================================
snmpget -Ir -On -m ALL -v 2c -c public LinuxPC .1.3.6.1.2.1.10.18.8.1.1.101

RESULT:
=====================================================================
trace: netsnmp_add_varbind_to_cache(): snmp_agent.c, 1742:
snmp_agent: tp->start .1.3.6.1.2.1.10.18.8.1.1.101, tp->end
.1.3.6.1.2.1.10.18.8.1.1.102,
trace: netsnmp_call_handlers(): agent_handler.c, 424:
handler:calling: main handler bulk_to_next
trace: netsnmp_call_handler(): agent_handler.c, 362:
handler:calling: calling handler bulk_to_next for mode GET
trace: netsnmp_call_handler(): agent_handler.c, 362:
handler:calling: calling handler dsx1IntervalIndex for mode GET
                                 ^^^^^^^^^^^^^^^^^^


2) RUNNING:
=====================================================================
snmpget -Ir -On -m ALL -v 2c -c public LinuxPC .1.3.6.1.2.1.10.18.8.1.1.101

RESULT:
=====================================================================
trace: netsnmp_add_varbind_to_cache(): snmp_agent.c, 1742:
snmp_agent: tp->start .1.3.6.1.2.1.10.18.8.1.1.102, tp->end
.1.3.6.1.2.1.10.18.8.1.1.103,
trace: netsnmp_call_handlers(): agent_handler.c, 424:
handler:calling: main handler bulk_to_next
trace: netsnmp_call_handler(): agent_handler.c, 362:
handler:calling: calling handler bulk_to_next for mode GET
trace: netsnmp_call_handler(): agent_handler.c, 362:
handler:calling: calling handler null for mode GET
                                 ^^^^


Does anybody have any experience with that? By the way, I'm using 5.1.1.

Bye, have a nice day,
Igor





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
........................................................



-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to