Download Simple Network Management Protocol (SNMP)
Transcript
snmp generic SNMP Reference Manual fmyTable, fsnmp generic, table func, [fmyTable, Db]gg. In the functions defined below, the following types are used: NameDb = fName, Dbg, Name = atom(), Db = volatile | persistent | mnesia RowIndex = [int()] Cols = [Col] | [fCol, Valueg], Col = int(), Value = term() RowIndex denotes the last part of the OID which specifies the index of the row in the table (see RFC1212, 4.1.6 for more information about INDEX). Cols is a list of column numbers in the case of a get operation, and a list of column numbers and values in the case of a set operation. Cols is a list of column numbers in case of a get operation, and a list of column numbers and values in case of a set operation. Exports get status col(Name,Cols) get status col(NameDb,Cols) -> fok, StatusValg | false Gets the value of the status column from Cols. This function can be used in instrumentation functions for is set ok, undo or set to check if the status column of a table is modified. get index types(Name) Gets the index types of Name This function can be used in instrumentation functions to retrieve the index types part of the table info. table func(Op1,NameDb) table func(Op2,RowIndex,Cols,NameDb) -> Ret Types: Op1 = new | delete Op2 = get | next | is set ok | set | undo This is the default instrumentation function for tables. The new function creates the table if it does not exist, but only if the database is the SNMP internal db. The delete function does not delete the table from the database since unloading an MIB does not necessarily mean that the table should be destroyed. The is set ok function checks that a row which is to be modified or deleted exists, and that a row which is to be created does not exist. The undo function does nothing. The set function checks if it has enough information to make the row change its status from notReady to notInService (when a row has been been set to createAndWait). If a row is set to createAndWait, columns without a value are set to noinit. If Mnesia is used, the set functionality is handled within a transaction. 118 Simple Network Management Protocol (SNMP)