Download Simple Network Management Protocol (snmp)

Transcript
1.11 Definition of Instrumentation Functions
programing fault somewhere. If some column does not exist, you must return the next accessible element (or
endOfTable).
f(is_set_ok, RowIndex, Cols [, ExtraArgs])
The function f(is_set_ok, RowIndex, Cols [, ExtraArgs]) is called in phase one of the set-request
processing so that new values can be checked for inconsistencies.
If the function is called, it will be called again with undo, or with set as first argument.
This function is optional.
Arguments
• RowIndex is a list of integers which define the key values for the row. The RowIndex is the list
representation (list of integers) which follow the Cols integer in the OBJECT IDENTIFIER.
• Cols is a list of {Column, NewValue}, where Column is an integer, and NewValue is guaranteed to
be of the correct type, length and within ranges, as specified in the MIB. If the object is an enumerated integer
or of type BITS, the integer value is used. The list is sorted by Column (increasing) and each Column is
guaranteed to be a valid column number.
Valid Return Values
• {noError, 0}
• {Error, Column}, where Error is the same as for is_set_ok for variables, and Column denotes the
faulty column. Column must be one of the columns in the Cols list.
f(undo, RowIndex, Cols [, ExtraArgs])
If an error occurs, The function f(undo, RowIndex, Cols [, ExtraArgs]) is called after the is_set_ok
function. If set is called for this object, undo is not called.
This function is optional.
Arguments
• RowIndex is a list of integers which define the key values for the row. The RowIndex is the list
representation (list of integers) which follow the Cols integer in the OBJECT IDENTIFIER.
• Cols is a list of {Column, NewValue}, where Column is an integer, and NewValue is guaranteed to
be of the correct type, length and within ranges, as specified in the MIB. If the object is an enumerated integer
or of type BITS, the integer value is used. The list is sorted by Column (increasing) and each Column is
guaranteed to be a valid column number.
Valid Return Values
• {noError, 0}
• {Error, Column} where Error is the same as for undo for variables, and Column denotes the faulty
column. Column must be one of the columns in the Cols list.
f(set, RowIndex, Cols [, ExtraArgs])
The function f(set, RowIndex, Cols [, ExtraArgs]) is called to perform the set in phase two of the setrequest processing. It is only called if the corresponding is_set_ok function did not exist, or returned {noError,
0}.
This function is mandatory.
Arguments
• RowIndex is a list of integers that define the key values for the row. The RowIndex is the list representation
(list of integers) which follow the Cols integer in the OBJECT IDENTIFIER.
• Cols is a list of {Column, NewValue}, where Column is an integer, and NewValue is guaranteed to
be of the correct type, length and within ranges, as specified in the MIB. If the object is an enumerated integer
60 | Ericsson AB. All Rights Reserved.: Simple Network Management Protocol (SNMP)