summaryrefslogtreecommitdiff
path: root/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable')
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-FIRST.txt167
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-analogPropertyTable.txt870
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.c230
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.h247
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.c481
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.h76
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.c552
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.h92
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.c1552
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.h145
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_enums.h58
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.c1879
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.h101
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_oids.h56
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-alarmEnable.m2d43
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmDeadband.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHI.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHIHI.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLO.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLOLO.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmState.m2d35
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogParameterOID.m2d43
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/table-analogPropertyTable.m2d103
23 files changed, 6905 insertions, 0 deletions
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-FIRST.txt b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-FIRST.txt
new file mode 100644
index 0000000000..635e7caa76
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-FIRST.txt
@@ -0,0 +1,167 @@
+************************************************************************
+analogPropertyTable README
+------------------------------------------------------------------------
+This document describes the results of the mib2c code generation
+system using the mfd code generation template. The resulting files
+are documented both in this README file as well as per-table specific
+README files. All of the files generated by this run of mib2c will
+begin with the analogPropertyTable prefix.
+
+Quick Start
+-----------
+For those interested in a quick start, to get a pseudo-todo list, try
+this command in directory with the generated code:
+
+ grep -n "TODO:" *.[ch] | sed 's/\([^ ]*\) \(.*\)TODO\(.*\)/\3 (\1)/' | sort -n
+
+Key:
+ :o: Optional
+ :r: Recommended
+ :M: Mandatory
+ :A: Advanced users
+
+This will give you and ordered list of places in the code that you
+may (or must) take a closer look at).
+
+You may also want to take a look at the on-line tutorial, found here:
+
+ http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/index.html
+
+
+MIBs For Dummies Overview
+-------------------------
+The MIBs For Dummies (MFD) configuration files have been written to help
+SNMP novices implement SNMP MIBs. This section will be a brief
+introduction to some of the general concepts you should be familar with.
+
+ Managed Information Base (MIB)
+ ------------------------------
+ A SNMP MIB (Managed information base) is a text file that describes the
+ syntax for some set of data objects. The MIB creates a correlation
+ between an ASCII name for an object and a number OID (Object Identifier).
+ The SNMP protocol communicates information using the OIDs, and the MIB
+ allows tools to display a name, which we humans find easier to deal with.
+
+ To use an analogy, a MIB is much like a menu at a restaurant. If you've
+ ever been to a reataurant and ordered a meal, and later received a bill
+ that simply had '#6' on it, you get the idea. The name is easier for
+ the customers to remember, and the waiters and chefs use the number for
+ efficency.
+
+
+ Scalars
+ -------
+ A scalar variable is a unique object in a MIB which can represent
+ a single value. For example, the SNMP standard MIB-II defines a
+ variable, sysContact.0, which is a string containing the contact
+ information for the person in charge of a particular agent. Note
+ that scalar variable always end with '.0'.
+
+
+ Rows and Tables
+ ---------------
+ When a group of related attributes occur more than once, they can be
+ grouped together in a table. A table has an index, which uniquely
+ identifies a particular row, and data columns, which contain the
+ attributes for that row.
+
+ For example, the SNMP standard MIB-II defines a table, ifTable, which
+ contains information on the ethernet interfaces on a system.
+
+
+ Data Structures
+ ---------------
+ The code generated by the MFD configuration files has a few important
+ structures.
+
+
+ The Data Context
+ ----------------
+ The data context structure should contain the necessary information
+ to provide the data for the columns in a given row. As long as you
+ can extract the data for a column for the data context, the data context
+ can be anything you want: a pointer to an existing structure, the
+ parameters needed for a function call or an actual copy of the data.
+
+ By default, a data context structure is generated with storage for
+ all the data in a row. Information on changing the default is presented
+ later on in this help.
+
+
+ The MIB Context
+ ---------------
+ The MIB context structure is generated with storage for all the
+ indexes of a table. This data will be used when searching for the
+ correct row to process for a request.
+
+
+ The Row Request Context
+ -----------------------
+ Each table will have a unique data structure for holding data during
+ the processing of a particular row. The row request context contains
+ the registration context (that you supply during initilization),
+ the data context, the MIB context, the undo context (for settable
+ tables) and other data. There is also a netsnmp_data_list, which can
+ be used to temporary storage during processing.
+
+
+ The Table Registration Pointer
+ ------------------------------
+ During initilization, you may provide a pointer to arbitrary data for
+ you own use. This pointer will be saved in the row request context,
+ and is passed as a parameter to several functions. It is not required,
+ and is provided as a way for you to access table specific data in
+ the generated code.
+
+
+
+These files are top-level files potentially useful for all the tables:
+------------------------------------------------------------------------
+
+ File : analogPropertyTable_Makefile
+ ----------------------------------------------------------------------
+ Purpose : Make file for compiling a (sub)agent. This file is only
+ useful if you don't want to compile your code directly
+ into the Net-SNMP master agent.
+ Editable: Optional
+ Usage : make -f analogPropertyTable_Makefile
+
+
+ File : analogPropertyTable_subagent.c
+ ----------------------------------------------------------------------
+ Purpose : This file contains a main() function for an agent or
+ sub-agent and is compiled using the Makefile above.
+
+
+
+
+Table specific README files
+------------------------------------------------------------------------
+Each table for which code was generated has its own README file
+describing the files specifically associated with each table. You
+should probably read these next:
+
+ analogPropertyTable-README-analogPropertyTable.txt
+
+
+
+These are miscellaneous auto-generated code files you generally
+shouldn't edit. They contain code that ties your code together with
+the Net-SNMP agent.
+------------------------------------------------------------------------
+ File : analogPropertyTable.h
+ Purpose : Header file for the module set. Includes config_require
+ macros to auto-load the other code pieces when compiled
+ into the agent.
+
+ File : analogPropertyTable_oids.h
+ Purpose : C #define definitions of the tables, columns, and OIDs
+
+ File : analogPropertyTable_enums.h
+ Purpose : C #define definitions of the enumerated type values for
+ each column of each table that requires them.
+
+ File : analogPropertyTable_interface.c
+ Purpose : MFD interface to Net-SNMP. This auto-generated code ties the
+ functions you will fill out to the code that the agent needs.
+
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-analogPropertyTable.txt b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-analogPropertyTable.txt
new file mode 100644
index 0000000000..1bab037a46
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable-README-analogPropertyTable.txt
@@ -0,0 +1,870 @@
+************************************************************************
+analogPropertyTable README
+------------------------------------------------------------------------
+ This readme file describes the code generated by mib2c (using the MIBs
+ for Dummies (MFD) configuration file). The code generated was
+ generated specifically for the following SNMP table:
+
+ analogPropertyTable
+
+ Your code will be called when the snmp agent receives requests for
+ the analogPropertyTable table. The agent will start by looking for the right
+ row in your existing data to operate on, if one exists.
+
+
+ Configuration Variables
+ ------------------------------------------------------------
+ Some variables used for code generation may be set to affect the code
+ generation. You may override these variables by setting them in the
+ file defaults/table-analogPropertyTable.m2d, and then re-running mib2c.
+
+ m2c_table_settable (currently '1')
+ --------------------------------------------------------
+ This variable determines whether or not code is generated to support
+ MIB object which have an access of read-write or read-create. The
+ default is set based on whether or not the table contains writable
+ objects, but can be over-ridden.
+
+ Syntax: @eval $m2c_table_settable = 0@
+
+
+ m2c_table_dependencies (currently '0')
+ --------------------------------------------------------
+ This variable determines whether or not code is generated to support
+ checking dependencies between columns, rows or tables. The default
+ is set based on whether or not the table contains writable objects,
+ but can be over-ridden.
+
+ Syntax: @eval $m2c_table_dependencies = 0@
+
+
+ m2c_table_row_creation (currently '0')
+ --------------------------------------------------------
+ This variable determines whether or not code is generated to support
+ checking creation of new rows via SNMP. The default is set based on
+ whether or not the table contains read-create objects, but can be
+ over-ridden.
+
+ Syntax: @eval $m2c_table_row_creation = 0@
+
+
+ m2c_context_reg (currently 'netsnmp_data_list')
+ --------------------------------------------------------
+ This variable contains the structure name to typedef for the
+ analogPropertyTable_registration.
+
+ During initilization, you will provide a pointer to a structure of
+ this type. This pointer is used as a parameter to many functions so
+ that you have access to your registration data. The default is a
+ netsnmp_data_list pointer, which will allow you to keep multiple
+ pointers tagged by a text name. If you have a new or existing structure
+ you would rather use, you can redefine this variable.
+
+
+ To avoid regenerating code, you may also change this typedef directly
+ in the analogPropertyTable.h header.
+
+ Syntax: @eval $m2c_context_reg = "struct my_registration_context@
+
+
+ m2c_data_context (currently 'generated')
+ --------------------------------------------------------
+ This variable contains the structure name to typedef for the
+ analogPropertyTable_data.
+
+ This typedef is used in the row request context structure for the table,
+ analogPropertyTable_rowreq_ctx.
+
+ The typedef in the primary table context will be used for the data and
+ undo structure types. This structure should contain all the data
+ needed for all the columns in the table. The default is 'generated',
+ which will cuase a new data strcuture to be generated with data members
+ for each column.
+
+ To avoid regenerating code, you may also change this typedef directly
+ in the analogPropertyTable.h header.
+
+ Syntax: @eval $m2c_data_context = "struct my_data_context"@
+
+
+ m2c_data_allocate (currently '0')
+ --------------------------------------------------------
+ This variable determines whether or not the data context (see above)
+ requires memory to be allocated. The default generated data structure
+ does not. If you are using a custom data context which needs to
+ allocate memory, override this value and two additional functions
+ will be generated:
+
+ analogPropertyTable_allocate_data
+ analogPropertyTable_release_data
+
+ Syntax: @eval $m2c_data_allocate = 1@
+
+
+ m2c_data_init (currently '1')
+ --------------------------------------------------------
+ This variable determines whether or not the data context (see above)
+ or any other items you have added to the table context requires
+ initialization. The default generated data structure does not. If you
+ are using a custom data context or have added items needing initialization
+ to the table context, override this value and two additional functions
+ will be generated:
+
+ analogPropertyTable_rowreq_ctx_init
+ analogPropertyTable_rowreq_ctx_cleanup
+
+ Syntax: @eval 1 = 1@
+
+
+ m2c_table_access (currently 'container-cached')
+ ------------------------------------------------------------------
+ This variable determines which data interface will be use to generate
+ code for looking up data for a given index. The default is the
+ 'container-cached' access code, which caches the data in a netsnmp-
+ container (usually a sorted array).
+
+ Available options can be determined by checking for mib2c configuration
+ files that begin with 'mfd-access-*'.
+
+ Syntax: @eval $m2c_table_access = 'container-cached'@
+
+
+ m2c_include_examples (currently '0')
+ ------------------------------------------------------------------
+ This variable determines whether or not to generate example code. The
+ default is to generate example code.
+
+ Syntax: @eval $m2c_include_examples = 0@
+
+
+ m2c_data_transient (currently '2')
+ ------------------------------------------------------------------
+ This variable determines how the generated example code deals with the
+ data during data lookup. See the table readme file for details on how
+ the current table access method interprets this value. In general,
+ a value of 0 indicates persistent data, 1 indicates semi-transient and
+ 2 indicates transient data.
+
+ Syntax: @eval $m2c_data_transient = 0@
+
+
+ Index(es) for the analogPropertyTable table
+ ------------------------------------------------------------
+ The index(es) for the analogPropertyTable table are:
+
+ analogParameterOID:
+ Syntax: OBJECTID
+ DataType: OBJECTID
+ ASN type: ASN_OBJECT_ID
+ C-code type: oid
+
+ You should know how to set all these values from your data context,
+ analogPropertyTable_data.
+
+
+************************************************************************
+analogPropertyTable File Overview
+------------------------------------------------------------------------
+ Several files have been generated to implement the analogPropertyTable
+ table. We'll go through these files, one by one, explaining each and
+ letting you know which you need to edit.
+
+
+File: analogPropertyTable_data_access.[c|h]
+------------------------------------------------------------------------
+ The analogPropertyTable_data_access file contains the interface to your data in
+ its raw format. These functions are used to build the row cache or
+ locate the row (depending on the table access method).
+
+ Set MIB context
+ -----------------
+ TODO : Set MIB index values
+ FUNC : analogPropertyTable_indexes_set
+ WHERE: analogPropertyTable_data_access.c
+
+ This is a convenience function for setting the index context from
+ the native C data. Where necessary, value mapping should be done.
+
+ This function should update the table index values (found in
+ tbl_idx) for the given raw data.
+
+
+ container summary
+ ------------------------
+ The container data access code is for cases when you want to
+ store your data in the agent/sub-agent.
+
+ ... to be continued...
+
+
+ cache summary
+ ------------------------
+ The container-cached data access code is for cases when you want to
+ cache your data in the agent/sub-agent.
+
+ ... to be continued...
+
+
+
+
+File: analogPropertyTable_enums.h
+------------------------------------------------------------------------
+ This file contains macros for mapping enumeration values when the
+ enumerated values defined by the MIB do not match the values used
+ internally.
+
+ Review this file to see if any values need to be updated.
+
+
+File: analogPropertyTable_data_get.c
+------------------------------------------------------------------------
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : alarmEnable_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : analogAlarmState_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : analogAlarmHIHI_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : analogAlarmHI_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : analogAlarmLO_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : analogAlarmLOLO_get
+
+ Get data for column
+ -------------------
+ TODO : retrieve column data from raw data
+ FUNC : analogAlarmDeadband_get
+
+
+
+File: analogPropertyTable_data_set.c
+------------------------------------------------------------------------
+
+ This code was generated based on the following assumptions or settings:
+
+ 1) Some of the values for this table have DEPENDENCIES on other objects.
+
+ DEPENDENCIES on other objects complicates SET request processing. When
+ one or more columns in a table depend on another object (in the same
+ table, or in another table), a DEPENDENCY exists. For example, if you
+ have a table that determine a color with three columns (red, green and
+ blue) that define the percentage of each primary color, the total for
+ the three columns must equal 100 percent. So, in addition to checking
+ that each colums has a valid value between 0 and 100, the total of
+ all three columns must equal 100.
+
+ Set $m2c_table_dependencies = 0 in defaults/table-analogPropertyTable.m2d
+ and regenerate code if this assumption is incorrect.
+
+ 2) This table does not support ROW CREATION.
+
+ Supporting ROW CREATION allows new rows to be created via SNMP requests.
+
+
+
+ Undo setup
+ ----------
+ TODO : save data for undo
+ FUNC : analogPropertyTable_undo_setup
+
+ This function will be called before the individual undo_setup functions are
+ called. This is where you should save any undo information which is not
+ directly related to a particular column. This function will only be called
+ once per row. After this function is called, any column which is being
+ set will have its individual node undo_setup function called.
+
+
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : alarmEnable_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : alarmEnable_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : alarmEnable_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : alarmEnable_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : analogAlarmHIHI_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : analogAlarmHIHI_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : analogAlarmHIHI_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : analogAlarmHIHI_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : analogAlarmHI_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : analogAlarmHI_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : analogAlarmHI_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : analogAlarmHI_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : analogAlarmLO_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : analogAlarmLO_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : analogAlarmLO_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : analogAlarmLO_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : analogAlarmLOLO_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : analogAlarmLOLO_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : analogAlarmLOLO_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : analogAlarmLOLO_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+ Check value for column
+ ----------------------
+ TODO : perform additional validations on values for a set request
+ FUNC : analogAlarmDeadband_check_value
+
+ The generated code will automatically validate incoming requests against
+ all the requirements specified by the syntax of the MIB. However, it is
+ often the case that additional requirements are specified in the
+ description of a MIB object. Those type of validations should be checked
+ in this function.
+
+
+ Undo setup for column
+ ---------------------
+ TODO : save the value for column
+ FUNC : analogAlarmDeadband_undo_setup
+
+ After the table level undo setup function has been called, the individual
+ node undo setup functions will be called for columns which are being set.
+
+
+ Set value for column
+ --------------------
+ TODO : set the value for column
+ FUNC : analogAlarmDeadband_set
+
+ After all the validations have been passed, this function will be called to
+ set the new value.
+
+
+ Undo value for column
+ ---------------------
+ TODO : undo set for column
+ FUNC : analogAlarmDeadband_undo
+
+ If an error occurs after a column has been set, this function will be called
+ to undo the set and restore the previous state.
+
+
+
+ Commit changes
+ --------------
+ TODO : commit changes
+ FUNC : analogPropertyTable_commit
+
+ After all values have been set, the commit function will be called.
+
+
+
+
+
+************************************************************************
+analogPropertyTable Reference
+------------------------------------------------------------------------
+
+Function flow
+----------------------------------------------------
+To give you the general idea of how the functions flow works, this
+example flow is from a complete table implementation.
+
+NOTE: Depending on your configuration, some of the functions used in the
+ examples below may not have been generated for the
+ analogPropertyTable table.
+
+ Conversely, the examples below may not include some functions that
+ were generated for the analogPropertyTable table.
+
+To watch the flow of the analogPropertyTable table, use the
+following debug tokens:
+
+ snmp_agent
+ helper:table:req
+ analogPropertyTable
+ verbose:analogPropertyTable
+ internal:analogPropertyTable
+
+e.g.
+ snmpd -f -Le -DanalogPropertyTable,verbose:analogPropertyTable,internal:analogPropertyTable
+
+
+Initialization
+--------------------------------
+init_xxxTable: called xxx.c
+ initialize_table_xxxTable xxx.c
+ _xxxTable_initialize_interface xxx_interface.c
+ xxxTable_init_data xxx_data_access.c
+ _xxxTable_container_init xxx_interface.c
+ xxxTable_container_init xxx_data_access.c
+
+
+GET Request
+--------------------------------
+_cache_load xxx_interface.c
+ xxxTable_cache_load xxx_data_access.c
+ xxxTable_allocate_rowreq_ctx xxx_interface.c
+ xxxTable_allocate_data xxx_data_get.c
+ xxxTable_rowreq_ctx_init xxx_data_get.c
+ xxxTable_indexes_set xxx_data_get.c
+ xxxTable_indexes_set_tbl_idx xxx_data_get.c
+
+xxxTable_pre_request
+
+_mfd_xxxTable_object_lookup xxx_interface.c
+ xxxTable_row_prep xxx_data_access.c
+
+_mfd_xxxTable_get_values xxx_interface.c
+ _mfd_xxxTable_get_column xxx_interface.c
+ yyy_get xxx_data_get.c
+
+xxxTable_post_request
+
+
+GETNEXT Request
+--------------------------------
+_cache_load ...
+xxxTable_pre_request ...
+_mfd_xxxTable_object_lookup ...
+_mfd_xxxTable_get_values ...
+xxxTable_post_request ...
+
+
+SET Request: success
+--------------------------------
+_cache_load ...
+xxxTable_pre_request
+_mfd_xxxTable_object_lookup ...
+
+_mfd_xxxTable_check_objects xxx_interface.c
+ _xxxTable_check_column xxx_interface.c
+ yyy_check_value xxx_data_set.c
+
+_mfd_xxxTable_undo_setup xxx_interface.c
+ xxxTable_allocate_data ...
+ xxxTable_undo_setup xxx_interface.c
+ _xxxTable_undo_setup_column xxx_interface.c
+ yyy_undo_setup xxx_data_set.c
+
+_mfd_xxxTable_set_values xxx_interface.c
+ _xxxTable_set_column xxx_interface.c
+ yyy_set xxx_data_set.c
+
+_mfd_xxxTable_check_dependencies xxx_interface.c
+ xxxTable_check_dependencies xxx_data_set.c
+
+_mfd_xxxTable_commit xxx_interface.c
+ xxxTable_commit xxx_data_set.c
+
+_mfd_xxxTable_undo_cleanup xxx_interface.c
+ xxxTable_undo_cleanup xxx_data_set.c
+ xxxTable_release_data ...
+
+xxxTable_post_request ...
+
+
+SET Request: row creation
+--------------------------------
+_cache_load ...
+xxxTable_pre_request
+
+_mfd_xxxTable_object_lookup ...
+ xxxTable_index_from_oid xxx_interface.c
+ xxxTable_allocate_rowreq_ctx ...
+ ...
+ _xxxTable_check_indexes xxx_interface.c
+ yyy_check_index xxx_data_set.c
+ xxxTable_validate_index xxx_data_set.c
+
+_mfd_xxxTable_check_objects ...
+ _xxxTable_check_column ...
+ yyy_check_value ...
+ _xxxTable_check_column ...
+ yyy_check_value ...
+
+_mfd_xxxTable_undo_setup ...
+_mfd_xxxTable_set_values ...
+_mfd_xxxTable_check_dependencies ...
+_mfd_xxxTable_commit ...
+_mfd_xxxTable_undo_cleanup ...
+xxxTable_post_request ...
+
+
+SET Resuest: value error
+--------------------------------
+_cache_load ...
+xxxTable_pre_request ...
+_mfd_xxxTable_object_lookup ...
+
+_mfd_xxxTable_check_objects ...
+ _xxxTable_check_column ...
+ yyy_check_value ...
+ ERROR:"yyy value not supported"
+
+xxxTable_post_request ...
+
+
+SET Request: commit failure
+--------------------------------
+_cache_load ...
+xxxTable_pre_request ...
+_mfd_xxxTable_object_lookup ...
+_mfd_xxxTable_check_objects ...
+_mfd_xxxTable_undo_setup ...
+_mfd_xxxTable_set_values ...
+_mfd_xxxTable_check_dependencies ...
+
+_mfd_xxxTable_commit ...
+ xxxTable_commit ...
+ ERROR: bad rc -1
+
+_mfd_xxxTable_undo_commit xxx_interface.c
+ xxxTable_undo_commit xxx_data_set.c
+
+_mfd_xxxTable_undo_values xxx_interface.c
+ _xxxTable_undo_column xxx_interface.c
+ yyy_undo xxx_data_set.c
+
+_mfd_xxxTable_undo_cleanup ...
+xxxTable_post_request ...
+
+
+Row release (user initiated)
+--------------------------------
+xxxTable_release_rowreq_ctx xxx_interface.c
+ xxxTable_rowreq_ctx_cleanup xxx_data_get.c
+ xxxTable_release_data xxx_data_get.c
+
+
+
+Table / column details
+----------------------------------------------------
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+*/
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogParameterOID
+ * analogParameterOID is subid 1 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.1
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ *
+ * Its syntax is OBJECTID (based on perltype OBJECTID)
+ * The net-snmp type is ASN_OBJECT_ID. The C type decl is oid (oid)
+ * This data type requires a length.
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.alarmEnable
+ * alarmEnable is subid 2 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.2
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 0
+ * settable 1
+ *
+ * Ranges: 1;
+ *
+ * Its syntax is OCTETSTR (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length. (Max 1)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmState
+ * analogAlarmState is subid 3 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.3
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ * Enum range: 4/8. Values: aasNominal(1), aasHIHI(2), aasHI(3), aasLO(4), aasLOLO(5)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmHIHI
+ * analogAlarmHIHI is subid 4 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.4
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmHI
+ * analogAlarmHI is subid 5 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.5
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmLO
+ * analogAlarmLO is subid 6 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.6
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmLOLO
+ * analogAlarmLOLO is subid 7 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.7
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmDeadband
+ * analogAlarmDeadband is subid 8 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.8
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+
+
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.c
new file mode 100644
index 0000000000..f450bec0c1
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.c
@@ -0,0 +1,230 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+/** \page MFD helper for analogPropertyTable
+ *
+ * \section intro Introduction
+ * Introductory text.
+ *
+ */
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "analogPropertyTable.h"
+
+#include <net-snmp/agent/mib_modules.h>
+
+#include "analogPropertyTable_interface.h"
+
+oid analogPropertyTable_oid[] = { ANALOGPROPERTYTABLE_OID };
+int analogPropertyTable_oid_size =
+OID_LENGTH(analogPropertyTable_oid);
+
+analogPropertyTable_registration analogPropertyTable_user_context;
+
+void initialize_table_analogPropertyTable(void);
+void shutdown_table_analogPropertyTable(void);
+
+
+/**
+ * Initializes the analogPropertyTable module
+ */
+void
+init_analogPropertyTable(void)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:init_analogPropertyTable",
+ "called\n"));
+
+ /*
+ * TODO:300:o: Perform analogPropertyTable one-time module initialization.
+ */
+
+ /*
+ * here we initialize all the tables we're planning on supporting
+ */
+ if (should_init("analogPropertyTable"))
+ initialize_table_analogPropertyTable();
+
+} /* init_analogPropertyTable */
+
+/**
+ * Shut-down the analogPropertyTable module (agent is exiting)
+ */
+void
+shutdown_analogPropertyTable(void)
+{
+ if (should_init("analogPropertyTable"))
+ shutdown_table_analogPropertyTable();
+
+}
+
+/**
+ * Initialize the table analogPropertyTable
+ * (Define its contents and how it's structured)
+ */
+void
+initialize_table_analogPropertyTable(void)
+{
+ analogPropertyTable_registration *user_context;
+ u_long flags;
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:initialize_table_analogPropertyTable", "called\n"));
+
+ /*
+ * TODO:301:o: Perform analogPropertyTable one-time table initialization.
+ */
+
+ /*
+ * TODO:302:o: |->Initialize analogPropertyTable user context
+ * if you'd like to pass in a pointer to some data for this
+ * table, allocate or set it up here.
+ */
+ /*
+ * a netsnmp_data_list is a simple way to store void pointers. A simple
+ * string token is used to add, find or remove pointers.
+ */
+ user_context =
+ netsnmp_create_data_list("analogPropertyTable", NULL, NULL);
+
+ /*
+ * No support for any flags yet, but in the future you would
+ * set any flags here.
+ */
+ flags = 0;
+
+ /*
+ * call interface initialization code
+ */
+ _analogPropertyTable_initialize_interface(user_context, flags);
+} /* initialize_table_analogPropertyTable */
+
+/**
+ * Shutdown the table analogPropertyTable
+ */
+void
+shutdown_table_analogPropertyTable(void)
+{
+ /*
+ * call interface shutdown code
+ */
+ _analogPropertyTable_shutdown_interface
+ (&analogPropertyTable_user_context);
+}
+
+/**
+ * extra context initialization (eg default values)
+ *
+ * @param rowreq_ctx : row request context
+ * @param user_init_ctx : void pointer for user (parameter to rowreq_ctx_allocate)
+ *
+ * @retval MFD_SUCCESS : no errors
+ * @retval MFD_ERROR : error (context allocate will fail)
+ */
+int
+analogPropertyTable_rowreq_ctx_init(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, void *user_init_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_rowreq_ctx_init", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:210:o: |-> Perform extra analogPropertyTable rowreq initialization. (eg DEFVALS)
+ */
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_rowreq_ctx_init */
+
+/**
+ * extra context cleanup
+ *
+ */
+void
+analogPropertyTable_rowreq_ctx_cleanup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_rowreq_ctx_cleanup", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:211:o: |-> Perform extra analogPropertyTable rowreq cleanup.
+ */
+} /* analogPropertyTable_rowreq_ctx_cleanup */
+
+/**
+ * pre-request callback
+ *
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error
+ */
+int
+analogPropertyTable_pre_request(analogPropertyTable_registration *
+ user_context)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_pre_request", "called\n"));
+
+ /*
+ * TODO:510:o: Perform analogPropertyTable pre-request actions.
+ */
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_pre_request */
+
+/**
+ * post-request callback
+ *
+ * Note:
+ * New rows have been inserted into the container, and
+ * deleted rows have been removed from the container and
+ * released.
+ *
+ * @param user_context
+ * @param rc : MFD_SUCCESS if all requests succeeded
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error (ignored)
+ */
+int
+analogPropertyTable_post_request(analogPropertyTable_registration *
+ user_context, int rc)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_post_request", "called\n"));
+
+ /*
+ * TODO:511:o: Perform analogPropertyTable post-request actions.
+ */
+
+ /*
+ * check to set if any rows were changed.
+ */
+ if (analogPropertyTable_dirty_get()) {
+ /*
+ * check if request was successful. If so, this would be
+ * a good place to save data to its persistent store.
+ */
+ if (MFD_SUCCESS == rc) {
+ /*
+ * save changed rows, if you haven't already
+ */
+ }
+
+ analogPropertyTable_dirty_set(0); /* clear table dirty flag */
+ }
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_post_request */
+
+
+/** @{ */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.h
new file mode 100644
index 0000000000..176ecfe973
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable.h
@@ -0,0 +1,247 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+#ifndef ANALOGPROPERTYTABLE_H
+#define ANALOGPROPERTYTABLE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** @addtogroup misc misc: Miscellaneous routines
+ *
+ * @{
+ */
+#include <net-snmp/library/asn1.h>
+
+ /*
+ * OID and column number definitions for analogPropertyTable
+ */
+#include "analogPropertyTable_oids.h"
+
+ /*
+ * enum definions
+ */
+#include "analogPropertyTable_enums.h"
+
+/* include common header */
+#include "EoCCommon.h"
+
+ /*
+ *********************************************************************
+ * function declarations
+ */
+ void init_analogPropertyTable(void);
+ void shutdown_analogPropertyTable(void);
+
+ /*
+ *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+ /*
+ *********************************************************************
+ * When you register your mib, you get to provide a generic
+ * pointer that will be passed back to you for most of the
+ * functions calls.
+ *
+ * TODO:100:r: Review all context structures
+ */
+ /*
+ * TODO:101:o: |-> Review analogPropertyTable registration context.
+ */
+ typedef netsnmp_data_list analogPropertyTable_registration;
+
+/**********************************************************************/
+ /*
+ * TODO:110:r: |-> Review analogPropertyTable data context structure.
+ * This structure is used to represent the data for analogPropertyTable.
+ */
+ /*
+ * This structure contains storage for all the columns defined in the
+ * analogPropertyTable.
+ */
+ typedef struct analogPropertyTable_data_s {
+
+ /*
+ * alarmEnable(2)/OCTETSTR/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
+ */
+ char alarmEnable[1];
+ size_t alarmEnable_len; /* # of char elements, not bytes */
+
+ /*
+ * analogAlarmState(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+ */
+ u_long analogAlarmState;
+
+ /*
+ * analogAlarmHIHI(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ long analogAlarmHIHI;
+
+ /*
+ * analogAlarmHI(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ long analogAlarmHI;
+
+ /*
+ * analogAlarmLO(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ long analogAlarmLO;
+
+ /*
+ * analogAlarmLOLO(7)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ long analogAlarmLOLO;
+
+ /*
+ * analogAlarmDeadband(8)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ long analogAlarmDeadband;
+
+ } analogPropertyTable_data;
+
+
+ /*
+ *********************************************************************
+ * TODO:115:o: |-> Review analogPropertyTable undo context.
+ * We're just going to use the same data structure for our
+ * undo_context. If you want to do something more efficent,
+ * define your typedef here.
+ */
+ typedef analogPropertyTable_data analogPropertyTable_undo_data;
+
+ /*
+ * TODO:120:r: |-> Review analogPropertyTable mib index.
+ * This structure is used to represent the index for analogPropertyTable.
+ */
+ typedef struct analogPropertyTable_mib_index_s {
+
+ /*
+ * analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ /** maximum length of OID must be in accordance with analog alarm structure definition */
+ oid analogParameterOID[LIBSPID_OID_MAX_LEN];
+ size_t analogParameterOID_len;
+
+
+ } analogPropertyTable_mib_index;
+
+ /*
+ * TODO:121:r: | |-> Review analogPropertyTable max index length.
+ * If you KNOW that your indexes will never exceed a certain
+ * length, update this macro to that length.
+ *
+ * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
+ * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
+ * Guessing 128 - col/entry(2) - oid len(11) - replaced with libspid definition
+ */
+#define MAX_analogPropertyTable_IDX_LEN (LIBSPID_OID_MAX_LEN+1)
+
+
+ /*
+ *********************************************************************
+ * TODO:130:o: |-> Review analogPropertyTable Row request (rowreq) context.
+ * When your functions are called, you will be passed a
+ * analogPropertyTable_rowreq_ctx pointer.
+ */
+ typedef struct analogPropertyTable_rowreq_ctx_s {
+
+ /** this must be first for container compare to work */
+ netsnmp_index oid_idx;
+ oid oid_tmp[MAX_analogPropertyTable_IDX_LEN];
+
+ analogPropertyTable_mib_index tbl_idx;
+
+ analogPropertyTable_data data;
+ analogPropertyTable_undo_data *undo;
+ unsigned int column_set_flags; /* flags for set columns */
+
+
+ /*
+ * flags per row. Currently, the first (lower) 8 bits are reserved
+ * for the user. See mfd.h for other flags.
+ */
+ u_int rowreq_flags;
+
+ /*
+ * TODO:131:o: | |-> Add useful data to analogPropertyTable rowreq context.
+ */
+
+ /*
+ * storage for future expansion
+ */
+ netsnmp_data_list *analogPropertyTable_data_list;
+
+ } analogPropertyTable_rowreq_ctx;
+
+ typedef struct analogPropertyTable_ref_rowreq_ctx_s {
+ analogPropertyTable_rowreq_ctx *rowreq_ctx;
+ } analogPropertyTable_ref_rowreq_ctx;
+
+ /*
+ *********************************************************************
+ * function prototypes
+ */
+ int
+ analogPropertyTable_pre_request(analogPropertyTable_registration *
+ user_context);
+ int
+ analogPropertyTable_post_request(analogPropertyTable_registration *
+ user_context, int rc);
+
+ int
+ analogPropertyTable_rowreq_ctx_init(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx,
+ void *user_init_ctx);
+ void
+ analogPropertyTable_rowreq_ctx_cleanup
+ (analogPropertyTable_rowreq_ctx * rowreq_ctx);
+
+ int
+ analogPropertyTable_commit(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+ analogPropertyTable_rowreq_ctx
+ *analogPropertyTable_row_find_by_mib_index
+ (analogPropertyTable_mib_index * mib_idx);
+
+ extern oid analogPropertyTable_oid[];
+ extern int analogPropertyTable_oid_size;
+
+
+#include "analogPropertyTable_interface.h"
+#include "analogPropertyTable_data_access.h"
+#include "analogPropertyTable_data_get.h"
+#include "analogPropertyTable_data_set.h"
+
+ /*
+ * DUMMY markers, ignore
+ *
+ * TODO:099:x: *************************************************************
+ * TODO:199:x: *************************************************************
+ * TODO:299:x: *************************************************************
+ * TODO:399:x: *************************************************************
+ * TODO:499:x: *************************************************************
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ANALOGPROPERTYTABLE_H */
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.c
new file mode 100644
index 0000000000..1518937d20
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.c
@@ -0,0 +1,481 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "analogPropertyTable.h"
+
+
+#include "analogPropertyTable_data_access.h"
+
+/** @ingroup interface
+ * @addtogroup data_access data_access: Routines to access data
+ *
+ * These routines are used to locate the data used to satisfy
+ * requests.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+
+/**
+ * initialization for analogPropertyTable data access
+ *
+ * This function is called during startup to allow you to
+ * allocate any resources you need for the data table.
+ *
+ * @param analogPropertyTable_reg
+ * Pointer to analogPropertyTable_registration
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : unrecoverable error.
+ */
+int
+analogPropertyTable_init_data(analogPropertyTable_registration *
+ analogPropertyTable_reg)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_init_data", "called\n"));
+
+ /*
+ * TODO:303:o: Initialize analogPropertyTable data.
+ */
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_init_data */
+
+/**
+ * container overview
+ *
+ */
+
+/**
+ * container initialization
+ *
+ * @param container_ptr_ptr A pointer to a container pointer. If you
+ * create a custom container, use this parameter to return it
+ * to the MFD helper. If set to NULL, the MFD helper will
+ * allocate a container for you.
+ * @param cache A pointer to a cache structure. You can set the timeout
+ * and other cache flags using this pointer.
+ *
+ * This function is called at startup to allow you to customize certain
+ * aspects of the access method. For the most part, it is for advanced
+ * users. The default code should suffice for most cases. If no custom
+ * container is allocated, the MFD code will create one for your.
+ *
+ * This is also the place to set up cache behavior. The default, to
+ * simply set the cache timeout, will work well with the default
+ * container. If you are using a custom container, you may want to
+ * look at the cache helper documentation to see if there are any
+ * flags you want to set.
+ *
+ * @remark
+ * This would also be a good place to do any initialization needed
+ * for you data source. For example, opening a connection to another
+ * process that will supply the data, opening a database, etc.
+ */
+void
+analogPropertyTable_container_init(netsnmp_container ** container_ptr_ptr,
+ netsnmp_cache * cache)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_container_init", "called\n"));
+
+ if (NULL == container_ptr_ptr) {
+ snmp_log(LOG_ERR,
+ "bad container param to analogPropertyTable_container_init\n");
+ return;
+ }
+
+ /*
+ * For advanced users, you can use a custom container. If you
+ * do not create one, one will be created for you.
+ */
+ *container_ptr_ptr = NULL;
+
+ if (NULL == cache) {
+ snmp_log(LOG_ERR,
+ "bad cache param to analogPropertyTable_container_init\n");
+ return;
+ }
+
+ /*
+ * TODO:345:A: Set up analogPropertyTable cache properties.
+ *
+ * Also for advanced users, you can set parameters for the
+ * cache. Do not change the magic pointer, as it is used
+ * by the MFD helper. To completely disable caching, set
+ * cache->enabled to 0.
+ */
+ cache->timeout = ANALOGPROPERTYTABLE_CACHE_TIMEOUT; /* seconds */
+ /* adjust cache flags */
+ cache->flags |= ( NETSNMP_CACHE_PRELOAD );
+} /* analogPropertyTable_container_init */
+
+/**
+ * container shutdown
+ *
+ * @param container_ptr A pointer to the container.
+ *
+ * This function is called at shutdown to allow you to customize certain
+ * aspects of the access method. For the most part, it is for advanced
+ * users. The default code should suffice for most cases.
+ *
+ * This function is called before analogPropertyTable_container_free().
+ *
+ * @remark
+ * This would also be a good place to do any cleanup needed
+ * for you data source. For example, closing a connection to another
+ * process that supplied the data, closing a database, etc.
+ */
+void
+analogPropertyTable_container_shutdown(netsnmp_container * container_ptr)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_container_shutdown", "called\n"));
+
+ if (NULL == container_ptr) {
+ snmp_log(LOG_ERR,
+ "bad params to analogPropertyTable_container_shutdown\n");
+ return;
+ }
+
+} /* analogPropertyTable_container_shutdown */
+
+/**
+ * load initial data
+ *
+ * TODO:350:M: Implement analogPropertyTable data load
+ * This function will also be called by the cache helper to load
+ * the container again (after the container free function has been
+ * called to free the previous contents).
+ *
+ * @param container container to which items should be inserted
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_RESOURCE_UNAVAILABLE : Can't access data source
+ * @retval MFD_ERROR : other error.
+ *
+ * This function is called to load the index(es) (and data, optionally)
+ * for the every row in the data set.
+ *
+ * @remark
+ * While loading the data, the only important thing is the indexes.
+ * If access to your data is cheap/fast (e.g. you have a pointer to a
+ * structure in memory), it would make sense to update the data here.
+ * If, however, the accessing the data invovles more work (e.g. parsing
+ * some other existing data, or peforming calculations to derive the data),
+ * then you can limit yourself to setting the indexes and saving any
+ * information you will need later. Then use the saved information in
+ * analogPropertyTable_row_prep() for populating data.
+ *
+ * @note
+ * If you need consistency between rows (like you want statistics
+ * for each row to be from the same time frame), you should set all
+ * data here.
+ *
+ */
+int
+analogPropertyTable_container_load(netsnmp_container * container)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx;
+ size_t count = 0;
+ int rc = MFD_SUCCESS;
+
+ /*
+ * temporary storage for index values
+ */
+ /*
+ * analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ /** maximum length of OID must be in accordance with analog alarm structure definition */
+ oid analogParameterOID[LIBSPID_OID_MAX_LEN];
+ size_t analogParameterOID_len;
+
+ unsigned char alarmEnable[1];
+ size_t alarmEnable_len = 1;
+ libspid_eoc_alarm_state_t analogAlarmState;
+
+ /* analog alarm entries read from config file */
+ libspid_eoc_analog_alarm_entry_t analog_alarm_entries[LIBSPID_ANALOG_ALARMS_MAX_NUM];
+
+ int i,j;
+ int analog_alarm_count;
+
+ libspid_eoc_current_alarm_entry_t current_alarm_entry;
+
+ /* current alarm entries read from config file */
+ libspid_eoc_current_alarm_entry_t current_alarm_all_entries[LIBSPID_CURRENT_ALARMS_MAX_NUM];
+ int current_alarm_count;
+ oid currentAlarmOID[LIBSPID_OID_MAX_LEN];
+ size_t currentAlarmOID_len;
+ int suboid_found = 0;
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_container_load", "called\n"));
+
+ memset(analog_alarm_entries, 0x0, sizeof(analog_alarm_entries));
+ memset(current_alarm_all_entries, 0x0, sizeof(current_alarm_all_entries));
+
+ /* get current contents of analog alarm config file */
+ if (LIBSPID_SUCCESS != libspid_eoc_analog_alarm_get_list(analog_alarm_entries, &analog_alarm_count)){
+ syslog(LOG_DEBUG, "analogPropertyTable: analog alarm config file not read correctly\n");
+ return MFD_ERROR;
+ }
+
+ if (0 == analog_alarm_count){
+ rc = MFD_END_OF_DATA;
+ }
+
+ /*
+ * TODO:351:M: |-> Load/update data in the analogPropertyTable container.
+ * loop over your analogPropertyTable data, allocate a rowreq context,
+ * set the index(es) [and data, optionally] and insert into
+ * the container.
+ */
+ for (i=0; i < analog_alarm_count; i++){
+ /* set maximum OID length */
+ analogParameterOID_len = LIBSPID_OID_MAX_LEN;
+
+ /* parse alarm OID from analog alarm entry */
+ if (!read_objid(analog_alarm_entries[i].oid, analogParameterOID, &analogParameterOID_len)) {
+ syslog(LOG_DEBUG, "analogPropertyTable: error parsing OID from analog alarm entry, setting OID to invalid\n");
+ read_objid("0.0", analogParameterOID, &analogParameterOID_len);
+ } else {
+ /* check if length of parsed OID is within allowed range */
+ if (analogParameterOID_len < 1 || analogParameterOID_len > LIBSPID_OID_MAX_LEN) {
+ syslog(LOG_DEBUG, "analogPropertyTable: OID length from analog alarm entry out of range, setting OID to invalid\n");
+ read_objid("0.0", analogParameterOID, &analogParameterOID_len);
+ }
+ }
+
+ /*
+ * TODO:352:M: | |-> set indexes in new analogPropertyTable rowreq context.
+ * data context will be set from the param (unless NULL,
+ * in which case a new data context will be allocated)
+ */
+ rowreq_ctx = analogPropertyTable_allocate_rowreq_ctx(NULL);
+ if (NULL == rowreq_ctx) {
+ snmp_log(LOG_ERR, "memory allocation failed\n");
+ return MFD_RESOURCE_UNAVAILABLE;
+ }
+ if (MFD_SUCCESS !=
+ analogPropertyTable_indexes_set(rowreq_ctx, analogParameterOID,
+ analogParameterOID_len)) {
+ snmp_log(LOG_ERR,
+ "error setting index while loading "
+ "analogPropertyTable data.\n");
+ analogPropertyTable_release_rowreq_ctx(rowreq_ctx);
+ continue;
+ }
+
+ /*
+ * TODO:352:r: | |-> populate analogPropertyTable data context.
+ * Populate data context here. (optionally, delay until row prep)
+ */
+ /*
+ * TRANSIENT or semi-TRANSIENT data:
+ * copy data or save any info needed to do it in row_prep.
+ */
+ /*
+ * setup/save data for alarmEnable
+ * alarmEnable(2)/OCTETSTR/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
+ */
+
+ rowreq_ctx->data.alarmEnable_len = 1;
+
+ /* obtain alarm enable value from analog alarm entry */
+ alarmEnable[0] = analog_alarm_entries[i].enable.LOLO_alarm_enable +
+ analog_alarm_entries[i].enable.LO_alarm_enable*2 +
+ analog_alarm_entries[i].enable.HI_alarm_enable*4 +
+ analog_alarm_entries[i].enable.HIHI_alarm_enable*8;
+
+ /*
+ * make sure there is enough space for alarmEnable data
+ */
+ if ((NULL == rowreq_ctx->data.alarmEnable) ||
+ (rowreq_ctx->data.alarmEnable_len <
+ (alarmEnable_len * sizeof(alarmEnable[0])))) {
+ snmp_log(LOG_ERR, "not enough space for value\n");
+ return MFD_ERROR;
+ }
+ rowreq_ctx->data.alarmEnable_len =
+ alarmEnable_len * sizeof(alarmEnable[0]);
+ memcpy(rowreq_ctx->data.alarmEnable, alarmEnable,
+ alarmEnable_len * sizeof(alarmEnable[0]));
+
+ /*
+ * setup/save data for analogAlarmState
+ * analogAlarmState(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+ */
+ /* obtain state from current alarm configuration file */
+ /* if there is entry with analog OID in current alarm info file, read current alarm state from configuration file, otherwise search for subOIDs */
+ if (LIBSPID_SUCCESS == libspid_eoc_current_alarm_get(analog_alarm_entries[i].oid, &current_alarm_entry)){
+ /* check if state value is in allowed set for enabled analog alarm */
+ if ( (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_HIHI) || (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_HI)
+ || (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_LO) || (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_LOLO) )
+ analogAlarmState = analog_alarm_entries[i].state;
+ else
+ analogAlarmState = LIBSPID_AS_DISABLE;
+ } else {
+ /* get contents of current alarm config file */
+ if (LIBSPID_SUCCESS != libspid_eoc_current_alarm_get_list(current_alarm_all_entries, &current_alarm_count)){
+ syslog(LOG_DEBUG, "analogPropertyTable: current alarm config file not read correctly\n");
+ analogAlarmState = LIBSPID_AS_DISABLE;
+ } else {
+ /* iterate through current alarm list and search for subOIDs - stop at first subOID found */
+ for (j=0; j < current_alarm_count; j++){
+
+ /* set maximum OID length */
+ currentAlarmOID_len = LIBSPID_OID_MAX_LEN;
+
+ if (!read_objid(current_alarm_all_entries[j].oid, currentAlarmOID, &currentAlarmOID_len)) {
+ syslog(LOG_DEBUG, "analogPropertyTable: error parsing OID from current alarm entry, setting OID to invalid\n");
+ read_objid("0.0", currentAlarmOID, &currentAlarmOID_len);
+ } else {
+ /* check if length of parsed OID is within allowed range */
+ if (currentAlarmOID_len < 1 || currentAlarmOID_len > LIBSPID_OID_MAX_LEN) {
+ syslog(LOG_DEBUG, "analogPropertyTable: OID length from current alarm entry out of range, setting OID to invalid\n");
+ read_objid("0.0", currentAlarmOID, &currentAlarmOID_len);
+ }
+ }
+
+ /* check if current alarm OID is a subOID of analog alarm OID */
+ if (0 == netsnmp_oid_is_subtree(analogParameterOID, analogParameterOID_len,
+ currentAlarmOID, currentAlarmOID_len)){
+ suboid_found = 1;
+ break;
+ }
+ }
+ /* if there is an entry with suboid of analog OID in current alarm info file, read current alarm state from configuration file, otherwise set to disabled */
+ if (suboid_found){
+ if ( (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_HIHI) || (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_HI)
+ || (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_LO) || (analog_alarm_entries[i].state == LIBSPID_AS_ANALOG_LOLO) )
+ analogAlarmState = analog_alarm_entries[i].state;
+ else
+ analogAlarmState = LIBSPID_AS_DISABLE;
+ } else
+ analogAlarmState = LIBSPID_AS_DISABLE;
+
+ }
+ }
+
+ rowreq_ctx->data.analogAlarmState = analogAlarmState;
+
+ /*
+ * setup/save data for analogAlarmHIHI
+ * analogAlarmHIHI(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ rowreq_ctx->data.analogAlarmHIHI = analog_alarm_entries[i].hihi;
+
+ /*
+ * setup/save data for analogAlarmHI
+ * analogAlarmHI(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+
+ rowreq_ctx->data.analogAlarmHI = analog_alarm_entries[i].hi;
+
+ /*
+ * setup/save data for analogAlarmLO
+ * analogAlarmLO(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ rowreq_ctx->data.analogAlarmLO = analog_alarm_entries[i].lo;
+
+ /*
+ * setup/save data for analogAlarmLOLO
+ * analogAlarmLOLO(7)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ rowreq_ctx->data.analogAlarmLOLO = analog_alarm_entries[i].lolo;
+
+ /*
+ * setup/save data for analogAlarmDeadband
+ * analogAlarmDeadband(8)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ rowreq_ctx->data.analogAlarmDeadband = analog_alarm_entries[i].deadband;
+
+
+ /*
+ * insert into table container
+ */
+ CONTAINER_INSERT(container, rowreq_ctx);
+ ++count;
+ }
+
+ DEBUGMSGT(("verbose:analogPropertyTable:analogPropertyTable_container_load", "inserted %d records\n", count));
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_container_load */
+
+/**
+ * container clean up
+ *
+ * @param container container with all current items
+ *
+ * This optional callback is called prior to all
+ * item's being removed from the container. If you
+ * need to do any processing before that, do it here.
+ *
+ * @note
+ * The MFD helper will take care of releasing all the row contexts.
+ *
+ */
+void
+analogPropertyTable_container_free(netsnmp_container * container)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_container_free", "called\n"));
+
+ /*
+ * TODO:380:M: Free analogPropertyTable container data.
+ */
+} /* analogPropertyTable_container_free */
+
+/**
+ * prepare row for processing.
+ *
+ * When the agent has located the row for a request, this function is
+ * called to prepare the row for processing. If you fully populated
+ * the data context during the index setup phase, you may not need to
+ * do anything.
+ *
+ * @param rowreq_ctx pointer to a context.
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error.
+ */
+int
+analogPropertyTable_row_prep(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_row_prep",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:390:o: Prepare row for request.
+ * If populating row data was delayed, this is the place to
+ * fill in the row for this request.
+ */
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_row_prep */
+
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.h
new file mode 100644
index 0000000000..ee65a81e92
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_access.h
@@ -0,0 +1,76 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 14170 $ of $
+ *
+ * $Id:$
+ */
+#ifndef ANALOGPROPERTYTABLE_DATA_ACCESS_H
+#define ANALOGPROPERTYTABLE_DATA_ACCESS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /*
+ *********************************************************************
+ * function declarations
+ */
+
+ /*
+ *********************************************************************
+ * Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+
+
+ int
+ analogPropertyTable_init_data(analogPropertyTable_registration *
+ analogPropertyTable_reg);
+
+
+ /*
+ * TODO:180:o: Review analogPropertyTable cache timeout.
+ * The number of seconds before the cache times out
+ */
+#define ANALOGPROPERTYTABLE_CACHE_TIMEOUT 60
+
+ void analogPropertyTable_container_init(netsnmp_container **
+ container_ptr_ptr,
+ netsnmp_cache *
+ cache);
+ void
+ analogPropertyTable_container_shutdown(netsnmp_container *
+ container_ptr);
+
+ int analogPropertyTable_container_load(netsnmp_container *
+ container);
+ void analogPropertyTable_container_free(netsnmp_container *
+ container);
+
+ int analogPropertyTable_cache_load(netsnmp_container *
+ container);
+ void analogPropertyTable_cache_free(netsnmp_container *
+ container);
+
+ int
+ analogPropertyTable_row_prep(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ANALOGPROPERTYTABLE_DATA_ACCESS_H */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.c
new file mode 100644
index 0000000000..7114ab695c
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.c
@@ -0,0 +1,552 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12088 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "analogPropertyTable.h"
+
+
+/** @defgroup data_get data_get: Routines to get data
+ *
+ * TODO:230:M: Implement analogPropertyTable get routines.
+ * TODO:240:M: Implement analogPropertyTable mapping routines (if any).
+ *
+ * These routine are used to get the value for individual objects. The
+ * row context is passed, along with a pointer to the memory where the
+ * value should be copied.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+
+/*
+ * ---------------------------------------------------------------------
+ * * TODO:200:r: Implement analogPropertyTable data context functions.
+ */
+
+
+/**
+ * set mib index(es)
+ *
+ * @param tbl_idx mib index structure
+ * @param analogParameterOID_ptr
+ * @param analogParameterOID_ptr_len
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error.
+ *
+ * @remark
+ * This convenience function is useful for setting all the MIB index
+ * components with a single function call. It is assume that the C values
+ * have already been mapped from their native/rawformat to the MIB format.
+ */
+int
+analogPropertyTable_indexes_set_tbl_idx(analogPropertyTable_mib_index *
+ tbl_idx,
+ oid * analogParameterOID_val_ptr,
+ size_t
+ analogParameterOID_val_ptr_len)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_indexes_set_tbl_idx", "called\n"));
+
+ /*
+ * analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ tbl_idx->analogParameterOID_len = sizeof(tbl_idx->analogParameterOID) / sizeof(tbl_idx->analogParameterOID[0]); /* max length */
+ /*
+ * make sure there is enough space for analogParameterOID data
+ */
+ if ((NULL == tbl_idx->analogParameterOID) ||
+ (tbl_idx->analogParameterOID_len <
+ (analogParameterOID_val_ptr_len))) {
+ snmp_log(LOG_ERR, "not enough space for value\n");
+ return MFD_ERROR;
+ }
+ tbl_idx->analogParameterOID_len = analogParameterOID_val_ptr_len;
+ memcpy(tbl_idx->analogParameterOID, analogParameterOID_val_ptr,
+ analogParameterOID_val_ptr_len *
+ sizeof(analogParameterOID_val_ptr[0]));
+
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_indexes_set_tbl_idx */
+
+/**
+ * @internal
+ * set row context indexes
+ *
+ * @param reqreq_ctx the row context that needs updated indexes
+ *
+ * @retval MFD_SUCCESS : success.
+ * @retval MFD_ERROR : other error.
+ *
+ * @remark
+ * This function sets the mib indexs, then updates the oid indexs
+ * from the mib index.
+ */
+int
+analogPropertyTable_indexes_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ oid * analogParameterOID_val_ptr,
+ size_t analogParameterOID_val_ptr_len)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_indexes_set", "called\n"));
+
+ if (MFD_SUCCESS !=
+ analogPropertyTable_indexes_set_tbl_idx(&rowreq_ctx->tbl_idx,
+ analogParameterOID_val_ptr,
+ analogParameterOID_val_ptr_len))
+ return MFD_ERROR;
+
+ /*
+ * convert mib index to oid index
+ */
+ rowreq_ctx->oid_idx.len = sizeof(rowreq_ctx->oid_tmp) / sizeof(oid);
+ if (0 != analogPropertyTable_index_to_oid(&rowreq_ctx->oid_idx,
+ &rowreq_ctx->tbl_idx)) {
+ return MFD_ERROR;
+ }
+
+ return MFD_SUCCESS;
+} /* analogPropertyTable_indexes_set */
+
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.alarmEnable
+ * alarmEnable is subid 2 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.2
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 0
+ * settable 1
+ *
+ * Ranges: 1;
+ *
+ * Its syntax is OCTETSTR (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length. (Max 1)
+ */
+/**
+ * Extract the current value of the alarmEnable data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param alarmEnable_val_ptr_ptr
+ * Pointer to storage for a char variable
+ * @param alarmEnable_val_ptr_len_ptr
+ * Pointer to a size_t. On entry, it will contain the size (in bytes)
+ * pointed to by alarmEnable.
+ * On exit, this value should contain the data size (in bytes).
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+*
+ * @note If you need more than (*alarmEnable_val_ptr_len_ptr) bytes of memory,
+ * allocate it using malloc() and update alarmEnable_val_ptr_ptr.
+ * <b>DO NOT</b> free the previous pointer.
+ * The MFD helper will release the memory you allocate.
+ *
+ * @remark If you call this function yourself, you are responsible
+ * for checking if the pointer changed, and freeing any
+ * previously allocated memory. (Not necessary if you pass
+ * in a pointer to static memory, obviously.)
+ */
+int
+alarmEnable_get(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ char **alarmEnable_val_ptr_ptr,
+ size_t *alarmEnable_val_ptr_len_ptr)
+{
+ /** we should have a non-NULL pointer and enough storage */
+ netsnmp_assert((NULL != alarmEnable_val_ptr_ptr)
+ && (NULL != *alarmEnable_val_ptr_ptr));
+ netsnmp_assert(NULL != alarmEnable_val_ptr_len_ptr);
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:alarmEnable_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the alarmEnable data.
+ * copy (* alarmEnable_val_ptr_ptr ) data and (* alarmEnable_val_ptr_len_ptr ) from rowreq_ctx->data
+ */
+ /*
+ * make sure there is enough space for alarmEnable data
+ */
+ if ((NULL == (*alarmEnable_val_ptr_ptr)) ||
+ ((*alarmEnable_val_ptr_len_ptr) <
+ (rowreq_ctx->data.alarmEnable_len *
+ sizeof(rowreq_ctx->data.alarmEnable[0])))) {
+ /*
+ * allocate space for alarmEnable data
+ */
+ (*alarmEnable_val_ptr_ptr) =
+ malloc(rowreq_ctx->data.alarmEnable_len *
+ sizeof(rowreq_ctx->data.alarmEnable[0]));
+ if (NULL == (*alarmEnable_val_ptr_ptr)) {
+ snmp_log(LOG_ERR, "could not allocate memory\n");
+ return MFD_ERROR;
+ }
+ }
+ (*alarmEnable_val_ptr_len_ptr) =
+ rowreq_ctx->data.alarmEnable_len *
+ sizeof(rowreq_ctx->data.alarmEnable[0]);
+ memcpy((*alarmEnable_val_ptr_ptr), rowreq_ctx->data.alarmEnable,
+ rowreq_ctx->data.alarmEnable_len *
+ sizeof(rowreq_ctx->data.alarmEnable[0]));
+
+ return MFD_SUCCESS;
+} /* alarmEnable_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmState
+ * analogAlarmState is subid 3 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadOnly.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.3
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 1 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 0
+ *
+ * Enum range: 4/8. Values: aasNominal(1), aasHIHI(2), aasHI(3), aasLO(4), aasLOLO(5)
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
+ */
+/**
+ * Extract the current value of the analogAlarmState data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmState_val_ptr
+ * Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+analogAlarmState_get(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ u_long * analogAlarmState_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != analogAlarmState_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmState_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the analogAlarmState data.
+ * copy (* analogAlarmState_val_ptr ) from rowreq_ctx->data
+ */
+ (*analogAlarmState_val_ptr) = rowreq_ctx->data.analogAlarmState;
+
+ return MFD_SUCCESS;
+} /* analogAlarmState_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmHIHI
+ * analogAlarmHIHI is subid 4 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.4
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Extract the current value of the analogAlarmHIHI data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmHIHI_val_ptr
+ * Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+analogAlarmHIHI_get(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long *analogAlarmHIHI_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != analogAlarmHIHI_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHIHI_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the analogAlarmHIHI data.
+ * copy (* analogAlarmHIHI_val_ptr ) from rowreq_ctx->data
+ */
+ (*analogAlarmHIHI_val_ptr) = rowreq_ctx->data.analogAlarmHIHI;
+
+ return MFD_SUCCESS;
+} /* analogAlarmHIHI_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmHI
+ * analogAlarmHI is subid 5 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.5
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Extract the current value of the analogAlarmHI data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmHI_val_ptr
+ * Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+analogAlarmHI_get(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long *analogAlarmHI_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != analogAlarmHI_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHI_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the analogAlarmHI data.
+ * copy (* analogAlarmHI_val_ptr ) from rowreq_ctx->data
+ */
+ (*analogAlarmHI_val_ptr) = rowreq_ctx->data.analogAlarmHI;
+
+ return MFD_SUCCESS;
+} /* analogAlarmHI_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmLO
+ * analogAlarmLO is subid 6 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.6
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Extract the current value of the analogAlarmLO data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmLO_val_ptr
+ * Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+analogAlarmLO_get(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long *analogAlarmLO_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != analogAlarmLO_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLO_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the analogAlarmLO data.
+ * copy (* analogAlarmLO_val_ptr ) from rowreq_ctx->data
+ */
+ (*analogAlarmLO_val_ptr) = rowreq_ctx->data.analogAlarmLO;
+
+ return MFD_SUCCESS;
+} /* analogAlarmLO_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmLOLO
+ * analogAlarmLOLO is subid 7 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.7
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Extract the current value of the analogAlarmLOLO data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmLOLO_val_ptr
+ * Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+analogAlarmLOLO_get(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long *analogAlarmLOLO_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != analogAlarmLOLO_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLOLO_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the analogAlarmLOLO data.
+ * copy (* analogAlarmLOLO_val_ptr ) from rowreq_ctx->data
+ */
+ (*analogAlarmLOLO_val_ptr) = rowreq_ctx->data.analogAlarmLOLO;
+
+ return MFD_SUCCESS;
+} /* analogAlarmLOLO_get */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmDeadband
+ * analogAlarmDeadband is subid 8 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.8
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Extract the current value of the analogAlarmDeadband data.
+ *
+ * Set a value using the data context for the row.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmDeadband_val_ptr
+ * Pointer to storage for a long variable
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_SKIP : skip this node (no value for now)
+ * @retval MFD_ERROR : Any other error
+ */
+int
+analogAlarmDeadband_get(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long *analogAlarmDeadband_val_ptr)
+{
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != analogAlarmDeadband_val_ptr);
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmDeadband_get",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:231:o: |-> Extract the current value of the analogAlarmDeadband data.
+ * copy (* analogAlarmDeadband_val_ptr ) from rowreq_ctx->data
+ */
+ (*analogAlarmDeadband_val_ptr) = rowreq_ctx->data.analogAlarmDeadband;
+
+ return MFD_SUCCESS;
+} /* analogAlarmDeadband_get */
+
+
+
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.h
new file mode 100644
index 0000000000..1b9f1d05f4
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_get.h
@@ -0,0 +1,92 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12088 $ of $
+ *
+ * $Id:$
+ *
+ * @file analogPropertyTable_data_get.h
+ *
+ * @addtogroup get
+ *
+ * Prototypes for get functions
+ *
+ * @{
+ */
+#ifndef ANALOGPROPERTYTABLE_DATA_GET_H
+#define ANALOGPROPERTYTABLE_DATA_GET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ *********************************************************************
+ * GET function declarations
+ */
+
+ /*
+ *********************************************************************
+ * GET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+ /*
+ * indexes
+ */
+
+ int alarmEnable_get(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ char **alarmEnable_val_ptr_ptr,
+ size_t *alarmEnable_val_ptr_len_ptr);
+ int analogAlarmState_get(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long *
+ analogAlarmState_val_ptr);
+ int analogAlarmHIHI_get(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ long *analogAlarmHIHI_val_ptr);
+ int analogAlarmHI_get(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ long *analogAlarmHI_val_ptr);
+ int analogAlarmLO_get(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ long *analogAlarmLO_val_ptr);
+ int analogAlarmLOLO_get(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ long *analogAlarmLOLO_val_ptr);
+ int analogAlarmDeadband_get(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx,
+ long
+ *analogAlarmDeadband_val_ptr);
+
+
+ int
+ analogPropertyTable_indexes_set_tbl_idx
+ (analogPropertyTable_mib_index * tbl_idx,
+ oid * analogParameterOID_val_ptr,
+ size_t analogParameterOID_val_ptr_len);
+ int
+ analogPropertyTable_indexes_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ oid * analogParameterOID_val_ptr,
+ size_t
+ analogParameterOID_val_ptr_len);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ANALOGPROPERTYTABLE_DATA_GET_H */
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.c
new file mode 100644
index 0000000000..1b5e63b9c1
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.c
@@ -0,0 +1,1552 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12077 $ of $
+ *
+ * $Id:$
+ *
+ */
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "analogPropertyTable.h"
+
+
+/** @defgroup data_set data_set: Routines to set data
+ *
+ * These routines are used to set the value for individual objects. The
+ * row context is passed, along with the new value.
+ *
+ * @{
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+ /*
+ * NOTE: if you update this chart, please update the versions in
+ * local/mib2c-conf.d/parent-set.m2i
+ * agent/mibgroup/helpers/baby_steps.c
+ * while you're at it.
+ */
+ /*
+ ***********************************************************************
+ * Baby Steps Flow Chart (2004.06.05) *
+ * *
+ * +--------------+ +================+ U = unconditional path *
+ * |optional state| ||required state|| S = path for success *
+ * +--------------+ +================+ E = path for error *
+ ***********************************************************************
+ *
+ * +--------------+
+ * | pre |
+ * | request |
+ * +--------------+
+ * | U
+ * +==============+
+ * +----------------|| object ||
+ * | E || lookup ||
+ * | +==============+
+ * | | S
+ * | +==============+
+ * | E || check ||
+ * |<---------------|| values ||
+ * | +==============+
+ * | | S
+ * | +==============+
+ * | +<-------|| undo ||
+ * | | E || setup ||
+ * | | +==============+
+ * | | | S
+ * | | +==============+
+ * | | || set ||-------------------------->+
+ * | | || value || E |
+ * | | +==============+ |
+ * | | | S |
+ * | | +--------------+ |
+ * | | | check |-------------------------->|
+ * | | | consistency | E |
+ * | | +--------------+ |
+ * | | | S |
+ * | | +==============+ +==============+ |
+ * | | || commit ||-------->|| undo || |
+ * | | || || E || commit || |
+ * | | +==============+ +==============+ |
+ * | | | S U |<--------+
+ * | | +--------------+ +==============+
+ * | | | irreversible | || undo ||
+ * | | | commit | || set ||
+ * | | +--------------+ +==============+
+ * | | | U U |
+ * | +-------------->|<------------------------+
+ * | +==============+
+ * | || undo ||
+ * | || cleanup ||
+ * | +==============+
+ * +---------------------->| U
+ * +--------------+
+ * | post |
+ * | request |
+ * +--------------+
+ *
+ */
+
+/**
+ * Setup up context with information needed to undo a set request.
+ *
+ * This function will be called before the individual node undo setup
+ * functions are called. If you need to do any undo setup that is not
+ * related to a specific column, you can do it here.
+ *
+ * Note that the undo context has been allocated with
+ * analogPropertyTable_allocate_data(), but may need extra
+ * initialization similar to what you may have done in
+ * analogPropertyTable_rowreq_ctx_init().
+ * Note that an individual node's undo_setup function will only be called
+ * if that node is being set to a new value.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in the node's undo_setup
+ * function, so it won't be done unless it is necessary.
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ */
+int
+analogPropertyTable_undo_setup(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_undo_setup", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:451:M: |-> Setup analogPropertyTable undo.
+ * set up analogPropertyTable undo information, in preparation for a set.
+ * Undo storage is in (* analogAlarmDeadband_val_ptr )*
+ */
+
+ return rc;
+} /* analogPropertyTable_undo_setup */
+
+/**
+ * Undo a set request.
+ *
+ * This function will be called before the individual node undo
+ * functions are called. If you need to do any undo that is not
+ * related to a specific column, you can do it here.
+ *
+ * Note that an individual node's undo function will only be called
+ * if that node is being set to a new value.
+ *
+ * If there is anything specific to a particular column (e.g. releasing
+ * memory for a string), you should do that setup in the node's undo
+ * function, so it won't be done unless it is necessary.
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ */
+int
+analogPropertyTable_undo(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_undo",
+ "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:451:M: |-> analogPropertyTable undo.
+ * analogPropertyTable undo information, in response to a failed set.
+ * Undo storage is in (* analogAlarmDeadband_val_ptr )*
+ */
+
+ return rc;
+} /* analogPropertyTable_undo_setup */
+
+/**
+ * Cleanup up context undo information.
+ *
+ * This function will be called after set/commit processing. If you
+ * allocated any resources in undo_setup, this is the place to release
+ * those resources.
+ *
+ * This function is called regardless of the success or failure of the set
+ * request. If you need to perform different steps for cleanup depending
+ * on success or failure, you can add a flag to the rowreq_ctx.
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error
+ */
+int
+analogPropertyTable_undo_cleanup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_undo_cleanup", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:452:M: |-> Cleanup analogPropertyTable undo.
+ * Undo storage is in (* analogAlarmDeadband_val_ptr )*
+ */
+
+ return rc;
+} /* analogPropertyTable_undo_cleanup */
+
+/**
+ * commit new values.
+ *
+ * At this point, you should have done everything you can to ensure that
+ * this commit will not fail.
+ *
+ * Should you need different behavior depending on which columns were
+ * set, rowreq_ctx->column_set_flags will indicate which writeable columns were
+ * set. The definitions for the COLUMN_*_FLAG bits can be found in
+ * analogPropertyTable_oids.h.
+ * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
+ *
+ * @param analogPropertyTable_rowreq_ctx
+ * Pointer to the users context.
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error
+ */
+int
+analogPropertyTable_commit(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+ int save_flags;
+
+ int ret;
+
+ libspid_eoc_analog_alarm_entry_t analog_alarm_entry;
+ char oid[LIBSPID_OID_MAX_LEN];
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_commit",
+ "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /* initialize analog alarm entry */
+ memset(&analog_alarm_entry, 0, sizeof(analog_alarm_entry));
+
+ /*
+ * save flags, then clear until we actually do something
+ */
+ save_flags = rowreq_ctx->column_set_flags;
+ rowreq_ctx->column_set_flags = 0;
+
+ /*
+ * commit analogPropertyTable data
+ * 1) check the column's flag in save_flags to see if it was set.
+ * 2) clear the flag when you handle that column
+ * 3) set the column's flag in column_set_flags if it needs undo
+ * processing in case of a failure.
+ */
+ if (save_flags & COLUMN_ALARMENABLE_FLAG) {
+ save_flags &= ~COLUMN_ALARMENABLE_FLAG; /* clear alarmEnable */
+ /*
+ * set flag, in case we need to undo alarmEnable
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_ALARMENABLE_FLAG;
+ }
+
+ if (save_flags & COLUMN_ANALOGALARMHIHI_FLAG) {
+ save_flags &= ~COLUMN_ANALOGALARMHIHI_FLAG; /* clear analogAlarmHIHI */
+ /*
+ * set flag, in case we need to undo analogAlarmHIHI
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_ANALOGALARMHIHI_FLAG;
+ }
+
+ if (save_flags & COLUMN_ANALOGALARMHI_FLAG) {
+ save_flags &= ~COLUMN_ANALOGALARMHI_FLAG; /* clear analogAlarmHI */
+ /*
+ * set flag, in case we need to undo analogAlarmHI
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_ANALOGALARMHI_FLAG;
+ }
+
+ if (save_flags & COLUMN_ANALOGALARMLO_FLAG) {
+ save_flags &= ~COLUMN_ANALOGALARMLO_FLAG; /* clear analogAlarmLO */
+ /*
+ * set flag, in case we need to undo analogAlarmLO
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_ANALOGALARMLO_FLAG;
+ }
+
+ if (save_flags & COLUMN_ANALOGALARMLOLO_FLAG) {
+ save_flags &= ~COLUMN_ANALOGALARMLOLO_FLAG; /* clear analogAlarmLOLO */
+ /*
+ * set flag, in case we need to undo analogAlarmLOLO
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_ANALOGALARMLOLO_FLAG;
+ }
+
+ if (save_flags & COLUMN_ANALOGALARMDEADBAND_FLAG) {
+ save_flags &= ~COLUMN_ANALOGALARMDEADBAND_FLAG; /* clear analogAlarmDeadband */
+ /*
+ * set flag, in case we need to undo analogAlarmDeadband
+ */
+ rowreq_ctx->column_set_flags |=
+ COLUMN_ANALOGALARMDEADBAND_FLAG;
+ }
+
+ /* convert OID to string */
+ snprint_objid(oid, sizeof(oid), rowreq_ctx->tbl_idx.analogParameterOID, rowreq_ctx->tbl_idx.analogParameterOID_len);
+
+ /* read existing line from configuration file */
+ ret = libspid_eoc_analog_alarm_get(oid, &analog_alarm_entry);
+ if (LIBSPID_SUCCESS != ret){
+ syslog(LOG_DEBUG, "analogPropertyTable: libspid_eoc_analog_alarm_get error in commit\n");
+ return MFD_ERROR;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ALARMENABLE_FLAG){
+ /* set alarm enable in analog alarm entry */
+ analog_alarm_entry.enable.LOLO_alarm_enable = (rowreq_ctx->data.alarmEnable[0] & 0x01);
+ analog_alarm_entry.enable.LO_alarm_enable = (rowreq_ctx->data.alarmEnable[0] & 0x02)>>1;
+ analog_alarm_entry.enable.HI_alarm_enable = (rowreq_ctx->data.alarmEnable[0] & 0x04)>>2;
+ analog_alarm_entry.enable.HIHI_alarm_enable = (rowreq_ctx->data.alarmEnable[0] & 0x08)>>3;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMHIHI_FLAG){
+ /* set alarm HIHI threshold in analog alarm entry */
+ analog_alarm_entry.hihi = rowreq_ctx->data.analogAlarmHIHI;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMHI_FLAG){
+ /* set alarm HI threshold in analog alarm entry */
+ analog_alarm_entry.hi = rowreq_ctx->data.analogAlarmHI;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMLO_FLAG){
+ /* set alarm LO threshold in analog alarm entry */
+ analog_alarm_entry.lo = rowreq_ctx->data.analogAlarmLO;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMLOLO_FLAG){
+ /* set alarm LOLO threshold in analog alarm entry */
+ analog_alarm_entry.lolo = rowreq_ctx->data.analogAlarmLOLO;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMDEADBAND_FLAG){
+ /* set alarm deadband in analog alarm entry */
+ analog_alarm_entry.deadband = rowreq_ctx->data.analogAlarmDeadband;
+ }
+
+ /* write modified line to configuration file */
+ ret = libspid_eoc_analog_alarm_set(oid, &analog_alarm_entry);
+ if (LIBSPID_SUCCESS != ret){
+ syslog(LOG_DEBUG, "libspid_eoc_analog_alarm_set error in commit\n");
+ return MFD_ERROR;
+ } else {
+ DEBUGMSGTL(("analogPropertyTable_commit", "line succesfully written to conf file!\n"));
+ }
+
+ /*
+ * if we successfully commited this row, set the dirty flag.
+ */
+ if (MFD_SUCCESS == rc) {
+ rowreq_ctx->rowreq_flags |= MFD_ROW_DIRTY;
+ }
+
+ if (save_flags) {
+ snmp_log(LOG_ERR, "unhandled columns (0x%x) in commit\n",
+ save_flags);
+ return MFD_ERROR;
+ }
+
+ return rc;
+} /* analogPropertyTable_commit */
+
+/**
+ * undo commit new values.
+ *
+ * Should you need different behavior depending on which columns were
+ * set, rowreq_ctx->column_set_flags will indicate which writeable columns were
+ * set. The definitions for the COLUMN_*_FLAG bits can be found in
+ * analogPropertyTable_oids.h.
+ * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
+ *
+ * @param analogPropertyTable_rowreq_ctx
+ * Pointer to the users context.
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error
+ */
+int
+analogPropertyTable_undo_commit(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ int rc = MFD_SUCCESS;
+
+ int ret;
+
+ libspid_eoc_analog_alarm_entry_t analog_alarm_entry;
+ char oid[LIBSPID_OID_MAX_LEN];
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_undo_commit", "called\n"));
+
+ /** we should have a non-NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /* convert OID to string */
+ snprint_objid(oid, sizeof(oid), rowreq_ctx->tbl_idx.analogParameterOID, rowreq_ctx->tbl_idx.analogParameterOID_len);
+
+ /* read existing line from configuration file */
+ ret = libspid_eoc_analog_alarm_get(oid, &analog_alarm_entry);
+ if (LIBSPID_SUCCESS != ret){
+ syslog(LOG_DEBUG, "analogPropertyTable: libspid_eoc_analog_alarm_get error in undo\n");
+ return MFD_ERROR;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ALARMENABLE_FLAG){
+ /* set alarm enable in analog alarm entry */
+ analog_alarm_entry.enable.LOLO_alarm_enable = (rowreq_ctx->undo->alarmEnable[0] & 0x01);
+ analog_alarm_entry.enable.LO_alarm_enable = (rowreq_ctx->undo->alarmEnable[0] & 0x02)>>1;
+ analog_alarm_entry.enable.HI_alarm_enable = (rowreq_ctx->undo->alarmEnable[0] & 0x04)>>2;
+ analog_alarm_entry.enable.HIHI_alarm_enable = (rowreq_ctx->undo->alarmEnable[0] & 0x08)>>3;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMHIHI_FLAG){
+ /* set alarm HIHI threshold in analog alarm entry */
+ analog_alarm_entry.hihi = rowreq_ctx->undo->analogAlarmHIHI;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMHI_FLAG){
+ /* set alarm HI threshold in analog alarm entry */
+ analog_alarm_entry.hi = rowreq_ctx->undo->analogAlarmHI;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMLO_FLAG){
+ /* set alarm LO threshold in analog alarm entry */
+ analog_alarm_entry.lo = rowreq_ctx->undo->analogAlarmLO;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMLOLO_FLAG){
+ /* set alarm LOLO threshold in analog alarm entry */
+ analog_alarm_entry.lolo = rowreq_ctx->undo->analogAlarmLOLO;
+ }
+
+ if (rowreq_ctx->column_set_flags & COLUMN_ANALOGALARMDEADBAND_FLAG){
+ /* set alarm deadband in analog alarm entry */
+ analog_alarm_entry.deadband = rowreq_ctx->undo->analogAlarmDeadband;
+ }
+
+
+ /* write modified line to configuration file */
+ ret = libspid_eoc_analog_alarm_set(oid, &analog_alarm_entry);
+ if (LIBSPID_SUCCESS != ret){
+ syslog(LOG_DEBUG, "analogPropertyTable: libspid_eoc_analog_alarm_set error in undo\n");
+ return MFD_ERROR;
+ } else {
+ DEBUGMSGTL(("analogPropertyTable_undo_commit", "line succesfully written to conf file!\n"));
+ }
+
+ /*
+ * TODO:485:M: |-> Undo analogPropertyTable commit.
+ * check the column's flag in rowreq_ctx->column_set_flags to see
+ * if it was set during commit, then undo it.
+ *
+ * eg: if (rowreq_ctx->column_set_flags & COLUMN__FLAG) {}
+ */
+
+
+ /*
+ * if we successfully un-commited this row, clear the dirty flag.
+ */
+ if (MFD_SUCCESS == rc) {
+ rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY;
+ }
+
+ return rc;
+} /* analogPropertyTable_undo_commit */
+
+/*
+ * TODO:440:M: Implement analogPropertyTable node value checks.
+ * TODO:450:M: Implement analogPropertyTable undo functions.
+ * TODO:460:M: Implement analogPropertyTable set functions.
+ * TODO:480:M: Implement analogPropertyTable commit functions.
+ */
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.alarmEnable
+ * alarmEnable is subid 2 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.2
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 1 hashint 0
+ * settable 1
+ *
+ * Ranges: 1;
+ *
+ * Its syntax is OCTETSTR (based on perltype OCTETSTR)
+ * The net-snmp type is ASN_OCTET_STR. The C type decl is char (char)
+ * This data type requires a length. (Max 1)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param alarmEnable_val_ptr
+ * A char containing the new value.
+ * @param alarmEnable_val_ptr_len
+ * The size (in bytes) of the data pointed to by alarmEnable_val_ptr
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * analogPropertyTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_OCTET_STR
+ * The length is < sizeof(rowreq_ctx->data.alarmEnable).
+ * The length is in (one of) the range set(s): 1
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+alarmEnable_check_value(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ char *alarmEnable_val_ptr,
+ size_t alarmEnable_val_ptr_len)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:alarmEnable_check_value",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+ netsnmp_assert(NULL != alarmEnable_val_ptr);
+
+ /*
+ * TODO:441:o: |-> Check for valid alarmEnable value.
+ */
+ /* check that proposed analog alarm enable value is below maximum */
+ if (( alarmEnable_val_ptr[0] > LIBSPID_ANALOG_ALARM_ENABLE_MAX))
+ {
+ return SNMP_ERR_WRONGVALUE;
+ }
+
+ return MFD_SUCCESS; /* alarmEnable value not illegal */
+} /* alarmEnable_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * analogPropertyTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+alarmEnable_undo_setup(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:alarmEnable_undo_setup",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup alarmEnable undo.
+ */
+ /*
+ * copy alarmEnable and alarmEnable_len data
+ * set rowreq_ctx->undo->alarmEnable from rowreq_ctx->data.alarmEnable
+ */
+ memcpy(rowreq_ctx->undo->alarmEnable, rowreq_ctx->data.alarmEnable,
+ (rowreq_ctx->data.alarmEnable_len *
+ sizeof(rowreq_ctx->undo->alarmEnable[0])));
+ rowreq_ctx->undo->alarmEnable_len = rowreq_ctx->data.alarmEnable_len;
+
+
+ return MFD_SUCCESS;
+} /* alarmEnable_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param alarmEnable_val_ptr
+ * A char containing the new value.
+ * @param alarmEnable_val_ptr_len
+ * The size (in bytes) of the data pointed to by alarmEnable_val_ptr
+ */
+int
+alarmEnable_set(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ char *alarmEnable_val_ptr, size_t alarmEnable_val_ptr_len)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:alarmEnable_set",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+ netsnmp_assert(NULL != alarmEnable_val_ptr);
+
+ /*
+ * TODO:461:M: |-> Set alarmEnable value.
+ * set alarmEnable value in rowreq_ctx->data
+ */
+ memcpy(rowreq_ctx->data.alarmEnable, alarmEnable_val_ptr,
+ alarmEnable_val_ptr_len);
+ /** convert bytes to number of char */
+ rowreq_ctx->data.alarmEnable_len =
+ alarmEnable_val_ptr_len / sizeof(alarmEnable_val_ptr[0]);
+
+ return MFD_SUCCESS;
+} /* alarmEnable_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+alarmEnable_undo(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:alarmEnable_undo",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up alarmEnable undo.
+ */
+ /*
+ * copy alarmEnable and alarmEnable_len data
+ * set rowreq_ctx->data.alarmEnable from rowreq_ctx->undo->alarmEnable
+ */
+ memcpy(rowreq_ctx->data.alarmEnable, rowreq_ctx->undo->alarmEnable,
+ (rowreq_ctx->undo->alarmEnable_len *
+ sizeof(rowreq_ctx->data.alarmEnable[0])));
+ rowreq_ctx->data.alarmEnable_len = rowreq_ctx->undo->alarmEnable_len;
+
+
+ return MFD_SUCCESS;
+} /* alarmEnable_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmHIHI
+ * analogAlarmHIHI is subid 4 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.4
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmHIHI_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * analogPropertyTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+analogAlarmHIHI_check_value(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmHIHI_val)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHIHI_check_value",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid analogAlarmHIHI value.
+ */
+
+ return MFD_SUCCESS; /* analogAlarmHIHI value not illegal */
+} /* analogAlarmHIHI_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * analogPropertyTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+analogAlarmHIHI_undo_setup(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHIHI_undo_setup",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup analogAlarmHIHI undo.
+ */
+ /*
+ * copy analogAlarmHIHI data
+ * set rowreq_ctx->undo->analogAlarmHIHI from rowreq_ctx->data.analogAlarmHIHI
+ */
+ rowreq_ctx->undo->analogAlarmHIHI = rowreq_ctx->data.analogAlarmHIHI;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmHIHI_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param analogAlarmHIHI_val
+ * A long containing the new value.
+ */
+int
+analogAlarmHIHI_set(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmHIHI_val)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHIHI_set",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set analogAlarmHIHI value.
+ * set analogAlarmHIHI value in rowreq_ctx->data
+ */
+ rowreq_ctx->data.analogAlarmHIHI = analogAlarmHIHI_val;
+
+ return MFD_SUCCESS;
+} /* analogAlarmHIHI_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+analogAlarmHIHI_undo(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHIHI_undo",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up analogAlarmHIHI undo.
+ */
+ /*
+ * copy analogAlarmHIHI data
+ * set rowreq_ctx->data.analogAlarmHIHI from rowreq_ctx->undo->analogAlarmHIHI
+ */
+ rowreq_ctx->data.analogAlarmHIHI = rowreq_ctx->undo->analogAlarmHIHI;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmHIHI_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmHI
+ * analogAlarmHI is subid 5 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.5
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmHI_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * analogPropertyTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+analogAlarmHI_check_value(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmHI_val)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHI_check_value",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid analogAlarmHI value.
+ */
+
+ return MFD_SUCCESS; /* analogAlarmHI value not illegal */
+} /* analogAlarmHI_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * analogPropertyTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+analogAlarmHI_undo_setup(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHI_undo_setup",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup analogAlarmHI undo.
+ */
+ /*
+ * copy analogAlarmHI data
+ * set rowreq_ctx->undo->analogAlarmHI from rowreq_ctx->data.analogAlarmHI
+ */
+ rowreq_ctx->undo->analogAlarmHI = rowreq_ctx->data.analogAlarmHI;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmHI_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param analogAlarmHI_val
+ * A long containing the new value.
+ */
+int
+analogAlarmHI_set(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmHI_val)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHI_set",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set analogAlarmHI value.
+ * set analogAlarmHI value in rowreq_ctx->data
+ */
+ rowreq_ctx->data.analogAlarmHI = analogAlarmHI_val;
+
+ return MFD_SUCCESS;
+} /* analogAlarmHI_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+analogAlarmHI_undo(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmHI_undo",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up analogAlarmHI undo.
+ */
+ /*
+ * copy analogAlarmHI data
+ * set rowreq_ctx->data.analogAlarmHI from rowreq_ctx->undo->analogAlarmHI
+ */
+ rowreq_ctx->data.analogAlarmHI = rowreq_ctx->undo->analogAlarmHI;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmHI_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmLO
+ * analogAlarmLO is subid 6 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.6
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmLO_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * analogPropertyTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+analogAlarmLO_check_value(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmLO_val)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLO_check_value",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid analogAlarmLO value.
+ */
+
+ return MFD_SUCCESS; /* analogAlarmLO value not illegal */
+} /* analogAlarmLO_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * analogPropertyTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+analogAlarmLO_undo_setup(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLO_undo_setup",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup analogAlarmLO undo.
+ */
+ /*
+ * copy analogAlarmLO data
+ * set rowreq_ctx->undo->analogAlarmLO from rowreq_ctx->data.analogAlarmLO
+ */
+ rowreq_ctx->undo->analogAlarmLO = rowreq_ctx->data.analogAlarmLO;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmLO_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param analogAlarmLO_val
+ * A long containing the new value.
+ */
+int
+analogAlarmLO_set(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmLO_val)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLO_set",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set analogAlarmLO value.
+ * set analogAlarmLO value in rowreq_ctx->data
+ */
+ rowreq_ctx->data.analogAlarmLO = analogAlarmLO_val;
+
+ return MFD_SUCCESS;
+} /* analogAlarmLO_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+analogAlarmLO_undo(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLO_undo",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up analogAlarmLO undo.
+ */
+ /*
+ * copy analogAlarmLO data
+ * set rowreq_ctx->data.analogAlarmLO from rowreq_ctx->undo->analogAlarmLO
+ */
+ rowreq_ctx->data.analogAlarmLO = rowreq_ctx->undo->analogAlarmLO;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmLO_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmLOLO
+ * analogAlarmLOLO is subid 7 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.7
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmLOLO_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * analogPropertyTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+analogAlarmLOLO_check_value(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmLOLO_val)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLOLO_check_value",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid analogAlarmLOLO value.
+ */
+
+ return MFD_SUCCESS; /* analogAlarmLOLO value not illegal */
+} /* analogAlarmLOLO_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * analogPropertyTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+analogAlarmLOLO_undo_setup(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLOLO_undo_setup",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup analogAlarmLOLO undo.
+ */
+ /*
+ * copy analogAlarmLOLO data
+ * set rowreq_ctx->undo->analogAlarmLOLO from rowreq_ctx->data.analogAlarmLOLO
+ */
+ rowreq_ctx->undo->analogAlarmLOLO = rowreq_ctx->data.analogAlarmLOLO;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmLOLO_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param analogAlarmLOLO_val
+ * A long containing the new value.
+ */
+int
+analogAlarmLOLO_set(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmLOLO_val)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLOLO_set",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set analogAlarmLOLO value.
+ * set analogAlarmLOLO value in rowreq_ctx->data
+ */
+ rowreq_ctx->data.analogAlarmLOLO = analogAlarmLOLO_val;
+
+ return MFD_SUCCESS;
+} /* analogAlarmLOLO_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+analogAlarmLOLO_undo(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmLOLO_undo",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up analogAlarmLOLO undo.
+ */
+ /*
+ * copy analogAlarmLOLO data
+ * set rowreq_ctx->data.analogAlarmLOLO from rowreq_ctx->undo->analogAlarmLOLO
+ */
+ rowreq_ctx->data.analogAlarmLOLO = rowreq_ctx->undo->analogAlarmLOLO;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmLOLO_undo */
+
+/*---------------------------------------------------------------------
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyEntry.analogAlarmDeadband
+ * analogAlarmDeadband is subid 8 of analogPropertyEntry.
+ * Its status is Mandatory, and its access level is ReadWrite.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1.1.8
+ * Description:
+
+ *
+ * Attributes:
+ * accessible 1 isscalar 0 enums 0 hasdefval 0
+ * readable 1 iscolumn 1 ranges 0 hashint 0
+ * settable 1
+ *
+ *
+ * Its syntax is INTEGER (based on perltype INTEGER)
+ * The net-snmp type is ASN_INTEGER. The C type decl is long (long)
+ */
+/**
+ * Check that the proposed new value is potentially valid.
+ *
+ * @param rowreq_ctx
+ * Pointer to the row request context.
+ * @param analogAlarmDeadband_val
+ * A long containing the new value.
+ *
+ * @retval MFD_SUCCESS : incoming value is legal
+ * @retval MFD_NOT_VALID_NOW : incoming value is not valid now
+ * @retval MFD_NOT_VALID_EVER : incoming value is never valid
+ *
+ * This is the place to check for requirements that are not
+ * expressed in the mib syntax (for example, a requirement that
+ * is detailed in the description for an object).
+ *
+ * You should check that the requested change between the undo value and the
+ * new value is legal (ie, the transistion from one value to another
+ * is legal).
+ *
+ *@note
+ * This check is only to determine if the new value
+ * is \b potentially valid. This is the first check of many, and
+ * is one of the simplest ones.
+ *
+ *@note
+ * this is not the place to do any checks for values
+ * which depend on some other value in the mib. Those
+ * types of checks should be done in the
+ * analogPropertyTable_check_dependencies() function.
+ *
+ * The following checks have already been done for you:
+ * The syntax is ASN_INTEGER
+ *
+ * If there a no other checks you need to do, simply return MFD_SUCCESS.
+ *
+ */
+int
+analogAlarmDeadband_check_value(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, long analogAlarmDeadband_val)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmDeadband_check_value", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:441:o: |-> Check for valid analogAlarmDeadband value.
+ */
+
+ return MFD_SUCCESS; /* analogAlarmDeadband value not illegal */
+} /* analogAlarmDeadband_check_value */
+
+/**
+ * Save old value information
+ *
+ * @param rowreq_ctx
+ * Pointer to the table context (analogPropertyTable_rowreq_ctx)
+ *
+ * @retval MFD_SUCCESS : success
+ * @retval MFD_ERROR : error. set will fail.
+ *
+ * This function will be called after the table level undo setup function
+ * analogPropertyTable_undo_setup has been called.
+ *
+ *@note
+ * this function will only be called if a new value is set for this column.
+ *
+ * If there is any setup specific to a particular column (e.g. allocating
+ * memory for a string), you should do that setup in this function, so it
+ * won't be done unless it is necessary.
+ */
+int
+analogAlarmDeadband_undo_setup(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmDeadband_undo_setup", "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:455:o: |-> Setup analogAlarmDeadband undo.
+ */
+ /*
+ * copy analogAlarmDeadband data
+ * set rowreq_ctx->undo->analogAlarmDeadband from rowreq_ctx->data.analogAlarmDeadband
+ */
+ rowreq_ctx->undo->analogAlarmDeadband =
+ rowreq_ctx->data.analogAlarmDeadband;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmDeadband_undo_setup */
+
+/**
+ * Set the new value.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context. You should know how to
+ * manipulate the value from this object.
+ * @param analogAlarmDeadband_val
+ * A long containing the new value.
+ */
+int
+analogAlarmDeadband_set(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ long analogAlarmDeadband_val)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmDeadband_set",
+ "called\n"));
+
+ /** should never get a NULL pointer */
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:461:M: |-> Set analogAlarmDeadband value.
+ * set analogAlarmDeadband value in rowreq_ctx->data
+ */
+ rowreq_ctx->data.analogAlarmDeadband = analogAlarmDeadband_val;
+
+ return MFD_SUCCESS;
+} /* analogAlarmDeadband_set */
+
+/**
+ * undo the previous set.
+ *
+ * @param rowreq_ctx
+ * Pointer to the users context.
+ */
+int
+analogAlarmDeadband_undo(analogPropertyTable_rowreq_ctx * rowreq_ctx)
+{
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogAlarmDeadband_undo",
+ "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * TODO:456:o: |-> Clean up analogAlarmDeadband undo.
+ */
+ /*
+ * copy analogAlarmDeadband data
+ * set rowreq_ctx->data.analogAlarmDeadband from rowreq_ctx->undo->analogAlarmDeadband
+ */
+ rowreq_ctx->data.analogAlarmDeadband =
+ rowreq_ctx->undo->analogAlarmDeadband;
+
+
+ return MFD_SUCCESS;
+} /* analogAlarmDeadband_undo */
+
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.h
new file mode 100644
index 0000000000..7a1581ba39
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_data_set.h
@@ -0,0 +1,145 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 12077 $ of $
+ *
+ * $Id:$
+ */
+#ifndef ANALOGPROPERTYTABLE_DATA_SET_H
+#define ANALOGPROPERTYTABLE_DATA_SET_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ *********************************************************************
+ * SET function declarations
+ */
+
+ /*
+ *********************************************************************
+ * SET Table declarations
+ */
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+ /*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+
+
+ int
+ analogPropertyTable_undo_setup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int
+ analogPropertyTable_undo_cleanup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int analogPropertyTable_undo(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx);
+ int
+ analogPropertyTable_commit(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int
+ analogPropertyTable_undo_commit(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+
+ int alarmEnable_check_value(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx,
+ char *alarmEnable_val_ptr,
+ size_t
+ alarmEnable_val_ptr_len);
+ int alarmEnable_undo_setup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int alarmEnable_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, char *alarmEnable_val_ptr,
+ size_t alarmEnable_val_ptr_len);
+ int alarmEnable_undo(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int
+ analogAlarmState_check_value(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long analogAlarmState_val);
+ int
+ analogAlarmState_undo_setup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int analogAlarmState_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ u_long analogAlarmState_val);
+ int analogAlarmState_undo(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int
+ analogAlarmHIHI_check_value(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, long analogAlarmHIHI_val);
+ int
+ analogAlarmHIHI_undo_setup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int analogAlarmHIHI_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ long analogAlarmHIHI_val);
+ int analogAlarmHIHI_undo(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int
+ analogAlarmHI_check_value(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, long analogAlarmHI_val);
+ int analogAlarmHI_undo_setup(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx);
+ int analogAlarmHI_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, long analogAlarmHI_val);
+ int analogAlarmHI_undo(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int
+ analogAlarmLO_check_value(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, long analogAlarmLO_val);
+ int analogAlarmLO_undo_setup(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx);
+ int analogAlarmLO_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, long analogAlarmLO_val);
+ int analogAlarmLO_undo(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int
+ analogAlarmLOLO_check_value(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, long analogAlarmLOLO_val);
+ int
+ analogAlarmLOLO_undo_setup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int analogAlarmLOLO_set(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ long analogAlarmLOLO_val);
+ int analogAlarmLOLO_undo(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+
+ int
+ analogAlarmDeadband_check_value(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx,
+ long analogAlarmDeadband_val);
+ int
+ analogAlarmDeadband_undo_setup(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx);
+ int analogAlarmDeadband_set(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx,
+ long analogAlarmDeadband_val);
+ int analogAlarmDeadband_undo(analogPropertyTable_rowreq_ctx
+ * rowreq_ctx);
+
+
+ int
+ analogPropertyTable_check_dependencies
+ (analogPropertyTable_rowreq_ctx * ctx);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ANALOGPROPERTYTABLE_DATA_SET_H */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_enums.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_enums.h
new file mode 100644
index 0000000000..a46d9fcae9
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_enums.h
@@ -0,0 +1,58 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * : generic-table-enums.m2c 12526 2005-07-15 22:41:16Z rstory $
+ *
+ * $Id:$
+ */
+#ifndef ANALOGPROPERTYTABLE_ENUMS_H
+#define ANALOGPROPERTYTABLE_ENUMS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /*
+ * NOTES on enums
+ * ==============
+ *
+ * Value Mapping
+ * -------------
+ * If the values for your data type don't exactly match the
+ * possible values defined by the mib, you should map them
+ * below. For example, a boolean flag (1/0) is usually represented
+ * as a TruthValue in a MIB, which maps to the values (1/2).
+ *
+ */
+/*************************************************************************
+ *************************************************************************
+ *
+ * enum definitions for table analogPropertyTable
+ *
+ *************************************************************************
+ *************************************************************************/
+
+/*************************************************************
+ * constants for enums for the MIB node
+ * analogAlarmState (INTEGER / ASN_INTEGER)
+ *
+ * since a Textual Convention may be referenced more than once in a
+ * MIB, protect againt redefinitions of the enum values.
+ */
+#ifndef ANALOGALARMSTATE_ENUMS
+#define ANALOGALARMSTATE_ENUMS
+
+#define ANALOGALARMSTATE_AASNOMINAL 1
+#define ANALOGALARMSTATE_AASHIHI 2
+#define ANALOGALARMSTATE_AASHI 3
+#define ANALOGALARMSTATE_AASLO 4
+#define ANALOGALARMSTATE_AASLOLO 5
+
+#endif /* ANALOGALARMSTATE_ENUMS */
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ANALOGPROPERTYTABLE_ENUMS_H */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.c
new file mode 100644
index 0000000000..efd4c7a040
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.c
@@ -0,0 +1,1879 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 15899 $ of $
+ *
+ * $Id:$
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * *** ***
+ * *** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***
+ * *** ***
+ * *** ***
+ * *** THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE. ***
+ * *** ***
+ * *** ***
+ * *** THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND ***
+ * *** ***
+ * *** ***
+ * *** IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES. ***
+ * *** ***
+ * *** ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+
+/*
+ * standard Net-SNMP includes
+ */
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+
+/*
+ * include our parent header
+ */
+#include "analogPropertyTable.h"
+
+
+#include <net-snmp/agent/table_container.h>
+#include <net-snmp/library/container.h>
+
+#include "analogPropertyTable_interface.h"
+
+#include <ctype.h>
+
+/**********************************************************************
+ **********************************************************************
+ ***
+ *** Table analogPropertyTable
+ ***
+ **********************************************************************
+ **********************************************************************/
+/*
+ * NSCRTV-EPONEOC-PROPERTY-MIB::analogPropertyTable is subid 1 of propertyIdent.
+ * Its status is Mandatory.
+ * OID: .1.3.6.1.4.1.17409.2.2.1.1, length: 11
+ */
+typedef struct analogPropertyTable_interface_ctx_s {
+
+ netsnmp_container *container;
+ netsnmp_cache *cache;
+
+ analogPropertyTable_registration *user_ctx;
+
+ netsnmp_table_registration_info tbl_info;
+
+ netsnmp_baby_steps_access_methods access_multiplexer;
+
+ u_int table_dirty;
+
+} analogPropertyTable_interface_ctx;
+
+static analogPropertyTable_interface_ctx analogPropertyTable_if_ctx;
+
+static void
+_analogPropertyTable_container_init(analogPropertyTable_interface_ctx *
+ if_ctx);
+static void
+_analogPropertyTable_container_shutdown(analogPropertyTable_interface_ctx *
+ if_ctx);
+
+
+netsnmp_container *
+analogPropertyTable_container_get(void)
+{
+ return analogPropertyTable_if_ctx.container;
+}
+
+analogPropertyTable_registration *
+analogPropertyTable_registration_get(void)
+{
+ return analogPropertyTable_if_ctx.user_ctx;
+}
+
+analogPropertyTable_registration *
+analogPropertyTable_registration_set(analogPropertyTable_registration *
+ newreg)
+{
+ analogPropertyTable_registration *old =
+ analogPropertyTable_if_ctx.user_ctx;
+ analogPropertyTable_if_ctx.user_ctx = newreg;
+ return old;
+}
+
+int
+analogPropertyTable_container_size(void)
+{
+ return CONTAINER_SIZE(analogPropertyTable_if_ctx.container);
+}
+
+u_int
+analogPropertyTable_dirty_get(void)
+{
+ return analogPropertyTable_if_ctx.table_dirty;
+}
+
+void
+analogPropertyTable_dirty_set(u_int status)
+{
+ DEBUGMSGTL(("analogPropertyTable:analogPropertyTable_dirty_set",
+ "called. was %d, now %d\n",
+ analogPropertyTable_if_ctx.table_dirty, status));
+ analogPropertyTable_if_ctx.table_dirty = status;
+}
+
+/*
+ * mfd multiplexer modes
+ */
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_pre_request;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_post_request;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_object_lookup;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_get_values;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_check_objects;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_undo_setup;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_set_values;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_undo_cleanup;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_undo_values;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_commit;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_undo_commit;
+static Netsnmp_Node_Handler _mfd_analogPropertyTable_irreversible_commit;
+
+NETSNMP_STATIC_INLINE int
+_analogPropertyTable_undo_column(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, netsnmp_variable_list * var,
+ int column);
+
+analogPropertyTable_data *analogPropertyTable_allocate_data(void);
+
+/**
+ * @internal
+ * Initialize the table analogPropertyTable
+ * (Define its contents and how it's structured)
+ */
+void
+_analogPropertyTable_initialize_interface(analogPropertyTable_registration
+ * reg_ptr, u_long flags)
+{
+ netsnmp_baby_steps_access_methods *access_multiplexer =
+ &analogPropertyTable_if_ctx.access_multiplexer;
+ netsnmp_table_registration_info *tbl_info =
+ &analogPropertyTable_if_ctx.tbl_info;
+ netsnmp_handler_registration *reginfo;
+ netsnmp_mib_handler *handler;
+ int mfd_modes = 0;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_analogPropertyTable_initialize_interface", "called\n"));
+
+
+ /*************************************************
+ *
+ * save interface context for analogPropertyTable
+ */
+ /*
+ * Setting up the table's definition
+ */
+ netsnmp_table_helper_add_indexes(tbl_info, ASN_OBJECT_ID,
+ /** index: analogParameterOID */
+ 0);
+
+ /*
+ * Define the minimum and maximum accessible columns. This
+ * optimizes retrival.
+ */
+ tbl_info->min_column = ANALOGPROPERTYTABLE_MIN_COL;
+ tbl_info->max_column = ANALOGPROPERTYTABLE_MAX_COL;
+
+ /*
+ * save users context
+ */
+ analogPropertyTable_if_ctx.user_ctx = reg_ptr;
+
+ /*
+ * call data access initialization code
+ */
+ analogPropertyTable_init_data(reg_ptr);
+
+ /*
+ * set up the container
+ */
+ _analogPropertyTable_container_init(&analogPropertyTable_if_ctx);
+ if (NULL == analogPropertyTable_if_ctx.container) {
+ snmp_log(LOG_ERR,
+ "could not initialize container for analogPropertyTable\n");
+ return;
+ }
+
+ /*
+ * access_multiplexer: REQUIRED wrapper for get request handling
+ */
+ access_multiplexer->object_lookup =
+ _mfd_analogPropertyTable_object_lookup;
+ access_multiplexer->get_values = _mfd_analogPropertyTable_get_values;
+
+ /*
+ * no wrappers yet
+ */
+ access_multiplexer->pre_request = _mfd_analogPropertyTable_pre_request;
+ access_multiplexer->post_request =
+ _mfd_analogPropertyTable_post_request;
+
+
+ /*
+ * REQUIRED wrappers for set request handling
+ */
+ access_multiplexer->object_syntax_checks =
+ _mfd_analogPropertyTable_check_objects;
+ access_multiplexer->undo_setup = _mfd_analogPropertyTable_undo_setup;
+ access_multiplexer->undo_cleanup =
+ _mfd_analogPropertyTable_undo_cleanup;
+ access_multiplexer->set_values = _mfd_analogPropertyTable_set_values;
+ access_multiplexer->undo_sets = _mfd_analogPropertyTable_undo_values;
+
+ /*
+ * no wrappers yet
+ */
+ access_multiplexer->commit = _mfd_analogPropertyTable_commit;
+ access_multiplexer->undo_commit = _mfd_analogPropertyTable_undo_commit;
+ access_multiplexer->irreversible_commit =
+ _mfd_analogPropertyTable_irreversible_commit;
+
+ /*************************************************
+ *
+ * Create a registration, save our reg data, register table.
+ */
+ DEBUGMSGTL(("analogPropertyTable:init_analogPropertyTable",
+ "Registering analogPropertyTable as a mibs-for-dummies table.\n"));
+ handler =
+ netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
+ reginfo =
+ netsnmp_handler_registration_create("analogPropertyTable", handler,
+ analogPropertyTable_oid,
+ analogPropertyTable_oid_size,
+ HANDLER_CAN_BABY_STEP |
+ HANDLER_CAN_RWRITE);
+ if (NULL == reginfo) {
+ snmp_log(LOG_ERR, "error registering table analogPropertyTable\n");
+ return;
+ }
+ reginfo->my_reg_void = &analogPropertyTable_if_ctx;
+
+ /*************************************************
+ *
+ * set up baby steps handler, create it and inject it
+ */
+ if (access_multiplexer->object_lookup)
+ mfd_modes |= BABY_STEP_OBJECT_LOOKUP;
+ if (access_multiplexer->set_values)
+ mfd_modes |= BABY_STEP_SET_VALUES;
+ if (access_multiplexer->irreversible_commit)
+ mfd_modes |= BABY_STEP_IRREVERSIBLE_COMMIT;
+ if (access_multiplexer->object_syntax_checks)
+ mfd_modes |= BABY_STEP_CHECK_OBJECT;
+
+ if (access_multiplexer->pre_request)
+ mfd_modes |= BABY_STEP_PRE_REQUEST;
+ if (access_multiplexer->post_request)
+ mfd_modes |= BABY_STEP_POST_REQUEST;
+
+ if (access_multiplexer->undo_setup)
+ mfd_modes |= BABY_STEP_UNDO_SETUP;
+ if (access_multiplexer->undo_cleanup)
+ mfd_modes |= BABY_STEP_UNDO_CLEANUP;
+ if (access_multiplexer->undo_sets)
+ mfd_modes |= BABY_STEP_UNDO_SETS;
+
+ if (access_multiplexer->row_creation)
+ mfd_modes |= BABY_STEP_ROW_CREATE;
+ if (access_multiplexer->consistency_checks)
+ mfd_modes |= BABY_STEP_CHECK_CONSISTENCY;
+ if (access_multiplexer->commit)
+ mfd_modes |= BABY_STEP_COMMIT;
+ if (access_multiplexer->undo_commit)
+ mfd_modes |= BABY_STEP_UNDO_COMMIT;
+
+ handler = netsnmp_baby_steps_handler_get(mfd_modes);
+ netsnmp_inject_handler(reginfo, handler);
+
+ /*************************************************
+ *
+ * inject row_merge helper with prefix rootoid_len + 2 (entry.col)
+ */
+ handler = netsnmp_get_row_merge_handler(reginfo->rootoid_len + 2);
+ netsnmp_inject_handler(reginfo, handler);
+
+ /*************************************************
+ *
+ * inject container_table helper
+ */
+ handler =
+ netsnmp_container_table_handler_get(tbl_info,
+ analogPropertyTable_if_ctx.
+ container,
+ TABLE_CONTAINER_KEY_NETSNMP_INDEX);
+ netsnmp_inject_handler(reginfo, handler);
+
+ /*************************************************
+ *
+ * inject cache helper
+ */
+ if (NULL != analogPropertyTable_if_ctx.cache) {
+ handler =
+ netsnmp_cache_handler_get(analogPropertyTable_if_ctx.cache);
+ netsnmp_inject_handler(reginfo, handler);
+ }
+
+ /*
+ * register table
+ */
+ netsnmp_register_table(reginfo, tbl_info);
+
+} /* _analogPropertyTable_initialize_interface */
+
+/**
+ * @internal
+ * Shutdown the table analogPropertyTable
+ */
+void
+_analogPropertyTable_shutdown_interface(analogPropertyTable_registration *
+ reg_ptr)
+{
+ /*
+ * shutdown the container
+ */
+ _analogPropertyTable_container_shutdown(&analogPropertyTable_if_ctx);
+}
+
+void
+analogPropertyTable_valid_columns_set(netsnmp_column_info *vc)
+{
+ analogPropertyTable_if_ctx.tbl_info.valid_columns = vc;
+} /* analogPropertyTable_valid_columns_set */
+
+/**
+ * @internal
+ * convert the index component stored in the context to an oid
+ */
+int
+analogPropertyTable_index_to_oid(netsnmp_index * oid_idx,
+ analogPropertyTable_mib_index * mib_idx)
+{
+ int err = SNMP_ERR_NOERROR;
+
+ /*
+ * temp storage for parsing indexes
+ */
+ /*
+ * analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ netsnmp_variable_list var_analogParameterOID;
+
+ /*
+ * set up varbinds
+ */
+ memset(&var_analogParameterOID, 0x00, sizeof(var_analogParameterOID));
+ var_analogParameterOID.type = ASN_OBJECT_ID;
+
+ /*
+ * chain temp index varbinds together
+ */
+ var_analogParameterOID.next_variable = NULL;
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_index_to_oid", "called\n"));
+
+ /*
+ * analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ snmp_set_var_value(&var_analogParameterOID,
+ (u_char *) & mib_idx->analogParameterOID,
+ mib_idx->analogParameterOID_len *
+ sizeof(mib_idx->analogParameterOID[0]));
+
+
+ err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len,
+ NULL, 0, &var_analogParameterOID);
+ if (err)
+ snmp_log(LOG_ERR, "error %d converting index to oid\n", err);
+
+ /*
+ * parsing may have allocated memory. free it.
+ */
+ snmp_reset_var_buffers(&var_analogParameterOID);
+
+ return err;
+} /* analogPropertyTable_index_to_oid */
+
+/**
+ * extract analogPropertyTable indexes from a netsnmp_index
+ *
+ * @retval SNMP_ERR_NOERROR : no error
+ * @retval SNMP_ERR_GENERR : error
+ */
+int
+analogPropertyTable_index_from_oid(netsnmp_index * oid_idx,
+ analogPropertyTable_mib_index * mib_idx)
+{
+ int err = SNMP_ERR_NOERROR;
+
+ /*
+ * temp storage for parsing indexes
+ */
+ /*
+ * analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ netsnmp_variable_list var_analogParameterOID;
+
+ /*
+ * set up varbinds
+ */
+ memset(&var_analogParameterOID, 0x00, sizeof(var_analogParameterOID));
+ var_analogParameterOID.type = ASN_OBJECT_ID;
+
+ /*
+ * chain temp index varbinds together
+ */
+ var_analogParameterOID.next_variable = NULL;
+
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_index_from_oid", "called\n"));
+
+ /*
+ * parse the oid into the individual index components
+ */
+ err = parse_oid_indexes(oid_idx->oids, oid_idx->len,
+ &var_analogParameterOID);
+ if (err == SNMP_ERR_NOERROR) {
+ /*
+ * copy out values
+ */
+ /*
+ * NOTE: val_len is in bytes, analogParameterOID_len might not be
+ */
+ if (var_analogParameterOID.val_len >
+ sizeof(mib_idx->analogParameterOID))
+ err = SNMP_ERR_GENERR;
+ else {
+ memcpy(mib_idx->analogParameterOID,
+ var_analogParameterOID.val.string,
+ var_analogParameterOID.val_len);
+ mib_idx->analogParameterOID_len =
+ var_analogParameterOID.val_len /
+ sizeof(mib_idx->analogParameterOID[0]);
+ }
+
+
+ }
+
+ /*
+ * parsing may have allocated memory. free it.
+ */
+ snmp_reset_var_buffers(&var_analogParameterOID);
+
+ return err;
+} /* analogPropertyTable_index_from_oid */
+
+
+/*
+ * analogPropertyTable_allocate_data
+ *
+ * Purpose: create new analogPropertyTable_data.
+ */
+analogPropertyTable_data *
+analogPropertyTable_allocate_data(void)
+{
+ analogPropertyTable_data *rtn =
+ SNMP_MALLOC_TYPEDEF(analogPropertyTable_data);
+
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_allocate_data", "called\n"));
+
+ if (NULL == rtn) {
+ snmp_log(LOG_ERR, "unable to malloc memory for new "
+ "analogPropertyTable_data.\n");
+ }
+
+ return rtn;
+} /* analogPropertyTable_allocate_data */
+
+/*
+ * analogPropertyTable_release_data
+ *
+ * Purpose: release analogPropertyTable data.
+ */
+void
+analogPropertyTable_release_data(analogPropertyTable_data * data)
+{
+ DEBUGMSGTL(("verbose:analogPropertyTable:analogPropertyTable_release_data", "called\n"));
+
+ free(data);
+} /* analogPropertyTable_release_data */
+
+/*
+ *********************************************************************
+ * @internal
+ * allocate resources for a analogPropertyTable_rowreq_ctx
+ */
+analogPropertyTable_rowreq_ctx *
+analogPropertyTable_allocate_rowreq_ctx(void *user_init_ctx)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ SNMP_MALLOC_TYPEDEF(analogPropertyTable_rowreq_ctx);
+
+ DEBUGMSGTL(("internal:analogPropertyTable:analogPropertyTable_allocate_rowreq_ctx", "called\n"));
+
+ if (NULL == rowreq_ctx) {
+ snmp_log(LOG_ERR, "Couldn't allocate memory for a "
+ "analogPropertyTable_rowreq_ctx.\n");
+ return NULL;
+ }
+
+ rowreq_ctx->oid_idx.oids = rowreq_ctx->oid_tmp;
+
+ rowreq_ctx->analogPropertyTable_data_list = NULL;
+
+ /*
+ * if we allocated data, call init routine
+ */
+ if (!(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER)) {
+ if (SNMPERR_SUCCESS !=
+ analogPropertyTable_rowreq_ctx_init(rowreq_ctx,
+ user_init_ctx)) {
+ analogPropertyTable_release_rowreq_ctx(rowreq_ctx);
+ rowreq_ctx = NULL;
+ }
+ }
+
+ return rowreq_ctx;
+} /* analogPropertyTable_allocate_rowreq_ctx */
+
+/*
+ * @internal
+ * release resources for a analogPropertyTable_rowreq_ctx
+ */
+void
+analogPropertyTable_release_rowreq_ctx(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx)
+{
+ DEBUGMSGTL(("internal:analogPropertyTable:analogPropertyTable_release_rowreq_ctx", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ analogPropertyTable_rowreq_ctx_cleanup(rowreq_ctx);
+
+ if (rowreq_ctx->undo)
+ analogPropertyTable_release_data(rowreq_ctx->undo);
+
+ /*
+ * free index oid pointer
+ */
+ if (rowreq_ctx->oid_idx.oids != rowreq_ctx->oid_tmp)
+ free(rowreq_ctx->oid_idx.oids);
+
+ SNMP_FREE(rowreq_ctx);
+} /* analogPropertyTable_release_rowreq_ctx */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_analogPropertyTable_pre_request(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_pre_request", "called\n"));
+
+ if (1 != netsnmp_row_merge_status_first(reginfo, agtreq_info)) {
+ DEBUGMSGTL(("internal:analogPropertyTable",
+ "skipping additional pre_request\n"));
+ return SNMP_ERR_NOERROR;
+ }
+
+ rc = analogPropertyTable_pre_request(analogPropertyTable_if_ctx.
+ user_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("analogPropertyTable", "error %d from "
+ "analogPropertyTable_pre_request\n", rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_pre_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_analogPropertyTable_post_request(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ int rc, packet_rc;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_post_request", "called\n"));
+
+ /*
+ * release row context, if deleted
+ */
+ if (rowreq_ctx && (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED))
+ analogPropertyTable_release_rowreq_ctx(rowreq_ctx);
+
+ /*
+ * wait for last call before calling user
+ */
+ if (1 != netsnmp_row_merge_status_last(reginfo, agtreq_info)) {
+ DEBUGMSGTL(("internal:analogPropertyTable",
+ "waiting for last post_request\n"));
+ return SNMP_ERR_NOERROR;
+ }
+
+ packet_rc = netsnmp_check_all_requests_error(agtreq_info->asp, 0);
+ if ((MFD_SUCCESS != packet_rc) && analogPropertyTable_dirty_get()) {
+ /*
+ * we shouldn't get here. the undo steps should also clear
+ * the dirty flags.
+ */
+ snmp_log(LOG_WARNING,
+ "analogPropertyTable dirty flag set in post_request "
+ "but status != SUCCESS.\n");
+ }
+
+ rc = analogPropertyTable_post_request(analogPropertyTable_if_ctx.
+ user_ctx, packet_rc);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("analogPropertyTable", "error %d from "
+ "analogPropertyTable_post_request\n", rc));
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_post_request */
+
+/**
+ * @internal
+ * wrapper
+ */
+static int
+_mfd_analogPropertyTable_object_lookup(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc = SNMP_ERR_NOERROR;
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_object_lookup", "called\n"));
+
+ /*
+ * get our context from mfd
+ * analogPropertyTable_interface_ctx *if_ctx =
+ * (analogPropertyTable_interface_ctx *)reginfo->my_reg_void;
+ */
+
+ if (NULL == rowreq_ctx) {
+ rc = SNMP_ERR_NOCREATION;
+ }
+
+ if (MFD_SUCCESS != rc)
+ netsnmp_request_set_error_all(requests, rc);
+ else
+ analogPropertyTable_row_prep(rowreq_ctx);
+
+ return SNMP_VALIDATE_ERR(rc);
+} /* _mfd_analogPropertyTable_object_lookup */
+
+/***********************************************************************
+ *
+ * GET processing
+ *
+ ***********************************************************************/
+/*
+ * @internal
+ * Retrieve the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_analogPropertyTable_get_column(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_get_column", "called for %d\n", column));
+
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * (INDEX) analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ case COLUMN_ANALOGPARAMETEROID:
+ var->type = ASN_OBJECT_ID;
+ /*
+ * NOTE: val_len is in bytes, analogParameterOID_len might not be (e.g. oids)
+ */
+ if (var->val_len < (rowreq_ctx->tbl_idx.analogParameterOID_len *
+ sizeof(rowreq_ctx->tbl_idx.
+ analogParameterOID[0]))) {
+ var->val.string =
+ malloc(rowreq_ctx->tbl_idx.analogParameterOID_len *
+ sizeof(rowreq_ctx->tbl_idx.analogParameterOID[0]));
+ }
+ var->val_len =
+ rowreq_ctx->tbl_idx.analogParameterOID_len *
+ sizeof(rowreq_ctx->tbl_idx.analogParameterOID[0]);
+ memcpy(var->val.string, rowreq_ctx->tbl_idx.analogParameterOID,
+ var->val_len);
+ break;
+
+ /*
+ * alarmEnable(2)/OCTETSTR/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
+ */
+ case COLUMN_ALARMENABLE:
+ var->type = ASN_OCTET_STR;
+ rc = alarmEnable_get(rowreq_ctx, (char **) &var->val.string,
+ &var->val_len);
+ break;
+
+ /*
+ * analogAlarmState(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+ */
+ case COLUMN_ANALOGALARMSTATE:
+ var->val_len = sizeof(u_long);
+ var->type = ASN_INTEGER;
+ rc = analogAlarmState_get(rowreq_ctx, (u_long *) var->val.string);
+ break;
+
+ /*
+ * analogAlarmHIHI(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHIHI:
+ var->val_len = sizeof(long);
+ var->type = ASN_INTEGER;
+ rc = analogAlarmHIHI_get(rowreq_ctx, (long *) var->val.string);
+ break;
+
+ /*
+ * analogAlarmHI(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHI:
+ var->val_len = sizeof(long);
+ var->type = ASN_INTEGER;
+ rc = analogAlarmHI_get(rowreq_ctx, (long *) var->val.string);
+ break;
+
+ /*
+ * analogAlarmLO(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLO:
+ var->val_len = sizeof(long);
+ var->type = ASN_INTEGER;
+ rc = analogAlarmLO_get(rowreq_ctx, (long *) var->val.string);
+ break;
+
+ /*
+ * analogAlarmLOLO(7)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLOLO:
+ var->val_len = sizeof(long);
+ var->type = ASN_INTEGER;
+ rc = analogAlarmLOLO_get(rowreq_ctx, (long *) var->val.string);
+ break;
+
+ /*
+ * analogAlarmDeadband(8)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMDEADBAND:
+ var->val_len = sizeof(long);
+ var->type = ASN_INTEGER;
+ rc = analogAlarmDeadband_get(rowreq_ctx, (long *) var->val.string);
+ break;
+
+ default:
+ if (ANALOGPROPERTYTABLE_MIN_COL <= column
+ && column <= ANALOGPROPERTYTABLE_MAX_COL) {
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_get_column", "assume column %d is reserved\n", column));
+ rc = MFD_SKIP;
+ } else {
+ snmp_log(LOG_ERR,
+ "unknown column %d in _analogPropertyTable_get_column\n",
+ column);
+ }
+ break;
+ }
+
+ return rc;
+} /* _analogPropertyTable_get_column */
+
+int
+_mfd_analogPropertyTable_get_values(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+ u_char *old_string;
+ void (*dataFreeHook) (void *);
+ int rc;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_get_values", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ for (; requests; requests = requests->next) {
+ /*
+ * save old pointer, so we can free it if replaced
+ */
+ old_string = requests->requestvb->val.string;
+ dataFreeHook = requests->requestvb->dataFreeHook;
+ if (NULL == requests->requestvb->val.string) {
+ requests->requestvb->val.string = requests->requestvb->buf;
+ requests->requestvb->val_len =
+ sizeof(requests->requestvb->buf);
+ } else if (requests->requestvb->buf ==
+ requests->requestvb->val.string) {
+ if (requests->requestvb->val_len !=
+ sizeof(requests->requestvb->buf))
+ requests->requestvb->val_len =
+ sizeof(requests->requestvb->buf);
+ }
+
+ /*
+ * get column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _analogPropertyTable_get_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (rc) {
+ if (MFD_SKIP == rc) {
+ requests->requestvb->type = SNMP_NOSUCHINSTANCE;
+ rc = SNMP_ERR_NOERROR;
+ }
+ } else if (NULL == requests->requestvb->val.string) {
+ snmp_log(LOG_ERR, "NULL varbind data pointer!\n");
+ rc = SNMP_ERR_GENERR;
+ }
+ if (rc)
+ netsnmp_request_set_error(requests, SNMP_VALIDATE_ERR(rc));
+
+ /*
+ * if the buffer wasn't used previously for the old data (i.e. it
+ * was allcoated memory) and the get routine replaced the pointer,
+ * we need to free the previous pointer.
+ */
+ if (old_string && (old_string != requests->requestvb->buf) &&
+ (requests->requestvb->val.string != old_string)) {
+ if (dataFreeHook)
+ (*dataFreeHook) (old_string);
+ else
+ free(old_string);
+ }
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_get_values */
+
+
+/***********************************************************************
+ *
+ * SET processing
+ *
+ ***********************************************************************/
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Syntax checks
+ *
+ *---------------------------------------------------------------------*/
+/*
+ * @internal
+ * Check the syntax for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_analogPropertyTable_check_column(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_analogPropertyTable_check_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+ /*
+ * (INDEX) analogParameterOID(1)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/w/e/r/d/h
+ */
+ case COLUMN_ANALOGPARAMETEROID:
+ rc = SNMP_ERR_NOTWRITABLE; /* can not change index of active row */
+ break;
+
+ /*
+ * alarmEnable(2)/OCTETSTR/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
+ */
+ case COLUMN_ALARMENABLE:
+ rc = netsnmp_check_vb_type_and_max_size(var, ASN_OCTET_STR,
+ sizeof(rowreq_ctx->data.
+ alarmEnable));
+ /*
+ * check defined range(s).
+ */
+ if ((SNMPERR_SUCCESS == rc)
+ && (var->val_len != 1)
+ ) {
+ rc = SNMP_ERR_WRONGLENGTH;
+ }
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:_analogPropertyTable_check_column:alarmEnable", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = alarmEnable_check_value(rowreq_ctx,
+ (char *) var->val.string,
+ var->val_len);
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from alarmEnable_check_value\n", rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * analogAlarmState(3)/INTEGER/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h
+ */
+ case COLUMN_ANALOGALARMSTATE:
+ rc = SNMP_ERR_NOTWRITABLE;
+ break;
+
+ /*
+ * analogAlarmHIHI(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHIHI:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data.
+ analogAlarmHIHI));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:_analogPropertyTable_check_column:analogAlarmHIHI", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = analogAlarmHIHI_check_value(rowreq_ctx,
+ *((long *) var->val.string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from analogAlarmHIHI_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * analogAlarmHI(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHI:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data.
+ analogAlarmHI));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:_analogPropertyTable_check_column:analogAlarmHI", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = analogAlarmHI_check_value(rowreq_ctx,
+ *((long *) var->val.string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from analogAlarmHI_check_value\n", rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * analogAlarmLO(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLO:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data.
+ analogAlarmLO));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:_analogPropertyTable_check_column:analogAlarmLO", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = analogAlarmLO_check_value(rowreq_ctx,
+ *((long *) var->val.string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from analogAlarmLO_check_value\n", rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * analogAlarmLOLO(7)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLOLO:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data.
+ analogAlarmLOLO));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:_analogPropertyTable_check_column:analogAlarmLOLO", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = analogAlarmLOLO_check_value(rowreq_ctx,
+ *((long *) var->val.string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from analogAlarmLOLO_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ /*
+ * analogAlarmDeadband(8)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMDEADBAND:
+ rc = netsnmp_check_vb_type_and_size(var, ASN_INTEGER,
+ sizeof(rowreq_ctx->data.
+ analogAlarmDeadband));
+ if (SNMPERR_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:_analogPropertyTable_check_column:analogAlarmDeadband", "varbind validation failed (eg bad type or size)\n"));
+ } else {
+ rc = analogAlarmDeadband_check_value(rowreq_ctx,
+ *((long *) var->val.
+ string));
+ if ((MFD_SUCCESS != rc) && (MFD_NOT_VALID_EVER != rc)
+ && (MFD_NOT_VALID_NOW != rc)) {
+ snmp_log(LOG_ERR,
+ "bad rc %d from analogAlarmDeadband_check_value\n",
+ rc);
+ rc = SNMP_ERR_GENERR;
+ }
+ }
+ break;
+
+ default: /** We shouldn't get here */
+ rc = SNMP_ERR_GENERR;
+ snmp_log(LOG_ERR,
+ "unknown column %d in _analogPropertyTable_check_column\n",
+ column);
+ }
+
+ return rc;
+} /* _analogPropertyTable_check_column */
+
+int
+_mfd_analogPropertyTable_check_objects(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+ int rc;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_check_objects", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ for (; requests; requests = requests->next) {
+
+ /*
+ * get column number from table request info, and check that column
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _analogPropertyTable_check_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (rc) {
+ netsnmp_request_set_error(requests, SNMP_VALIDATE_ERR(rc));
+ break;
+ }
+
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_check_objects */
+
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Undo setup
+ *
+ *---------------------------------------------------------------------*/
+/*
+ * @internal
+ * Set the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_analogPropertyTable_undo_setup_column(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_analogPropertyTable_undo_setup_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * alarmEnable(2)/OCTETSTR/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
+ */
+ case COLUMN_ALARMENABLE:
+ rowreq_ctx->column_set_flags |= COLUMN_ALARMENABLE_FLAG;
+ rc = alarmEnable_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmHIHI(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHIHI:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMHIHI_FLAG;
+ rc = analogAlarmHIHI_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmHI(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHI:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMHI_FLAG;
+ rc = analogAlarmHI_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmLO(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLO:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMLO_FLAG;
+ rc = analogAlarmLO_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmLOLO(7)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLOLO:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMLOLO_FLAG;
+ rc = analogAlarmLOLO_undo_setup(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmDeadband(8)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMDEADBAND:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMDEADBAND_FLAG;
+ rc = analogAlarmDeadband_undo_setup(rowreq_ctx);
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "unknown column %d in _analogPropertyTable_undo_setup_column\n",
+ column);
+ break;
+ }
+
+ return rc;
+} /* _analogPropertyTable_undo_setup_column */
+
+
+/**
+ * @internal
+ * undo setup
+ */
+int
+_mfd_analogPropertyTable_undo_setup(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_undo_setup", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * allocate undo context
+ */
+ rowreq_ctx->undo = analogPropertyTable_allocate_data();
+ if (NULL == rowreq_ctx->undo) {
+ /** msg already logged */
+ netsnmp_request_set_error_all(requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ return SNMP_ERR_NOERROR;
+ }
+
+ /*
+ * row undo setup
+ */
+ rowreq_ctx->column_set_flags = 0;
+ rc = analogPropertyTable_undo_setup(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_undo_setup\n", rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ } else {
+ /*
+ * column undo setup
+ */
+ netsnmp_table_request_info *tri;
+ for (; requests; requests = requests->next) {
+ /*
+ * set column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _analogPropertyTable_undo_setup_column(rowreq_ctx,
+ tri->colnum);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_undo_setup_column\n",
+ rc));
+ netsnmp_set_request_error(agtreq_info, requests,
+ SNMP_VALIDATE_ERR(rc));
+ }
+ } /* for results */
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_undo_setup */
+
+/**
+ * @internal
+ * undo setup
+ */
+int
+_mfd_analogPropertyTable_undo_cleanup(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ int rc;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_undo_cleanup", "called\n"));
+
+ /*
+ * failed row create in early stages has no rowreq_ctx
+ */
+ if (NULL == rowreq_ctx)
+ return MFD_SUCCESS;
+
+ /*
+ * call user cleanup
+ */
+ rc = analogPropertyTable_undo_cleanup(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_undo_cleanup\n", rc));
+ }
+
+ /*
+ * release undo context, if needed
+ */
+ if (rowreq_ctx->undo) {
+ analogPropertyTable_release_data(rowreq_ctx->undo);
+ rowreq_ctx->undo = NULL;
+ }
+
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_undo_cleanup */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Set values
+ *
+ *---------------------------------------------------------------------*/
+/*
+ * @internal
+ * Set the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_analogPropertyTable_set_column(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_analogPropertyTable_set_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * alarmEnable(2)/OCTETSTR/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
+ */
+ case COLUMN_ALARMENABLE:
+ rowreq_ctx->column_set_flags |= COLUMN_ALARMENABLE_FLAG;
+ rc = alarmEnable_set(rowreq_ctx, (char *) var->val.string,
+ var->val_len);
+ break;
+
+ /*
+ * analogAlarmHIHI(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHIHI:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMHIHI_FLAG;
+ rc = analogAlarmHIHI_set(rowreq_ctx, *((long *) var->val.string));
+ break;
+
+ /*
+ * analogAlarmHI(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHI:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMHI_FLAG;
+ rc = analogAlarmHI_set(rowreq_ctx, *((long *) var->val.string));
+ break;
+
+ /*
+ * analogAlarmLO(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLO:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMLO_FLAG;
+ rc = analogAlarmLO_set(rowreq_ctx, *((long *) var->val.string));
+ break;
+
+ /*
+ * analogAlarmLOLO(7)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLOLO:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMLOLO_FLAG;
+ rc = analogAlarmLOLO_set(rowreq_ctx, *((long *) var->val.string));
+ break;
+
+ /*
+ * analogAlarmDeadband(8)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMDEADBAND:
+ rowreq_ctx->column_set_flags |= COLUMN_ANALOGALARMDEADBAND_FLAG;
+ rc = analogAlarmDeadband_set(rowreq_ctx,
+ *((long *) var->val.string));
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "unknown column %d in _analogPropertyTable_set_column\n",
+ column);
+ rc = SNMP_ERR_GENERR;
+ break;
+ }
+
+ return rc;
+} /* _analogPropertyTable_set_column */
+
+int
+_mfd_analogPropertyTable_set_values(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+ int rc = SNMP_ERR_NOERROR;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_set_values", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ rowreq_ctx->column_set_flags = 0;
+ for (; requests; requests = requests->next) {
+ /*
+ * set column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _analogPropertyTable_set_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_set_column\n", rc));
+ netsnmp_set_request_error(agtreq_info, requests,
+ SNMP_VALIDATE_ERR(rc));
+ }
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_set_values */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: commit
+ *
+ *---------------------------------------------------------------------*/
+/**
+ * @internal
+ * commit the values
+ */
+int
+_mfd_analogPropertyTable_commit(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_commit", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ rc = analogPropertyTable_commit(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_commit\n", rc));
+ netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
+ }
+
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
+ /*
+ * if we successfully commited this row, set the dirty flag. Use the
+ * current value + 1 (i.e. dirty = # rows changed).
+ * this is checked in post_request...
+ */
+ analogPropertyTable_dirty_set(analogPropertyTable_dirty_get() + 1); /* set table dirty flag */
+ }
+
+ return SNMP_ERR_NOERROR;
+}
+
+int
+_mfd_analogPropertyTable_undo_commit(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_undo_commit", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
+ u_int d = analogPropertyTable_dirty_get();
+
+ netsnmp_assert(d != 0);
+ if (d)
+ analogPropertyTable_dirty_set(d - 1);
+ }
+
+ rc = analogPropertyTable_undo_commit(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_undo_commit\n", rc));
+ }
+
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
+ snmp_log(LOG_WARNING,
+ "analogPropertyTable row dirty flag still set after undo_commit\n");
+ rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY;
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_commit */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: Undo
+ *
+ *---------------------------------------------------------------------*/
+/**
+ * @internal
+ * undo the value for a particular column
+ */
+NETSNMP_STATIC_INLINE int
+_analogPropertyTable_undo_column(analogPropertyTable_rowreq_ctx *
+ rowreq_ctx, netsnmp_variable_list * var,
+ int column)
+{
+ int rc = SNMPERR_SUCCESS;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_analogPropertyTable_undo_column", "called for %d\n", column));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ switch (column) {
+
+ /*
+ * alarmEnable(2)/OCTETSTR/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
+ */
+ case COLUMN_ALARMENABLE:
+ rc = alarmEnable_undo(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmHIHI(4)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHIHI:
+ rc = analogAlarmHIHI_undo(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmHI(5)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMHI:
+ rc = analogAlarmHI_undo(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmLO(6)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLO:
+ rc = analogAlarmLO_undo(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmLOLO(7)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMLOLO:
+ rc = analogAlarmLOLO_undo(rowreq_ctx);
+ break;
+
+ /*
+ * analogAlarmDeadband(8)/INTEGER/ASN_INTEGER/long(long)//l/A/W/e/r/d/h
+ */
+ case COLUMN_ANALOGALARMDEADBAND:
+ rc = analogAlarmDeadband_undo(rowreq_ctx);
+ break;
+
+ default:
+ snmp_log(LOG_ERR,
+ "unknown column %d in _analogPropertyTable_undo_column\n",
+ column);
+ break;
+ }
+
+ return rc;
+} /* _analogPropertyTable_undo_column */
+
+int
+_mfd_analogPropertyTable_undo_values(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info *requests)
+{
+ int rc;
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+ netsnmp_table_request_info *tri;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_undo_values", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ rc = analogPropertyTable_undo(rowreq_ctx);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_undo\n", rc));
+ }
+
+ for (; requests; requests = requests->next) {
+ /*
+ * set column data
+ */
+ tri = netsnmp_extract_table_info(requests);
+ if (NULL == tri)
+ continue;
+
+ rc = _analogPropertyTable_undo_column(rowreq_ctx,
+ requests->requestvb,
+ tri->colnum);
+ if (MFD_SUCCESS != rc) {
+ /*
+ * nothing we can do about it but log it
+ */
+ DEBUGMSGTL(("analogPropertyTable:mfd", "error %d from "
+ "analogPropertyTable_undo_column\n", rc));
+ }
+ } /* for results */
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_undo_values */
+
+/*----------------------------------------------------------------------
+ *
+ * SET: irreversible commit
+ *
+ *---------------------------------------------------------------------*/
+/**
+ * @internal
+ * commit irreversible actions
+ */
+int
+_mfd_analogPropertyTable_irreversible_commit(netsnmp_mib_handler *handler,
+ netsnmp_handler_registration
+ *reginfo,
+ netsnmp_agent_request_info
+ *agtreq_info,
+ netsnmp_request_info
+ *requests)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx =
+ netsnmp_container_table_row_extract(requests);
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_mfd_analogPropertyTable_irreversible:commit", "called\n"));
+
+ netsnmp_assert(NULL != rowreq_ctx);
+
+ /*
+ * check for and handle row creation/deletion
+ * and update column exist flags...
+ */
+ if (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED) {
+ if (!(rowreq_ctx->rowreq_flags & MFD_ROW_CREATED))
+ CONTAINER_REMOVE(analogPropertyTable_if_ctx.container,
+ rowreq_ctx);
+ } else {
+ if (rowreq_ctx->column_set_flags) {
+ rowreq_ctx->column_set_flags = 0;
+ }
+ }
+
+ return SNMP_ERR_NOERROR;
+} /* _mfd_analogPropertyTable_irreversible_commit */
+
+/***********************************************************************
+ *
+ * DATA ACCESS
+ *
+ ***********************************************************************/
+static void _container_free(netsnmp_container * container);
+
+/**
+ * @internal
+ */
+static int
+_cache_load(netsnmp_cache * cache, void *vmagic)
+{
+ DEBUGMSGTL(("internal:analogPropertyTable:_cache_load", "called\n"));
+
+ if ((NULL == cache) || (NULL == cache->magic)) {
+ snmp_log(LOG_ERR,
+ "invalid cache for analogPropertyTable_cache_load\n");
+ return -1;
+ }
+
+ /** should only be called for an invalid or expired cache */
+ netsnmp_assert((0 == cache->valid) || (1 == cache->expired));
+
+ /*
+ * call user code
+ */
+ return analogPropertyTable_container_load((netsnmp_container *) cache->
+ magic);
+} /* _cache_load */
+
+/**
+ * @internal
+ */
+static void
+_cache_free(netsnmp_cache * cache, void *magic)
+{
+ netsnmp_container *container;
+
+ DEBUGMSGTL(("internal:analogPropertyTable:_cache_free", "called\n"));
+
+ if ((NULL == cache) || (NULL == cache->magic)) {
+ snmp_log(LOG_ERR,
+ "invalid cache in analogPropertyTable_cache_free\n");
+ return;
+ }
+
+ container = (netsnmp_container *) cache->magic;
+
+ _container_free(container);
+} /* _cache_free */
+
+/**
+ * @internal
+ */
+static void
+_container_item_free(analogPropertyTable_rowreq_ctx * rowreq_ctx,
+ void *context)
+{
+ DEBUGMSGTL(("internal:analogPropertyTable:_container_item_free",
+ "called\n"));
+
+ if (NULL == rowreq_ctx)
+ return;
+
+ analogPropertyTable_release_rowreq_ctx(rowreq_ctx);
+} /* _container_item_free */
+
+/**
+ * @internal
+ */
+static void
+_container_free(netsnmp_container * container)
+{
+ DEBUGMSGTL(("internal:analogPropertyTable:_container_free",
+ "called\n"));
+
+ if (NULL == container) {
+ snmp_log(LOG_ERR,
+ "invalid container in analogPropertyTable_container_free\n");
+ return;
+ }
+
+ /*
+ * call user code
+ */
+ analogPropertyTable_container_free(container);
+
+ /*
+ * free all items. inefficient, but easy.
+ */
+ CONTAINER_CLEAR(container,
+ (netsnmp_container_obj_func *) _container_item_free,
+ NULL);
+} /* _container_free */
+
+/**
+ * @internal
+ * initialize the container with functions or wrappers
+ */
+void
+_analogPropertyTable_container_init(analogPropertyTable_interface_ctx *
+ if_ctx)
+{
+ DEBUGMSGTL(("internal:analogPropertyTable:_analogPropertyTable_container_init", "called\n"));
+
+ /*
+ * cache init
+ */
+ if_ctx->cache = netsnmp_cache_create(30, /* timeout in seconds */
+ _cache_load, _cache_free,
+ analogPropertyTable_oid,
+ analogPropertyTable_oid_size);
+
+ if (NULL == if_ctx->cache) {
+ snmp_log(LOG_ERR,
+ "error creating cache for analogPropertyTable\n");
+ return;
+ }
+
+ if_ctx->cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET;
+
+ analogPropertyTable_container_init(&if_ctx->container, if_ctx->cache);
+ if (NULL == if_ctx->container)
+ if_ctx->container =
+ netsnmp_container_find("analogPropertyTable:table_container");
+ if (NULL == if_ctx->container) {
+ snmp_log(LOG_ERR, "error creating container in "
+ "analogPropertyTable_container_init\n");
+ return;
+ }
+
+ if (NULL != if_ctx->cache)
+ if_ctx->cache->magic = (void *) if_ctx->container;
+} /* _analogPropertyTable_container_init */
+
+/**
+ * @internal
+ * shutdown the container with functions or wrappers
+ */
+void
+_analogPropertyTable_container_shutdown(analogPropertyTable_interface_ctx *
+ if_ctx)
+{
+ DEBUGMSGTL(("internal:analogPropertyTable:_analogPropertyTable_container_shutdown", "called\n"));
+
+ analogPropertyTable_container_shutdown(if_ctx->container);
+
+ _container_free(if_ctx->container);
+
+} /* _analogPropertyTable_container_shutdown */
+
+
+analogPropertyTable_rowreq_ctx *
+analogPropertyTable_row_find_by_mib_index(analogPropertyTable_mib_index *
+ mib_idx)
+{
+ analogPropertyTable_rowreq_ctx *rowreq_ctx;
+ oid oid_tmp[MAX_OID_LEN];
+ netsnmp_index oid_idx;
+ int rc;
+
+ /*
+ * set up storage for OID
+ */
+ oid_idx.oids = oid_tmp;
+ oid_idx.len = sizeof(oid_tmp) / sizeof(oid);
+
+ /*
+ * convert
+ */
+ rc = analogPropertyTable_index_to_oid(&oid_idx, mib_idx);
+ if (MFD_SUCCESS != rc)
+ return NULL;
+
+ rowreq_ctx =
+ CONTAINER_FIND(analogPropertyTable_if_ctx.container, &oid_idx);
+
+ return rowreq_ctx;
+}
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.h
new file mode 100644
index 0000000000..d413b77fc2
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_interface.h
@@ -0,0 +1,101 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * version : 15899 $ of $
+ *
+ * $Id:$
+ */
+/** @ingroup interface: Routines to interface to Net-SNMP
+ *
+ * \warning This code should not be modified, called directly,
+ * or used to interpret functionality. It is subject to
+ * change at any time.
+ *
+ * @{
+ */
+/*
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ * *** ***
+ * *** NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE ***
+ * *** ***
+ * *** ***
+ * *** THIS FILE DOES NOT CONTAIN ANY USER EDITABLE CODE. ***
+ * *** ***
+ * *** ***
+ * *** THE GENERATED CODE IS INTERNAL IMPLEMENTATION, AND ***
+ * *** ***
+ * *** ***
+ * *** IS SUBJECT TO CHANGE WITHOUT WARNING IN FUTURE RELEASES. ***
+ * *** ***
+ * *** ***
+ * *********************************************************************
+ * *********************************************************************
+ * *********************************************************************
+ */
+#ifndef ANALOGPROPERTYTABLE_INTERFACE_H
+#define ANALOGPROPERTYTABLE_INTERFACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "analogPropertyTable.h"
+
+
+ /*
+ ********************************************************************
+ * Table declarations
+ */
+
+ /*
+ * PUBLIC interface initialization routine
+ */
+ void
+ _analogPropertyTable_initialize_interface
+ (analogPropertyTable_registration * user_ctx, u_long flags);
+ void
+ _analogPropertyTable_shutdown_interface
+ (analogPropertyTable_registration * user_ctx);
+
+ analogPropertyTable_registration
+ *analogPropertyTable_registration_get(void);
+
+ analogPropertyTable_registration
+ *analogPropertyTable_registration_set
+ (analogPropertyTable_registration * newreg);
+
+ netsnmp_container *analogPropertyTable_container_get(void);
+ int analogPropertyTable_container_size(void);
+
+ u_int analogPropertyTable_dirty_get(void);
+ void analogPropertyTable_dirty_set(u_int status);
+
+ analogPropertyTable_rowreq_ctx
+ *analogPropertyTable_allocate_rowreq_ctx(void *);
+ void
+ analogPropertyTable_release_rowreq_ctx
+ (analogPropertyTable_rowreq_ctx * rowreq_ctx);
+
+ int analogPropertyTable_index_to_oid(netsnmp_index *
+ oid_idx,
+ analogPropertyTable_mib_index
+ * mib_idx);
+ int analogPropertyTable_index_from_oid(netsnmp_index *
+ oid_idx,
+ analogPropertyTable_mib_index
+ * mib_idx);
+
+ /*
+ * access to certain internals. use with caution!
+ */
+ void
+ analogPropertyTable_valid_columns_set(netsnmp_column_info *vc);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ANALOGPROPERTYTABLE_INTERFACE_H */
+/** @} */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_oids.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_oids.h
new file mode 100644
index 0000000000..f0db23f95a
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/analogPropertyTable_oids.h
@@ -0,0 +1,56 @@
+/*
+ * Note: this file originally auto-generated by mib2c using
+ * : generic-table-oids.m2c 12855 2005-09-27 15:56:08Z rstory $
+ *
+ * $Id:$
+ */
+#ifndef ANALOGPROPERTYTABLE_OIDS_H
+#define ANALOGPROPERTYTABLE_OIDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /*
+ * column number definitions for table analogPropertyTable
+ */
+#define ANALOGPROPERTYTABLE_OID 1,3,6,1,4,1,17409,2,2,1,1
+
+#define COLUMN_ANALOGPARAMETEROID 1
+
+#define COLUMN_ALARMENABLE 2
+#define COLUMN_ALARMENABLE_FLAG (0x1 << 1)
+
+#define COLUMN_ANALOGALARMSTATE 3
+
+#define COLUMN_ANALOGALARMHIHI 4
+#define COLUMN_ANALOGALARMHIHI_FLAG (0x1 << 3)
+
+#define COLUMN_ANALOGALARMHI 5
+#define COLUMN_ANALOGALARMHI_FLAG (0x1 << 4)
+
+#define COLUMN_ANALOGALARMLO 6
+#define COLUMN_ANALOGALARMLO_FLAG (0x1 << 5)
+
+#define COLUMN_ANALOGALARMLOLO 7
+#define COLUMN_ANALOGALARMLOLO_FLAG (0x1 << 6)
+
+#define COLUMN_ANALOGALARMDEADBAND 8
+#define COLUMN_ANALOGALARMDEADBAND_FLAG (0x1 << 7)
+
+
+#define ANALOGPROPERTYTABLE_MIN_COL COLUMN_ANALOGPARAMETEROID
+#define ANALOGPROPERTYTABLE_MAX_COL COLUMN_ANALOGALARMDEADBAND
+
+
+ /*
+ * TODO:405:r: Review ANALOGPROPERTYTABLE_SETTABLE_COLS macro.
+ * OR together all the writable cols.
+ */
+#define ANALOGPROPERTYTABLE_SETTABLE_COLS (COLUMN_ALARMENABLE_FLAG | COLUMN_ANALOGALARMHIHI_FLAG | COLUMN_ANALOGALARMHI_FLAG | COLUMN_ANALOGALARMLO_FLAG | COLUMN_ANALOGALARMLOLO_FLAG | COLUMN_ANALOGALARMDEADBAND_FLAG)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ANALOGPROPERTYTABLE_OIDS_H */
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-alarmEnable.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-alarmEnable.m2d
new file mode 100644
index 0000000000..d3397d5e24
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-alarmEnable.m2d
@@ -0,0 +1,43 @@
+########################################################################
+##
+## mib2c node setting for alarmEnable
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = char@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 1@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
+########################################################################
+## Allow realloc when data size exceeds length? If your data
+## store for this node is a pointer allocated with one of the
+## alloc family functions, you can set this to 1 to use realloc
+## when a new value length exceeds the old lenght. If you are
+## using a fixed size buffer, this value should be 0.
+##
+## @eval $m2c_node_realloc = 0@
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmDeadband.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmDeadband.m2d
new file mode 100644
index 0000000000..0ea75c2036
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmDeadband.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for analogAlarmDeadband
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHI.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHI.m2d
new file mode 100644
index 0000000000..9c27eba1f8
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHI.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for analogAlarmHI
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHIHI.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHIHI.m2d
new file mode 100644
index 0000000000..52ea2bc703
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmHIHI.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for analogAlarmHIHI
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLO.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLO.m2d
new file mode 100644
index 0000000000..8309e260f4
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLO.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for analogAlarmLO
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLOLO.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLOLO.m2d
new file mode 100644
index 0000000000..c5ea44ff89
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmLOLO.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for analogAlarmLOLO
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmState.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmState.m2d
new file mode 100644
index 0000000000..232a88e41c
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogAlarmState.m2d
@@ -0,0 +1,35 @@
+########################################################################
+##
+## mib2c node setting for analogAlarmState
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = u_long@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 0@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogParameterOID.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogParameterOID.m2d
new file mode 100644
index 0000000000..f670e29d06
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/node-analogParameterOID.m2d
@@ -0,0 +1,43 @@
+########################################################################
+##
+## mib2c node setting for analogParameterOID
+##
+## Remove the '##' comment delimeter to change settings
+##
+########################################################################
+## Node declaration type? This is the C type to be used when
+## declaring a variable to hold a value for this column. It
+## is strongly recommended that you do not change this value.
+## If you do, it is likely to break lots of generated code that
+## you will have to fix.
+##
+## @eval $m2c_decl = oid@
+##
+########################################################################
+## Generate/use mapping functions? Useful if the MIB defines
+## a different format or enumerations than you data store uses.
+##
+## @eval $m2c_node_skip_mapping = 1@
+##
+########################################################################
+## Need a length for the value? Most OCTET-STRING based values will
+## need a length, most other types will not. Do not change this one
+## unless you know what you are doing! You will almost certainly need
+## to fix lots of generated code if you do.
+##
+## @eval $m2c_node_needlength = 1@
+##
+########################################################################
+## Skip get? Set this to 1 if you do not want to implement a value
+## for this column.
+##
+## @eval $m2c_node_skip_get = 0@
+##
+########################################################################
+## Allow realloc when data size exceeds length? If your data
+## store for this node is a pointer allocated with one of the
+## alloc family functions, you can set this to 1 to use realloc
+## when a new value length exceeds the old lenght. If you are
+## using a fixed size buffer, this value should be 0.
+##
+## @eval $m2c_node_realloc = 0@
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/table-analogPropertyTable.m2d b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/table-analogPropertyTable.m2d
new file mode 100644
index 0000000000..419a24a13e
--- /dev/null
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/sarft-property-alarm-mib/analogPropertyTable/defaults/table-analogPropertyTable.m2d
@@ -0,0 +1,103 @@
+## ########################################################################
+##
+## mib2c Table setting for analogPropertyTable
+##
+## ########################################################################
+##
+## User context structure type
+##
+@eval $m2c_context_reg = "netsnmp_data_list"@
+##
+## ########################################################################
+##
+## Allocate data structure in row structure? (vs embedd)
+##
+@eval $m2c_data_allocate = 0@
+##
+## ########################################################################
+##
+## Generate code to cache data?
+##
+@eval $m2c_data_cache = 1@
+##
+## ########################################################################
+##
+## Data context structure type
+##
+@eval $m2c_data_context = "generated"@ [generated|NAME]
+##
+## ########################################################################
+##
+## Generate function to initialize row context when created?
+##
+@eval $m2c_data_init = 1@
+##
+## ########################################################################
+##
+## Persistence of data context
+## // 0:persistent, 1:semi-transient, 2:transient
+##
+@eval $m2c_data_transient = 2@
+##
+## ########################################################################
+##
+## Include some example code?
+##
+@eval $m2c_include_examples = 0@
+##
+## ########################################################################
+##
+## Generate code for irreversible_commit mode?
+##
+@eval $m2c_irreversible_commit = 0@
+##
+## ########################################################################
+##
+## Data access method
+##
+@eval $m2c_table_access = "container-cached"@
+##
+## ########################################################################
+##
+## Generate row dependency function?
+##
+@eval $m2c_table_dependencies = 0@
+##
+## ########################################################################
+##
+## Generate data store/restore functions for persistent storage?
+##
+@eval $m2c_table_persistent = 0@
+##
+## ########################################################################
+##
+## Generate code for dynamic row creation?
+##
+@eval $m2c_table_row_creation = 0@
+##
+## ########################################################################
+##
+## Generate code for settable objects?
+##
+@eval $m2c_table_settable = 1@
+##
+## ########################################################################
+##
+## Skip mapping between data context and MIB formats?
+## // 0:generate maps, 1:skip maps, -1:skip unless enum/oid
+##
+@eval $m2c_table_skip_mapping = 1@
+##
+## ########################################################################
+##
+## Generate code for sparse tables?
+##
+@eval $m2c_table_sparse = 0@
+##
+## ########################################################################
+##
+## Generate Makefile/AgentX code?
+##
+@eval $mfd_generate_makefile = 0@
+@eval $mfd_generate_subagent = 0@
+##