Hello Net-SNMP fellows.

Using 5.8 I'm observing the following "problem"
I have a table in my MIB with 67 elements/objects (attributes) 
.1.3.6.1.4.1.7585.1.1.1.5.31.1
There are 4 (four) entries in this table.
When I call with snmpwalk for instance some of the 67 saying object 17 with 
.1.3.6.1.4.1.7585.1.1.1.5.31.1.17
snmpwalk -v 2c -c public xxx.xxx.xxx.xxx  .1.3.6.1.4.1.7585.1.1.1.5.31.1.17
I receive the correct response:
MY-MIB::TheElement17.1 = Gauge32: XYZ
MY-MIB::TheElement17.2 = Gauge32: XYZ
MY-MIB::TheElement17.3 = Gauge32: XYZ
MY-MIB::TheElement17.4 = Gauge32: XYZ
Thayt is perfect ...

I'm using the old_api style with function My_Get_Table(struct variable *vp, oid 
*name, size_t *length,  int exact, size_t *var_len, WriteMethod **write_method)
Debugging this fuction I observed that its is called more than 5 times!!!
This cause an extra processing that is not absolutelly necessary.
The fuction is called in this way:
TheElement17.1
TheElement17.2
TheElement17.3
TheElement17.4
TheElement17.5 ---> Here my function My_Get_Table() returns NULL as return of 
header_simple_table() ... CORRECT!!!
But conitnues to be called:
TheElement18.1
TheElement19.1
TheElement20.1
TheElement21.1 ---> Here AGAIN my fuction My_Get_Table() returns NULL as return 
of header_simple_table() But My_Get_Table() still been called ...
TheElement18.1
TheElement19.1
TheElement20.1
TheElement21.1 ---> Here AGAIN AAIN my fuction My_Get_Table() returns NULL as 
return of header_simple_table() But My_Get_Table() still been called ...
TheElement19.1
TheElement20.1
TheElement21.1 ---> Here AGAIN AAIN AGAIN my fuction My_Get_Table() returns 
NULL as return of header_simple_table() But My_Get_Table() still been called ...
TheElement20.1
TheElement21.1 ---> Here AGAIN AAIN AGAIN and AGAIN my fuction My_Get_Table() 
returns NULL as return of header_simple_table() NOW stop!!!

Is this normal behaviour for snmpwalk and snmpbulkwalk?
Why My_Get_Table() do not stopped to be called after return the first NULL by 
header_simple_table()?
This same behaviour is observed in others tables in my MIB ... with distinct 
numbers of "out request calls" depending the number of elements in the table 
and the
number of element called.
If instead of eletment 17 as in my example above, I call the element 67 (the 
last in the same table):
snmpwalk -v 2c -c public xxx.xxx.xxx.xxx  .1.3.6.1.4.1.7585.1.1.1.5.31.1.67

I will observe:
TheElement67.1
TheElement67.2
TheElement67.3
TheElement67.4
TheElement67.5 ---> Here my function My_Get_Table() returns NULL as return of 
header_simple_table() ... CORRECT!!!
I trying to get element 0 (ZERO) of the next table of my MIB (yes I have one 
folowing the table I mentioned i.e. .1.3.6.1.4.1.7585.1.1.1.5.31.1.18 is also a 
table

I tried to debug the agent_check_and_process(1) function call sequence until to 
call the helper function that effectively calls my get_table function but I 
decided to
get some help to be more effective to solve this issue.

What I’m doing wrong?

Best regards,





_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to