/*
 * 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 "ieee8021BridgeBasePortTable.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 ieee8021BridgeBasePortTable
 ***
 **********************************************************************
 **********************************************************************/
/*
 * IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortTable is subid 4 of ieee8021BridgeBase.
 * Its status is Current.
 * OID: .1.3.111.2.802.1.1.2.1.1.4, 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
 * ieee8021BridgeBasePortTable_allocate_data(), but may need extra
 * initialization similar to what you may have done in
 * ieee8021BridgeBasePortTable_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 (ieee8021BridgeBasePortTable_rowreq_ctx)
 *
 * @retval MFD_SUCCESS : success
 * @retval MFD_ERROR   : error. set will fail.
 */
int
ieee8021BridgeBasePortTable_undo_setup( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    int rc = MFD_SUCCESS;

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_undo_setup","called\n"));

    /** we should have a non-NULL pointer */
    netsnmp_assert( NULL != rowreq_ctx );

    /*
     * TODO:451:M: |-> Setup ieee8021BridgeBasePortTable undo.
     * set up ieee8021BridgeBasePortTable undo information, in preparation for a set.
     * Undo storage is in (* ieee8021BridgeBasePortName_val_ptr_ptr )*
     */

    return rc;
} /* ieee8021BridgeBasePortTable_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 (ieee8021BridgeBasePortTable_rowreq_ctx)
 *
 * @retval MFD_SUCCESS : success
 * @retval MFD_ERROR   : error. set will fail.
 */
int
ieee8021BridgeBasePortTable_undo( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    int rc = MFD_SUCCESS;

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_undo","called\n"));

    /** we should have a non-NULL pointer */
    netsnmp_assert( NULL != rowreq_ctx );

    /*
     * TODO:451:M: |-> ieee8021BridgeBasePortTable undo.
     * ieee8021BridgeBasePortTable undo information, in response to a failed set.
     * Undo storage is in (* ieee8021BridgeBasePortName_val_ptr_ptr )*
     */

    return rc;
} /* ieee8021BridgeBasePortTable_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 (ieee8021BridgeBasePortTable_rowreq_ctx)
 *
 * @retval MFD_SUCCESS : success
 * @retval MFD_ERROR   : error
 */
int
ieee8021BridgeBasePortTable_undo_cleanup( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    int rc = MFD_SUCCESS;

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_undo_cleanup","called\n"));

    /** we should have a non-NULL pointer */
    netsnmp_assert( NULL != rowreq_ctx );

    /*
     * TODO:452:M: |-> Cleanup ieee8021BridgeBasePortTable undo.
     * Undo storage is in (* ieee8021BridgeBasePortName_val_ptr_ptr )*
     */

    return rc;
} /* ieee8021BridgeBasePortTable_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
 * ieee8021BridgeBasePortTable_oids.h.
 * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
 *
 * @param ieee8021BridgeBasePortTable_rowreq_ctx
 *        Pointer to the users context.
 *
 * @retval MFD_SUCCESS : success
 * @retval MFD_ERROR   : error
 */
int
ieee8021BridgeBasePortTable_commit( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    int rc = MFD_SUCCESS;
    int             save_flags;

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_commit","called\n"));

    /** we should have a non-NULL pointer */
    netsnmp_assert( NULL != rowreq_ctx );

    /*
     * save flags, then clear until we actually do something
     */
    save_flags = rowreq_ctx->column_set_flags;
    rowreq_ctx->column_set_flags = 0;

    /*
     * commit ieee8021BridgeBasePortTable 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_IEEE8021BRIDGEBASEPORTIFINDEX_FLAG) {
       save_flags &= ~COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX_FLAG; /* clear ieee8021BridgeBasePortIfIndex */
       /*
        * TODO:482:o: |-> commit column ieee8021BridgeBasePortIfIndex.
        */
       rc = -1;
       if(-1 == rc) {
           snmp_log(LOG_ERR,"ieee8021BridgeBasePortTable column ieee8021BridgeBasePortIfIndex commit failed\n");
       }
       else {
            /*
             * set flag, in case we need to undo ieee8021BridgeBasePortIfIndex
             */
            rowreq_ctx->column_set_flags |= COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX_FLAG;
       }
    }

    if (save_flags & COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FLAG) {
       save_flags &= ~COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FLAG; /* clear ieee8021BridgeBasePortAdminPointToPoint */
       /*
        * TODO:482:o: |-> commit column ieee8021BridgeBasePortAdminPointToPoint.
        */
       rc = -1;
       if(-1 == rc) {
           snmp_log(LOG_ERR,"ieee8021BridgeBasePortTable column ieee8021BridgeBasePortAdminPointToPoint commit failed\n");
       }
       else {
            /*
             * set flag, in case we need to undo ieee8021BridgeBasePortAdminPointToPoint
             */
            rowreq_ctx->column_set_flags |= COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FLAG;
       }
    }

    /*
     * 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;
} /* ieee8021BridgeBasePortTable_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
 * ieee8021BridgeBasePortTable_oids.h.
 * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
 *
 * @param ieee8021BridgeBasePortTable_rowreq_ctx
 *        Pointer to the users context.
 *
 * @retval MFD_SUCCESS : success
 * @retval MFD_ERROR   : error
 */
int
ieee8021BridgeBasePortTable_undo_commit( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    int rc = MFD_SUCCESS;

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_undo_commit","called\n"));

    /** we should have a non-NULL pointer */
    netsnmp_assert( NULL != rowreq_ctx );

    /*
     * TODO:485:M: |-> Undo ieee8021BridgeBasePortTable 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;
} /* ieee8021BridgeBasePortTable_undo_commit */

/*
 * TODO:440:M: Implement ieee8021BridgeBasePortTable node value checks.
 * TODO:450:M: Implement ieee8021BridgeBasePortTable undo functions.
 * TODO:460:M: Implement ieee8021BridgeBasePortTable set functions.
 * TODO:480:M: Implement ieee8021BridgeBasePortTable commit functions.
 */
/*---------------------------------------------------------------------
 * IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortEntry.ieee8021BridgeBasePortIfIndex
 * ieee8021BridgeBasePortIfIndex is subid 3 of ieee8021BridgeBasePortEntry.
 * Its status is Current, and its access level is ReadWrite.
 * OID: .1.3.111.2.802.1.1.2.1.1.4.1.3
 * Description:
The value of the instance of the IfIndex object,
         defined in the IF-MIB, for the interface corresponding
         to this port, or the value 0 if the port has not been
         bound to an underlying frame source and sink.

         It is an implementation specific decision as to whether this object
         may be modified if it has been created or if 0 is a legal value.

         The underlying IfEntry indexed by this column must be persistent
         across reinitializations of the management system.
 *
 * Attributes:
 *   accessible 1     isscalar 0     enums  0      hasdefval 0
 *   readable   1     iscolumn 1     ranges 1      hashint   1
 *   settable   1
 *   hint: d
 *
 * Ranges:  0 - 2147483647;
 *
 * Its syntax is InterfaceIndexOrZero (based on perltype INTEGER32)
 * 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 ieee8021BridgeBasePortIfIndex_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
 * ieee8021BridgeBasePortTable_check_dependencies() function.
 *
 * The following checks have already been done for you:
 *    The syntax is ASN_INTEGER
 *    The value is in (one of) the range set(s):  0 - 2147483647
 *
 * If there a no other checks you need to do, simply return MFD_SUCCESS.
 *
 */
int
ieee8021BridgeBasePortIfIndex_check_value( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx, long ieee8021BridgeBasePortIfIndex_val)
{
    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortIfIndex_check_value","called\n"));

    /** should never get a NULL pointer */
    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:441:o: |-> Check for valid ieee8021BridgeBasePortIfIndex value.
     */

    return MFD_SUCCESS; /* ieee8021BridgeBasePortIfIndex value not illegal */
} /* ieee8021BridgeBasePortIfIndex_check_value */

/**
 * Save old value information
 *
 * @param rowreq_ctx
 *        Pointer to the table context (ieee8021BridgeBasePortTable_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
 * ieee8021BridgeBasePortTable_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
ieee8021BridgeBasePortIfIndex_undo_setup( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortIfIndex_undo_setup","called\n"));

    /** should never get a NULL pointer */
    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:455:o: |-> Setup ieee8021BridgeBasePortIfIndex undo.
     */
    /*
     * copy ieee8021BridgeBasePortIfIndex data
     * set rowreq_ctx->undo->ieee8021BridgeBasePortIfIndex from rowreq_ctx->data.ieee8021BridgeBasePortIfIndex
     */
    rowreq_ctx->undo->ieee8021BridgeBasePortIfIndex = rowreq_ctx->data.ieee8021BridgeBasePortIfIndex;


    return MFD_SUCCESS;
} /* ieee8021BridgeBasePortIfIndex_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 ieee8021BridgeBasePortIfIndex_val
 *        A long containing the new value.
 */
int
ieee8021BridgeBasePortIfIndex_set( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx, long ieee8021BridgeBasePortIfIndex_val )
{

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortIfIndex_set","called\n"));

    /** should never get a NULL pointer */
    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:461:M: |-> Set ieee8021BridgeBasePortIfIndex value.
     * set ieee8021BridgeBasePortIfIndex value in rowreq_ctx->data
     */
    rowreq_ctx->data.ieee8021BridgeBasePortIfIndex = ieee8021BridgeBasePortIfIndex_val;

    return MFD_SUCCESS;
} /* ieee8021BridgeBasePortIfIndex_set */

/**
 * undo the previous set.
 *
 * @param rowreq_ctx
 *        Pointer to the users context.
 */
int
ieee8021BridgeBasePortIfIndex_undo( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortIfIndex_undo","called\n"));

    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:456:o: |-> Clean up ieee8021BridgeBasePortIfIndex undo.
     */
    /*
     * copy ieee8021BridgeBasePortIfIndex data
     * set rowreq_ctx->data.ieee8021BridgeBasePortIfIndex from rowreq_ctx->undo->ieee8021BridgeBasePortIfIndex
     */
    rowreq_ctx->data.ieee8021BridgeBasePortIfIndex = rowreq_ctx->undo->ieee8021BridgeBasePortIfIndex;


    return MFD_SUCCESS;
} /* ieee8021BridgeBasePortIfIndex_undo */

/*---------------------------------------------------------------------
 * IEEE8021-BRIDGE-MIB::ieee8021BridgeBasePortEntry.ieee8021BridgeBasePortAdminPointToPoint
 * ieee8021BridgeBasePortAdminPointToPoint is subid 10 of ieee8021BridgeBasePortEntry.
 * Its status is Current, and its access level is ReadWrite.
 * OID: .1.3.111.2.802.1.1.2.1.1.4.1.10
 * Description:
For a port running spanning tree, this object represents the
         administrative point-to-point status of the LAN segment
         attached to this port, using the enumeration values of
         6.4.3.  A value of forceTrue(1) indicates
         that this port should always be treated as if it is
         connected to a point-to-point link.  A value of
         forceFalse(2) indicates that this port should be treated as
         having a shared media connection.  A value of auto(3)
         indicates that this port is considered to have a
         point-to-point link if it is an Aggregator and all of its
         members are aggregatable, or if the MAC entity
         is configured for full duplex operation, either through
         auto-negotiation or by management means.  Manipulating this
         object changes the underlying adminPointToPointMAC.

         For a VIP, the adminPointToPointMAC parameter controls
         the mechanism by which the Default Backbone Destination
         parameter for the VIP is determined.  For a backbone
         service instance that includes only 2 VIPs, the value
         may be set to forceTrue(1) which permits dynamic learning
         of the Default Backbone Destination parameter.  For a
         backbone service instance that includes more than 2 VIPs,
         the value must be set to ForceFalse(2) or auto(3).

         When this object is set to forceTrue(1) for a VIP, the
         Default Backbone Destination parameter is modified by
         the subsequent M_UNITDATA.indications as specified in
         6.10.1 (and described in 26.4.1).  Whenever the parameter
         is set to ForceFalse(2) or auto(3), the value for the
         Default Backbone Destination parameter is set to the
         Backbone Service Instance Group Address for the VIP-ISID.

         The value of this object MUST be retained across
         reinitializations of the management system.
 *
 * Attributes:
 *   accessible 1     isscalar 0     enums  1      hasdefval 1
 *   readable   1     iscolumn 1     ranges 0      hashint   0
 *   settable   1
 *   defval: forceFalse
 *
 * Enum range: 3/8. Values:  forceTrue(1), forceFalse(2), auto(3)
 *
 * Its syntax is INTEGER (based on perltype INTEGER)
 * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long)
 */
/**
 * Check that the proposed new value is potentially valid.
 *
 * @param rowreq_ctx
 *        Pointer to the row request context.
 * @param ieee8021BridgeBasePortAdminPointToPoint_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
 * ieee8021BridgeBasePortTable_check_dependencies() function.
 *
 * The following checks have already been done for you:
 *    The syntax is ASN_INTEGER
 *    The value is one of  forceTrue(1), forceFalse(2), auto(3)
 *
 * If there a no other checks you need to do, simply return MFD_SUCCESS.
 *
 */
int
ieee8021BridgeBasePortAdminPointToPoint_check_value( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx, u_long ieee8021BridgeBasePortAdminPointToPoint_val)
{
    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortAdminPointToPoint_check_value","called\n"));

    /** should never get a NULL pointer */
    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:441:o: |-> Check for valid ieee8021BridgeBasePortAdminPointToPoint value.
     */

    return MFD_SUCCESS; /* ieee8021BridgeBasePortAdminPointToPoint value not illegal */
} /* ieee8021BridgeBasePortAdminPointToPoint_check_value */

/**
 * Save old value information
 *
 * @param rowreq_ctx
 *        Pointer to the table context (ieee8021BridgeBasePortTable_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
 * ieee8021BridgeBasePortTable_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
ieee8021BridgeBasePortAdminPointToPoint_undo_setup( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortAdminPointToPoint_undo_setup","called\n"));

    /** should never get a NULL pointer */
    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:455:o: |-> Setup ieee8021BridgeBasePortAdminPointToPoint undo.
     */
    /*
     * copy ieee8021BridgeBasePortAdminPointToPoint data
     * set rowreq_ctx->undo->ieee8021BridgeBasePortAdminPointToPoint from rowreq_ctx->data.ieee8021BridgeBasePortAdminPointToPoint
     */
    rowreq_ctx->undo->ieee8021BridgeBasePortAdminPointToPoint = rowreq_ctx->data.ieee8021BridgeBasePortAdminPointToPoint;


    return MFD_SUCCESS;
} /* ieee8021BridgeBasePortAdminPointToPoint_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 ieee8021BridgeBasePortAdminPointToPoint_val
 *        A long containing the new value.
 */
int
ieee8021BridgeBasePortAdminPointToPoint_set( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx, u_long ieee8021BridgeBasePortAdminPointToPoint_val )
{

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortAdminPointToPoint_set","called\n"));

    /** should never get a NULL pointer */
    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:461:M: |-> Set ieee8021BridgeBasePortAdminPointToPoint value.
     * set ieee8021BridgeBasePortAdminPointToPoint value in rowreq_ctx->data
     */
    rowreq_ctx->data.ieee8021BridgeBasePortAdminPointToPoint = ieee8021BridgeBasePortAdminPointToPoint_val;

    return MFD_SUCCESS;
} /* ieee8021BridgeBasePortAdminPointToPoint_set */

/**
 * undo the previous set.
 *
 * @param rowreq_ctx
 *        Pointer to the users context.
 */
int
ieee8021BridgeBasePortAdminPointToPoint_undo( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{

    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortAdminPointToPoint_undo","called\n"));

    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:456:o: |-> Clean up ieee8021BridgeBasePortAdminPointToPoint undo.
     */
    /*
     * copy ieee8021BridgeBasePortAdminPointToPoint data
     * set rowreq_ctx->data.ieee8021BridgeBasePortAdminPointToPoint from rowreq_ctx->undo->ieee8021BridgeBasePortAdminPointToPoint
     */
    rowreq_ctx->data.ieee8021BridgeBasePortAdminPointToPoint = rowreq_ctx->undo->ieee8021BridgeBasePortAdminPointToPoint;


    return MFD_SUCCESS;
} /* ieee8021BridgeBasePortAdminPointToPoint_undo */

/**
 * check dependencies
 *
 * This is useful for for tables which have dependencies between columns
 * (or rows, or tables). For example, two columns allocating a percentage
 * of something add up 100%.
 *
 * 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
 * ieee8021BridgeBasePortTable_oids.h.
 * A new row will have the MFD_ROW_CREATED bit set in rowreq_flags.
 *
 * @retval MFD_SUCCESS all the changes to the row are legal
 * @retval MFD_ERROR   one or more changes are not legal
 *
 * (see README-table-ieee8021BridgeBasePortTable if you don't have dependencies)
 */
int
ieee8021BridgeBasePortTable_check_dependencies(ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    int rc = MFD_SUCCESS;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_check_dependencies","called\n"));

    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * TODO:470:o: Check ieee8021BridgeBasePortTable row dependencies.
     * check that all new value are legal and consistent with each other
     */
    return rc;
} /* ieee8021BridgeBasePortTable_check_dependencies */

/** @} */
