I made some text corrections from my first post (same subject) to better understanding of the problem I'm reporting.
The system is a Raspberry PI (armv7l GNU/Linux 4.14.27). Using 5.8 (branch master) AgentX subagent with old_api style for my own MIB operation and I'm observing the following problem. I have a table in my MIB with 67 elements/objects (attributes/columns) .1.3.6.1.4.1.7585.1.1.1.5.31 There are 4 (four) entries (lines) in this table. When I call using 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 That is perfect ... But... I observed that my funcion My_Get_Table(struct variable *vp, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) is called much more than 5 (five) 5 times!!! Why if I have only four entries in this table? This cause an extra processing that is not absolutelly necessary. The fuction is called erroneous in this way: TheElement17.1 TheElement17.2 TheElement17.3 TheElement17.4 TheElement17.5 ---> Here my function My_Get_Table() returns NULL as result of the header_simple_table() processing return... CORRECT!!! But it continue to be called: TheElement18.1 TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN my fuction My_Get_Table() returns NULL as result of the header_simple_table() processing return But My_Get_Table() continue to be called ... TheElement18.1 TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN and AGAIN my fuction My_Get_Table() returns NULL as return of header_simple_table() TheElement19.1 TheElement20.1 TheElement21.1 ---> Here AGAIN AGAIN AGAIN my fuction My_Get_Table() returns NULL TheElement20.1 TheElement21.1 ---> Here AGAIN AGAIN AGAIN and AGAIN But now My_Get_Table() is no more called!!! 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 (lines) in the table and the number (position in the table) of element called. If instead of eletment 17 as in my example above, I call the element 67 (the last in the 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 result of the header_simple_table() processing return... CORRECT!!! But... \My_Get_Table() is called, trying to get element 0 (ZERO) of the next table of my MIB (yes, I have another table folowing the table I mentioned i.e. .1.3.6.1.4.1.7585.1.1.1.5.32 is also a table I tried to debug the agent_check_and_process() function call sequence until the call of the helper function that effectively calls my the function I wrote to manipulate my MIB "My_Get_table()" but I do not understand what is checked to stop my function from being called, regardless of the answer of the snmpwalk or snmpbulkwalk (the behaviour is the same) being assembled correctly. Best regards, _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders