Table iterator
From Net-SNMP Wiki
Table Iterator Helper
Overview
This handler calls user specified functions to iterate over a (generally unsorted) set of data, looking for the data to satisfy an incoming request.
Tips and Tricks
Transient Data
If you are concerned that the data you are iterating over will change or vanish between the time the iterator functions are called and the time the handler is called to process a request, but you don't want to cache all your data, then there is an itermediate option.
If you provide a make_data_context
function when you register the table, that function will be called with the loop_context
for a row each time the agent determines that the current row is the best match. When the agent is done with the row, the free_data_context
function will be called to release the data.