SNMP Subagent Programmer's Guide
Writing Subagent Logic
SNMP Subagent Programmer’s Guide—119728 4-13
Management Functions
ordering and locating operations required when processing SNMP requests, so the
subagent provides no next and locator functions:
for (file = dir->files; file; file = file->next)
{
row_handle = mgmt_new_instance(mgmt_env,
&SMI_GROUP_fileEntry,
(Void *) file);
Contrast this approach with the table-level registration performed by Dynamic Directory,
which manages a dynamic table. The third argument in this case is a void pointer to the
structure for the table:
row_handle = mgmt_new_instance(mgmt_env,
&SMI_GROUP_fileEntry,
(Void *) dir);
Because individual entries are not registered, Dynamic Directory must provide a next
function and a locator function for finding individual entries. The MIB used by
Dynamic Directory identifies the next and locator functions in C_NEXT_FUNC and
C_LOCATOR_FUNC clauses, respectively, as shown earlier in this manual, in
Example 2-9, “Dynamic Directory MIB Definition,” on page 2-45.