Download Simple Network Management Protocol (SNMP)
Transcript
Chapter 1: SNMP User's Guide Is-set-ok Operation As a complement to the set operation, it is possible to specify a test function. This function has the same syntax as the set operation above, except that the first argument is is set ok instead of set. This function is called before the variable is set. Its purpose is to ensure that it is permissible to set the variable to the new value. variable_access(is_set_ok, NewValue [, ExtraArg1, ...]) For tables: table_access(set, RowIndex, Cols [, ExtraArg1,..]) Cols is a list of tuples fColumn, NewValueg. Undo Operation A function which has been called with is set ok will be called again, either with set if there was no error, or with undo, if an error occurred. In this way, resources can be reserved in the is set ok operation, released in the undo operation, or made permanent in the set operation. variable_access(undo, NewValue [, ExtraArg1, ...]) For tables: table_access(set, RowIndex, Cols [, ExtraArg1,..]) Cols is a list of tuples fColumn, NewValueg. GetNext Operation The GetNext Operation operation should only be defined for tables since the agent can find the next instance of plain variables in the MIB and call the instrumentation with the get operation. table_access(get_next, RowIndex, Cols [, ExtraArg1, ...]) Cols is a list of integers, all greater than or equal to zero. This indicates that the instrumentation should find the next accessible instance. This function returns the tuple fNextOid, NextValueg, or endOfTable. NextOid should be the lexicographically next accessible instance of a managed object in the table. It should be a list of integers, where the first integer is the column, and the rest of the list is the indices for the next row. If endOfTable is returned, the agent continues to search for the next instance among the other variables and tables. RowIndex may be an empty list, an incompletely specified row index, or the index for an unspecified row. This operation is best described with an example. 18 Simple Network Management Protocol (SNMP)