############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## ## $Id: mfd-data-set.m2c,v 1.18 2004/10/08 23:39:17 rstory Exp $ ######################################################################## ## lower conf files get confused with multiple processing types, so ## set single options @eval $mfd_data_set_processing_type_save = "$m2c_processing_type"@ @if "$mfd_processing_types" =~ /h/@ @eval $m2c_processing_type = 'h'@ @if $m2c_create_fewer_files != 1@ @ eval $hack = "Id"@ @open ${name}_data_set.h@ /* * Note: this file originally auto-generated by mib2c using * version $Revision: 1.18 $ of $RCSfile: mfd-data-set.m2c,v $ * * $$hack:$ */ @eval $m2c_save = "$name"@ @eval $name = "${name}_DATA_SET"@ @include generic-header-top.m2i@ @eval $name = "$m2c_save"@ @end@ // m2c_create_fewer_files ######################################################################## @if $m2c_mark_boundary == 1@ /** START header generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */ @end@ ## /* ********************************************************************* * SET function declarations */ /* ********************************************************************* * SET Table declarations */ @foreach $table table@ @ include m2c_setup_table.m2i@ @ if $m2c_table_settable == 0@ @ next@ # skip to next table @ end@ @ include details-table.m2i@ @ foreach $node externalindex@ @ include m2c_setup_node.m2i@ int ${context}_${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx ); /* external */ @ end@ # foreach externalindex @ foreach $node internalindex@ @ include m2c_setup_node.m2i@ int ${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx ); /* internal */ @ end@ # foreach internalindex @ include parent-set.m2i@ @ foreach $node nonindex@ @ include m2c_setup_node.m2i@ int ${node}_check_value( ${context}_rowreq_ctx *rowreq_ctx, $m2c_node_param_val); int ${node}_undo_setup( ${context}_rowreq_ctx *rowreq_ctx ); int ${node}_set( ${context}_rowreq_ctx *rowreq_ctx, $m2c_node_param_val ); int ${node}_undo( ${context}_rowreq_ctx *rowreq_ctx ); @ end@ # foreach nonindex int ${context}_check_dependencies(${context}_rowreq_ctx *ctx); @end@ # foreach table @if $m2c_mark_boundary == 1@ /** END header generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */ @end@ @if $m2c_create_fewer_files != 1@ @eval $m2c_save = "$name"@ @eval $name = "${name}_DATA_SET"@ @include generic-header-bottom.m2i@ @eval $name = "$m2c_save"@ @end@ // m2c_create_fewer_files ###################################################################### @end@ // mfd_processing_types =~ /h/ ###################################################################### ###################################################################### ###################################################################### ##//#################################################################### ##//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ##//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @if "$mfd_processing_types" =~ /c/@ @eval $m2c_processing_type = 'c'@ @if $m2c_create_fewer_files != 1@ @open ${name}_data_set.c@ /* * Note: this file originally auto-generated by mib2c using * version $Revision: 1.18 $ of $RCSfile: mfd-data-set.m2c,v $ * * $$hack:$ * */ @include generic-source-includes.m2i@ /** @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. * * @{ */ @end@ // m2c_create_fewer_files @if $m2c_mark_boundary == 1@ /** START code generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */ @end@ ######################################################################## @foreach $table table@ @ include m2c_setup_table.m2i@ @ if $m2c_table_settable == 0@ @ next@ # skip to next table @ end@ @ include details-table.m2i@ ######################################################################## @ include parent-set.m2i@ ######################################################################## /* * TODO:420:r: Implement $context index validation. */ @ foreach $node externalindex@ @ include m2c_setup_node.m2i@ @ if $m2c_report_progress == 1@ @ print | | +-> Processing index $node@ @ end@ @ include details-node.m2i@ @ if $m2c_table_row_creation == 1@ /** * check validity of ${node} external index portion * * NOTE: this is not the place to do any checks for the sanity * of multiple indexes. Those types of checks should be done in the * ${context}_validate_index() function. * * @retval MFD_SUCCESS : the incoming value is legal * @retval MFD_BAD_VALUE : the incoming value is NOT legal */ int ${context}_${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx ) { DEBUGMSGTL(("verbose:${context}:${context}_${node}_check_index","called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:424:M: |-> Check $context external index $node. * check that index value in the table context (rowreq_ctx) * for the external index $node is legal. */ return MFD_SUCCESS; /* external index $node ok */ } /* ${context}_${node}_check_index */ @ end@ # m2c_table_row_creation @ end@ # foreach externalindex ######################################################################## @ if $m2c_table_row_creation == 1@ @ foreach $node internalindex@ @ include m2c_setup_node.m2i@ @ if $m2c_report_progress == 1@ @ print | | +-> Processing index $node@ @ end@ @ include details-node.m2i@ /** * check validity of ${node} index portion * * @retval MFD_SUCCESS : the incoming value is legal * @retval MFD_BAD_VALUE : the incoming value is NOT legal * * @note this is not the place to do any checks for the sanity * of multiple indexes. Those types of checks should be done in the * ${context}_validate_index() function. */ int ${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx ) { DEBUGMSGTL(("verbose:${context}:${node}_check_index","called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:426:M: |-> Check $context index $node. * check that index value in the table context (rowreq_ctx) * for $node is legal. */ return MFD_SUCCESS; /* $node index ok */ } /* ${node}_check_index */ @ end@ # foreach internalindex @ end@ # m2c_table_row_creation ######################################################################## /* * TODO:440:M: Implement $context node value checks. * TODO:450:M: Implement $context undo functions. * TODO:460:M: Implement $context set functions. * TODO:480:M: Implement $context commit functions. */ @ foreach $node nonindex@ @ include m2c_setup_node.m2i@ @ if $node.settable == 0@ @ next@ # skip to next column @ end@ @ if $m2c_report_progress == 1@ @ print | | +-> Processing nonindex $node@ @ end@ @ include details-node.m2i@ @ include node-set.m2i@ @ end@ # foreach column ######################################################################## @ if $m2c_table_dependencies == 1@ @ include parent-dependencies.m2i@ @ end@ ######################################################################## @end@ # foreach table ## ######################################################################## /** @} */ @if $m2c_mark_boundary == 1@ /** END code generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */ @end@ ######################################################################## @end@ // mfd_processing_type =~ /c/ ## restore original processing types @eval $m2c_processing_type = "$mfd_data_set_processing_type_save"@