/*
 * Note: this file originally auto-generated by mib2c using
 *       version : 16927 $ 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 "ieee8021BridgeBasePortTable.h"


#include <net-snmp/agent/table_container.h>
#include <net-snmp/library/container.h>

#include "ieee8021BridgeBasePortTable_interface.h"

#include <ctype.h>

/**********************************************************************
 **********************************************************************
 ***
 *** 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
*/
typedef struct ieee8021BridgeBasePortTable_interface_ctx_s {

   netsnmp_container              *container;
   netsnmp_cache                  *cache;

   ieee8021BridgeBasePortTable_registration *      user_ctx;

   netsnmp_table_registration_info  tbl_info;

   netsnmp_baby_steps_access_methods access_multiplexer;

    u_int                             table_dirty;

} ieee8021BridgeBasePortTable_interface_ctx;

static ieee8021BridgeBasePortTable_interface_ctx ieee8021BridgeBasePortTable_if_ctx;

static void _ieee8021BridgeBasePortTable_container_init(
    ieee8021BridgeBasePortTable_interface_ctx *if_ctx);
static void _ieee8021BridgeBasePortTable_container_shutdown(
    ieee8021BridgeBasePortTable_interface_ctx *if_ctx);


netsnmp_container *
ieee8021BridgeBasePortTable_container_get( void )
{
    return ieee8021BridgeBasePortTable_if_ctx.container;
}

ieee8021BridgeBasePortTable_registration *
ieee8021BridgeBasePortTable_registration_get( void )
{
    return ieee8021BridgeBasePortTable_if_ctx.user_ctx;
}

ieee8021BridgeBasePortTable_registration *
ieee8021BridgeBasePortTable_registration_set( ieee8021BridgeBasePortTable_registration * newreg )
{
    ieee8021BridgeBasePortTable_registration * old = ieee8021BridgeBasePortTable_if_ctx.user_ctx;
    ieee8021BridgeBasePortTable_if_ctx.user_ctx = newreg;
    return old;
}

int
ieee8021BridgeBasePortTable_container_size( void )
{
    return CONTAINER_SIZE(ieee8021BridgeBasePortTable_if_ctx.container);
}

u_int
ieee8021BridgeBasePortTable_dirty_get( void )
{
    return ieee8021BridgeBasePortTable_if_ctx.table_dirty;
}

void
ieee8021BridgeBasePortTable_dirty_set( u_int status )
{
    DEBUGMSGTL(("ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_dirty_set",
                "called. was %d, now %d\n",
                ieee8021BridgeBasePortTable_if_ctx.table_dirty, status));
    ieee8021BridgeBasePortTable_if_ctx.table_dirty = status;
}

/*
 * mfd multiplexer modes
 */
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_pre_request;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_post_request;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_object_lookup;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_get_values;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_check_objects;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_undo_setup;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_set_values;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_undo_cleanup;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_undo_values;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_commit;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_undo_commit;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_irreversible_commit;
static Netsnmp_Node_Handler _mfd_ieee8021BridgeBasePortTable_check_dependencies;

ieee8021BridgeBasePortTable_data *ieee8021BridgeBasePortTable_allocate_data(void);

/**
 * @internal
 * Initialize the table ieee8021BridgeBasePortTable
 *    (Define its contents and how it's structured)
 */
void
_ieee8021BridgeBasePortTable_initialize_interface(ieee8021BridgeBasePortTable_registration * reg_ptr,  u_long flags)
{
    netsnmp_baby_steps_access_methods *access_multiplexer =
        &ieee8021BridgeBasePortTable_if_ctx.access_multiplexer;
    netsnmp_table_registration_info *tbl_info = &ieee8021BridgeBasePortTable_if_ctx.tbl_info;
    netsnmp_handler_registration *reginfo;
    netsnmp_mib_handler *handler;
    int    mfd_modes = 0;

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


    /*************************************************
     *
     * save interface context for ieee8021BridgeBasePortTable
     */
    /*
     * Setting up the table's definition
     */
    netsnmp_table_helper_add_indexes(tbl_info,
                                  ASN_UNSIGNED, /** index: ieee8021BridgeBasePortComponentId */
                                  ASN_UNSIGNED, /** index: ieee8021BridgeBasePort */
                             0);

    /*  Define the minimum and maximum accessible columns.  This
        optimizes retrival. */
    tbl_info->min_column = IEEE8021BRIDGEBASEPORTTABLE_MIN_COL;
    tbl_info->max_column = IEEE8021BRIDGEBASEPORTTABLE_MAX_COL;

    /*
     * save users context
     */
    ieee8021BridgeBasePortTable_if_ctx.user_ctx = reg_ptr;

    /*
     * call data access initialization code
     */
    ieee8021BridgeBasePortTable_init_data(reg_ptr);

    /*
     * set up the container
     */
    _ieee8021BridgeBasePortTable_container_init(&ieee8021BridgeBasePortTable_if_ctx);
    if (NULL == ieee8021BridgeBasePortTable_if_ctx.container) {
        snmp_log(LOG_ERR,"could not initialize container for ieee8021BridgeBasePortTable\n");
        return;
    }

    /*
     * access_multiplexer: REQUIRED wrapper for get request handling
     */
    access_multiplexer->object_lookup = _mfd_ieee8021BridgeBasePortTable_object_lookup;
    access_multiplexer->get_values = _mfd_ieee8021BridgeBasePortTable_get_values;

    /*
     * no wrappers yet
     */
    access_multiplexer->pre_request = _mfd_ieee8021BridgeBasePortTable_pre_request;
    access_multiplexer->post_request = _mfd_ieee8021BridgeBasePortTable_post_request;


    /*
     * REQUIRED wrappers for set request handling
     */
    access_multiplexer->object_syntax_checks = _mfd_ieee8021BridgeBasePortTable_check_objects;
    access_multiplexer->undo_setup = _mfd_ieee8021BridgeBasePortTable_undo_setup;
    access_multiplexer->undo_cleanup = _mfd_ieee8021BridgeBasePortTable_undo_cleanup;
    access_multiplexer->set_values = _mfd_ieee8021BridgeBasePortTable_set_values;
    access_multiplexer->undo_sets = _mfd_ieee8021BridgeBasePortTable_undo_values;

    /*
     * no wrappers yet
     */
    access_multiplexer->commit = _mfd_ieee8021BridgeBasePortTable_commit;
    access_multiplexer->undo_commit = _mfd_ieee8021BridgeBasePortTable_undo_commit;
    access_multiplexer->irreversible_commit = _mfd_ieee8021BridgeBasePortTable_irreversible_commit;

    /*
     * REQUIRED for tables with dependencies
     */
    access_multiplexer->consistency_checks = _mfd_ieee8021BridgeBasePortTable_check_dependencies;

    /*************************************************
     *
     * Create a registration, save our reg data, register table.
     */
    DEBUGMSGTL(("ieee8021BridgeBasePortTable:init_ieee8021BridgeBasePortTable",
                "Registering ieee8021BridgeBasePortTable as a mibs-for-dummies table.\n"));
    handler = netsnmp_baby_steps_access_multiplexer_get(access_multiplexer);
    reginfo = netsnmp_handler_registration_create("ieee8021BridgeBasePortTable", handler,
                                                  ieee8021BridgeBasePortTable_oid,
                                                  ieee8021BridgeBasePortTable_oid_size,
                                                  HANDLER_CAN_BABY_STEP |
                                                  HANDLER_CAN_RWRITE
                                                  );
    if(NULL == reginfo) {
        snmp_log(LOG_ERR,"error registering table ieee8021BridgeBasePortTable\n");
        return;
    }
    reginfo->my_reg_void = &ieee8021BridgeBasePortTable_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,
                                            ieee8021BridgeBasePortTable_if_ctx.container,
                                            TABLE_CONTAINER_KEY_NETSNMP_INDEX);
    netsnmp_inject_handler( reginfo, handler );

    /*************************************************
     *
     * inject cache helper
     */
    if(NULL != ieee8021BridgeBasePortTable_if_ctx.cache) {
        handler = netsnmp_cache_handler_get(ieee8021BridgeBasePortTable_if_ctx.cache);
        netsnmp_inject_handler( reginfo, handler );
    }

    /*
     * register table
     */
    netsnmp_register_table(reginfo, tbl_info);

} /* _ieee8021BridgeBasePortTable_initialize_interface */

/**
 * @internal
 * Shutdown the table ieee8021BridgeBasePortTable
 */
void
_ieee8021BridgeBasePortTable_shutdown_interface(ieee8021BridgeBasePortTable_registration * reg_ptr)
{
    /*
     * shutdown the container
     */
    _ieee8021BridgeBasePortTable_container_shutdown(&ieee8021BridgeBasePortTable_if_ctx);
}

void
ieee8021BridgeBasePortTable_valid_columns_set(netsnmp_column_info *vc)
{
    ieee8021BridgeBasePortTable_if_ctx.tbl_info.valid_columns = vc;
} /* ieee8021BridgeBasePortTable_valid_columns_set */

/**
 * @internal
 * convert the index component stored in the context to an oid
 */
int
ieee8021BridgeBasePortTable_index_to_oid(netsnmp_index *oid_idx,
                         ieee8021BridgeBasePortTable_mib_index *mib_idx)
{
    int err = SNMP_ERR_NOERROR;

    /*
     * temp storage for parsing indexes
     */
    /*
     * ieee8021BridgeBasePortComponentId(1)/IEEE8021PbbComponentIdentifier/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H
     */
    netsnmp_variable_list var_ieee8021BridgeBasePortComponentId;
    /*
     * ieee8021BridgeBasePort(2)/IEEE8021BridgePortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H
     */
    netsnmp_variable_list var_ieee8021BridgeBasePort;

    /*
     * set up varbinds
     */
    memset( &var_ieee8021BridgeBasePortComponentId, 0x00, sizeof(var_ieee8021BridgeBasePortComponentId) );
    var_ieee8021BridgeBasePortComponentId.type = ASN_UNSIGNED;
    memset( &var_ieee8021BridgeBasePort, 0x00, sizeof(var_ieee8021BridgeBasePort) );
    var_ieee8021BridgeBasePort.type = ASN_UNSIGNED;

    /*
     * chain temp index varbinds together
     */
    var_ieee8021BridgeBasePortComponentId.next_variable =  &var_ieee8021BridgeBasePort; var_ieee8021BridgeBasePort.next_variable =  NULL;


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

        /* ieee8021BridgeBasePortComponentId(1)/IEEE8021PbbComponentIdentifier/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H */
    snmp_set_var_value(&var_ieee8021BridgeBasePortComponentId, (u_char*)&mib_idx->ieee8021BridgeBasePortComponentId,
                       sizeof(mib_idx->ieee8021BridgeBasePortComponentId));

        /* ieee8021BridgeBasePort(2)/IEEE8021BridgePortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H */
    snmp_set_var_value(&var_ieee8021BridgeBasePort, (u_char*)&mib_idx->ieee8021BridgeBasePort,
                       sizeof(mib_idx->ieee8021BridgeBasePort));


    err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len,
                           NULL, 0, &var_ieee8021BridgeBasePortComponentId);
    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_ieee8021BridgeBasePortComponentId );

    return err;
} /* ieee8021BridgeBasePortTable_index_to_oid */

/**
 * extract ieee8021BridgeBasePortTable indexes from a netsnmp_index
 *
 * @retval SNMP_ERR_NOERROR  : no error
 * @retval SNMP_ERR_GENERR   : error
 */
int
ieee8021BridgeBasePortTable_index_from_oid(netsnmp_index *oid_idx,
                         ieee8021BridgeBasePortTable_mib_index *mib_idx)
{
    int err = SNMP_ERR_NOERROR;

    /*
     * temp storage for parsing indexes
     */
    /*
     * ieee8021BridgeBasePortComponentId(1)/IEEE8021PbbComponentIdentifier/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H
     */
    netsnmp_variable_list var_ieee8021BridgeBasePortComponentId;
    /*
     * ieee8021BridgeBasePort(2)/IEEE8021BridgePortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H
     */
    netsnmp_variable_list var_ieee8021BridgeBasePort;

    /*
     * set up varbinds
     */
    memset( &var_ieee8021BridgeBasePortComponentId, 0x00, sizeof(var_ieee8021BridgeBasePortComponentId) );
    var_ieee8021BridgeBasePortComponentId.type = ASN_UNSIGNED;
    memset( &var_ieee8021BridgeBasePort, 0x00, sizeof(var_ieee8021BridgeBasePort) );
    var_ieee8021BridgeBasePort.type = ASN_UNSIGNED;

    /*
     * chain temp index varbinds together
     */
    var_ieee8021BridgeBasePortComponentId.next_variable =  &var_ieee8021BridgeBasePort; var_ieee8021BridgeBasePort.next_variable =  NULL;


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

    /*
     * parse the oid into the individual index components
     */
    err = parse_oid_indexes( oid_idx->oids, oid_idx->len,
                             &var_ieee8021BridgeBasePortComponentId );
    if (err == SNMP_ERR_NOERROR) {
        /*
         * copy out values
         */
    mib_idx->ieee8021BridgeBasePortComponentId = *((u_long *)var_ieee8021BridgeBasePortComponentId.val.string);
    mib_idx->ieee8021BridgeBasePort = *((u_long *)var_ieee8021BridgeBasePort.val.string);


    }

    /*
     * parsing may have allocated memory. free it.
     */
    snmp_reset_var_buffers( &var_ieee8021BridgeBasePortComponentId );

    return err;
} /* ieee8021BridgeBasePortTable_index_from_oid */


/*
 * ieee8021BridgeBasePortTable_allocate_data
 *
 * Purpose: create new ieee8021BridgeBasePortTable_data.
 */
ieee8021BridgeBasePortTable_data *
ieee8021BridgeBasePortTable_allocate_data(void)
{
    ieee8021BridgeBasePortTable_data *rtn = SNMP_MALLOC_TYPEDEF(ieee8021BridgeBasePortTable_data);

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

    if(NULL == rtn) {
        snmp_log(LOG_ERR, "unable to malloc memory for new "
                 "ieee8021BridgeBasePortTable_data.\n");
    }

    return rtn;
} /* ieee8021BridgeBasePortTable_allocate_data */

/*
 * ieee8021BridgeBasePortTable_release_data
 *
 * Purpose: release ieee8021BridgeBasePortTable data.
 */
void
ieee8021BridgeBasePortTable_release_data(ieee8021BridgeBasePortTable_data *data)
{
    DEBUGMSGTL(("verbose:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_release_data","called\n"));

    free(data);
} /* ieee8021BridgeBasePortTable_release_data */

/* *********************************************************************
 * @internal
 * allocate resources for a ieee8021BridgeBasePortTable_rowreq_ctx
 */
ieee8021BridgeBasePortTable_rowreq_ctx *
ieee8021BridgeBasePortTable_allocate_rowreq_ctx(void *user_init_ctx)
{
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  SNMP_MALLOC_TYPEDEF(ieee8021BridgeBasePortTable_rowreq_ctx);

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

    if(NULL == rowreq_ctx) {
        snmp_log(LOG_ERR,"Couldn't allocate memory for a "
                 "ieee8021BridgeBasePortTable_rowreq_ctx.\n");
        return NULL;
    }

    rowreq_ctx->oid_idx.oids = rowreq_ctx->oid_tmp;

    rowreq_ctx->ieee8021BridgeBasePortTable_data_list = NULL;

    /*
     * if we allocated data, call init routine
     */
    if (!(rowreq_ctx->rowreq_flags & MFD_ROW_DATA_FROM_USER)) {
        if(SNMPERR_SUCCESS !=
            ieee8021BridgeBasePortTable_rowreq_ctx_init(rowreq_ctx, user_init_ctx)) {
           ieee8021BridgeBasePortTable_release_rowreq_ctx(rowreq_ctx);
           rowreq_ctx = NULL;
        }
    }

    return rowreq_ctx;
} /* ieee8021BridgeBasePortTable_allocate_rowreq_ctx */

/*
 * @internal
 * release resources for a ieee8021BridgeBasePortTable_rowreq_ctx
 */
void
ieee8021BridgeBasePortTable_release_rowreq_ctx(ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx)
{
    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:ieee8021BridgeBasePortTable_release_rowreq_ctx","called\n"));

    netsnmp_assert(NULL != rowreq_ctx);

    ieee8021BridgeBasePortTable_rowreq_ctx_cleanup(rowreq_ctx);

    if(rowreq_ctx->undo)
        ieee8021BridgeBasePortTable_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);
} /* ieee8021BridgeBasePortTable_release_rowreq_ctx */

/**
 * @internal
 * wrapper
 */
static int
_mfd_ieee8021BridgeBasePortTable_pre_request(netsnmp_mib_handler *handler,
                            netsnmp_handler_registration *reginfo,
                            netsnmp_agent_request_info *agtreq_info,
                            netsnmp_request_info *requests)
{
    int rc;

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

    if (1 != netsnmp_row_merge_status_first(reginfo, agtreq_info)) {
        DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable",
                    "skipping additional pre_request\n"));
        return SNMP_ERR_NOERROR;
    }

    rc = ieee8021BridgeBasePortTable_pre_request(ieee8021BridgeBasePortTable_if_ctx.user_ctx);
    if (MFD_SUCCESS != rc) {
        /*
         * nothing we can do about it but log it
         */
        DEBUGMSGTL(("ieee8021BridgeBasePortTable","error %d from "
                    "ieee8021BridgeBasePortTable_pre_request\n", rc));
        netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
    }

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_pre_request */

/**
 * @internal
 * wrapper
 */
static int
_mfd_ieee8021BridgeBasePortTable_post_request(netsnmp_mib_handler *handler,
                             netsnmp_handler_registration *reginfo,
                             netsnmp_agent_request_info *agtreq_info,
                             netsnmp_request_info *requests)
{
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);
    int rc, packet_rc;

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

    /*
     * release row context, if deleted
     */
    if (rowreq_ctx && (rowreq_ctx->rowreq_flags & MFD_ROW_DELETED))
        ieee8021BridgeBasePortTable_release_rowreq_ctx(rowreq_ctx);

    /*
     * wait for last call before calling user
     */
    if (1 != netsnmp_row_merge_status_last(reginfo, agtreq_info)) {
        DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable",
                    "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) && ieee8021BridgeBasePortTable_dirty_get()) {
        /*
         * we shouldn't get here. the undo steps should also clear
         * the dirty flags.
         */
        snmp_log(LOG_WARNING, "ieee8021BridgeBasePortTable dirty flag set in post_request "
                 "but status != SUCCESS.\n");
    }

    rc = ieee8021BridgeBasePortTable_post_request(ieee8021BridgeBasePortTable_if_ctx.user_ctx,packet_rc);
    if (MFD_SUCCESS != rc) {
        /*
         * nothing we can do about it but log it
         */
        DEBUGMSGTL(("ieee8021BridgeBasePortTable","error %d from "
                    "ieee8021BridgeBasePortTable_post_request\n", rc));
    }

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_post_request */

/**
 * @internal
 * wrapper
 */
static int
_mfd_ieee8021BridgeBasePortTable_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;
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);

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

    /*
     * get our context from mfd
     * ieee8021BridgeBasePortTable_interface_ctx *if_ctx =
     *             (ieee8021BridgeBasePortTable_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
        ieee8021BridgeBasePortTable_row_prep(rowreq_ctx);

    return SNMP_VALIDATE_ERR(rc);
} /* _mfd_ieee8021BridgeBasePortTable_object_lookup */

/***********************************************************************
 *
 * GET processing
 *
 ***********************************************************************/
/*
 * @internal
 * Retrieve the value for a particular column
 */
NETSNMP_STATIC_INLINE int
_ieee8021BridgeBasePortTable_get_column( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx,
                       netsnmp_variable_list *var, int column )
{
    int rc = SNMPERR_SUCCESS;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                "called for %d\n", column));


    netsnmp_assert(NULL != rowreq_ctx);

    switch(column) {

    /* ieee8021BridgeBasePortIfIndex(3)/InterfaceIndexOrZero/ASN_INTEGER/long(long)//l/A/W/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortIfIndex) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->val_len = sizeof(long);
    var->type = ASN_INTEGER;
rc = ieee8021BridgeBasePortIfIndex_get(rowreq_ctx, (long *)var->val.string );
        break;

    /* ieee8021BridgeBasePortDelayExceededDiscards(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTDELAYEXCEEDEDDISCARDS:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTDELAYEXCEEDEDDISCARDS_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortDelayExceededDiscards) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->val_len = sizeof(U64);
    var->type = ASN_COUNTER64;
rc = ieee8021BridgeBasePortDelayExceededDiscards_get(rowreq_ctx, (U64 *)var->val.string );
        break;

    /* ieee8021BridgeBasePortMtuExceededDiscards(5)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTMTUEXCEEDEDDISCARDS:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTMTUEXCEEDEDDISCARDS_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortMtuExceededDiscards) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->val_len = sizeof(U64);
    var->type = ASN_COUNTER64;
rc = ieee8021BridgeBasePortMtuExceededDiscards_get(rowreq_ctx, (U64 *)var->val.string );
        break;

    /* ieee8021BridgeBasePortCapabilities(6)/BITS/ASN_OCTET_STR/char(u_long)//L/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTCAPABILITIES:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTCAPABILITIES_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortCapabilities) doesn't exist\n", column));
            return MFD_SKIP;
        }

    {
        u_long mask = 0xff << ((sizeof(u_long) - 1) * 8);
        int       idx = 0;
    var->type = ASN_OCTET_STR;
rc = ieee8021BridgeBasePortCapabilities_get(rowreq_ctx, (u_long *)var->val.string );
        /*
         * check for length of bits string
         */
        var->val_len = 0;
        while( 0 != mask ) {
            ++idx;
            if ( *((u_long *) var->val.string) & mask )
                var->val_len = idx;
            mask = mask >> 8;
        }
    }
        break;

    /* ieee8021BridgeBasePortTypeCapabilities(7)/BITS/ASN_OCTET_STR/char(u_long)//L/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTTYPECAPABILITIES:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTTYPECAPABILITIES_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortTypeCapabilities) doesn't exist\n", column));
            return MFD_SKIP;
        }

    {
        u_long mask = 0xff << ((sizeof(u_long) - 1) * 8);
        int       idx = 0;
    var->type = ASN_OCTET_STR;
rc = ieee8021BridgeBasePortTypeCapabilities_get(rowreq_ctx, (u_long *)var->val.string );
        /*
         * check for length of bits string
         */
        var->val_len = 0;
        while( 0 != mask ) {
            ++idx;
            if ( *((u_long *) var->val.string) & mask )
                var->val_len = idx;
            mask = mask >> 8;
        }
    }
        break;

    /* ieee8021BridgeBasePortType(8)/IEEE8021BridgePortType/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTTYPE:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTTYPE_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortType) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->val_len = sizeof(u_long);
    var->type = ASN_INTEGER;
rc = ieee8021BridgeBasePortType_get(rowreq_ctx, (u_long *)var->val.string );
        break;

    /* ieee8021BridgeBasePortExternal(9)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTEXTERNAL:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTEXTERNAL_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortExternal) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->val_len = sizeof(u_long);
    var->type = ASN_INTEGER;
rc = ieee8021BridgeBasePortExternal_get(rowreq_ctx, (u_long *)var->val.string );
        break;

    /* ieee8021BridgeBasePortAdminPointToPoint(10)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/D/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortAdminPointToPoint) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->val_len = sizeof(u_long);
    var->type = ASN_INTEGER;
rc = ieee8021BridgeBasePortAdminPointToPoint_get(rowreq_ctx, (u_long *)var->val.string );
        break;

    /* ieee8021BridgeBasePortOperPointToPoint(11)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTOPERPOINTTOPOINT:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTOPERPOINTTOPOINT_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortOperPointToPoint) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->val_len = sizeof(u_long);
    var->type = ASN_INTEGER;
rc = ieee8021BridgeBasePortOperPointToPoint_get(rowreq_ctx, (u_long *)var->val.string );
        break;

    /* ieee8021BridgeBasePortName(12)/SnmpAdminString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTNAME:
        if (! (COLUMN_IEEE8021BRIDGEBASEPORTNAME_FLAG & rowreq_ctx->column_exists_flags)) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                        "column %d (ieee8021BridgeBasePortName) doesn't exist\n", column));
            return MFD_SKIP;
        }

    var->type = ASN_OCTET_STR;
rc = ieee8021BridgeBasePortName_get(rowreq_ctx, (char **)&var->val.string, &var->val_len );
        break;

     default:
        if (IEEE8021BRIDGEBASEPORTTABLE_MIN_COL <= column && column <= IEEE8021BRIDGEBASEPORTTABLE_MAX_COL) {
            DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_column",
                "assume column %d is reserved\n", column));
            rc = MFD_SKIP;
        } else {
            snmp_log(LOG_ERR,
                "unknown column %d in _ieee8021BridgeBasePortTable_get_column\n", column);
        }
        break;
    }

    return rc;
} /* _ieee8021BridgeBasePortTable_get_column */

int
_mfd_ieee8021BridgeBasePortTable_get_values(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    ieee8021BridgeBasePortTable_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:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_values","called\n"));

    netsnmp_assert(NULL != rowreq_ctx);

    DEBUGMSGTL(("9:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_get_values",
                "exists %p\n", (void*)rowreq_ctx->column_exists_flags));

    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 = _ieee8021BridgeBasePortTable_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_ieee8021BridgeBasePortTable_get_values */

/***********************************************************************
 *
 * SET processing
 *
 ***********************************************************************/

/*----------------------------------------------------------------------
 *
 * SET: Syntax checks
 *
 *---------------------------------------------------------------------*/
/*
 * @internal
 * Check the syntax for a particular column
 */
NETSNMP_STATIC_INLINE int
_ieee8021BridgeBasePortTable_check_column( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx,
                         netsnmp_variable_list *var, int column )
{
    int rc = SNMPERR_SUCCESS;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_check_column",
                "called for %d\n", column));

    netsnmp_assert(NULL != rowreq_ctx);

    switch(column) {
    /* (INDEX) ieee8021BridgeBasePortComponentId(1)/IEEE8021PbbComponentIdentifier/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTCOMPONENTID:
        rc = SNMP_ERR_NOTWRITABLE; /* can not change index of active row */
        break;
    /* (INDEX) ieee8021BridgeBasePort(2)/IEEE8021BridgePortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORT:
        rc = SNMP_ERR_NOTWRITABLE; /* can not change index of active row */
        break;

    /* ieee8021BridgeBasePortIfIndex(3)/InterfaceIndexOrZero/ASN_INTEGER/long(long)//l/A/W/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX:
    rc = netsnmp_check_vb_type_and_size( var, ASN_INTEGER,
        sizeof( rowreq_ctx->data.ieee8021BridgeBasePortIfIndex ) );
    /* check defined range(s). */
    if( (SNMPERR_SUCCESS == rc)
       && ((*var->val.integer < 0) || (*var->val.integer > 2147483647))
     ) {
        rc = SNMP_ERR_WRONGVALUE;
    }
    if(SNMPERR_SUCCESS != rc) {
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_check_column:ieee8021BridgeBasePortIfIndex",
                    "varbind validation failed (eg bad type or size)\n"));
    }
    else {
        rc = ieee8021BridgeBasePortIfIndex_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 ieee8021BridgeBasePortIfIndex_check_value\n", rc);
            rc = SNMP_ERR_GENERR;
        }
    }
        break;

    /* ieee8021BridgeBasePortDelayExceededDiscards(4)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTDELAYEXCEEDEDDISCARDS:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

    /* ieee8021BridgeBasePortMtuExceededDiscards(5)/COUNTER64/ASN_COUNTER64/U64(U64)//l/A/w/e/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTMTUEXCEEDEDDISCARDS:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

    /* ieee8021BridgeBasePortCapabilities(6)/BITS/ASN_OCTET_STR/char(u_long)//L/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTCAPABILITIES:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

    /* ieee8021BridgeBasePortTypeCapabilities(7)/BITS/ASN_OCTET_STR/char(u_long)//L/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTTYPECAPABILITIES:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

    /* ieee8021BridgeBasePortType(8)/IEEE8021BridgePortType/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTTYPE:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

    /* ieee8021BridgeBasePortExternal(9)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTEXTERNAL:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

    /* ieee8021BridgeBasePortAdminPointToPoint(10)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/D/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT:
    rc = netsnmp_check_vb_type_and_size( var, ASN_INTEGER,
        sizeof( rowreq_ctx->data.ieee8021BridgeBasePortAdminPointToPoint ) );
    /* check that the value is one of defined enums */
    if( (SNMPERR_SUCCESS == rc)
 && ( *var->val.integer != IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FORCETRUE )
 && ( *var->val.integer != IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FORCEFALSE )
 && ( *var->val.integer != IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_AUTO )
        ) {
        rc = SNMP_ERR_WRONGVALUE;
        }
    if(SNMPERR_SUCCESS != rc) {
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_check_column:ieee8021BridgeBasePortAdminPointToPoint",
                    "varbind validation failed (eg bad type or size)\n"));
    }
    else {
        rc = ieee8021BridgeBasePortAdminPointToPoint_check_value( rowreq_ctx, *((u_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 ieee8021BridgeBasePortAdminPointToPoint_check_value\n", rc);
            rc = SNMP_ERR_GENERR;
        }
    }
        break;

    /* ieee8021BridgeBasePortOperPointToPoint(11)/TruthValue/ASN_INTEGER/long(u_long)//l/A/w/E/r/d/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTOPERPOINTTOPOINT:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

    /* ieee8021BridgeBasePortName(12)/SnmpAdminString/ASN_OCTET_STR/char(char)//L/A/w/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTNAME:
        rc = SNMP_ERR_NOTWRITABLE;
        break;

        default: /** We shouldn't get here */
            rc = SNMP_ERR_GENERR;
            snmp_log(LOG_ERR, "unknown column %d in _ieee8021BridgeBasePortTable_check_column\n", column);
    }

    return rc;
} /* _ieee8021BridgeBasePortTable_check_column */

int
_mfd_ieee8021BridgeBasePortTable_check_objects(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);
    netsnmp_table_request_info * tri;
    int                          rc;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_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 = _ieee8021BridgeBasePortTable_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_ieee8021BridgeBasePortTable_check_objects */


/*----------------------------------------------------------------------
 *
 * SET: check dependencies
 *
 *---------------------------------------------------------------------*/
/*
 * @internal
 * Check dependencies wrapper
 */
static int
_mfd_ieee8021BridgeBasePortTable_check_dependencies(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    int                    rc;
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);
    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_check_dependencies","called\n"));

    netsnmp_assert(NULL != rowreq_ctx);

    rc = ieee8021BridgeBasePortTable_check_dependencies(rowreq_ctx);
    if(rc){
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                    "ieee8021BridgeBasePortTable_check_dependencies\n", rc));
        netsnmp_request_set_error_all(requests, SNMP_VALIDATE_ERR(rc));
    }

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_check_dependencies */

/*----------------------------------------------------------------------
 *
 * SET: Undo setup
 *
 *---------------------------------------------------------------------*/
/*
 * @internal
 * Set the value for a particular column
 */
NETSNMP_STATIC_INLINE int
_ieee8021BridgeBasePortTable_undo_setup_column( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx, int column )
{
    int rc = SNMPERR_SUCCESS;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_undo_setup_column",
                "called for %d\n", column));

    netsnmp_assert(NULL != rowreq_ctx);

    switch(column) {

    /* ieee8021BridgeBasePortIfIndex(3)/InterfaceIndexOrZero/ASN_INTEGER/long(long)//l/A/W/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX:
        rowreq_ctx->column_set_flags |= COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX_FLAG;
        rc = ieee8021BridgeBasePortIfIndex_undo_setup(rowreq_ctx );
        break;

    /* ieee8021BridgeBasePortAdminPointToPoint(10)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/D/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT:
        rowreq_ctx->column_set_flags |= COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FLAG;
        rc = ieee8021BridgeBasePortAdminPointToPoint_undo_setup(rowreq_ctx );
        break;

     default:
         snmp_log(LOG_ERR,"unknown column %d in _ieee8021BridgeBasePortTable_undo_setup_column\n", column);
         break;
    }

    return rc;
} /* _ieee8021BridgeBasePortTable_undo_setup_column */


/**
 * @internal
 * undo setup
 */
int
_mfd_ieee8021BridgeBasePortTable_undo_setup(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    int                    rc;
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);

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

    netsnmp_assert(NULL != rowreq_ctx);

    /*
     * allocate undo context
     */
    rowreq_ctx->undo = ieee8021BridgeBasePortTable_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 = ieee8021BridgeBasePortTable_undo_setup(rowreq_ctx);
    if (MFD_SUCCESS != rc)  {
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                    "ieee8021BridgeBasePortTable_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 = _ieee8021BridgeBasePortTable_undo_setup_column(rowreq_ctx, tri->colnum);
            if(MFD_SUCCESS != rc)  {
                DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                            "ieee8021BridgeBasePortTable_undo_setup_column\n", rc));
                netsnmp_set_request_error(agtreq_info, requests, SNMP_VALIDATE_ERR(rc));
            }
        } /* for results */
    }

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_undo_setup */

/**
 * @internal
 * undo setup
 */
int
_mfd_ieee8021BridgeBasePortTable_undo_cleanup(netsnmp_mib_handler *handler,
                             netsnmp_handler_registration *reginfo,
                             netsnmp_agent_request_info *agtreq_info,
                             netsnmp_request_info *requests)
{
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);
    int rc;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_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 = ieee8021BridgeBasePortTable_undo_cleanup(rowreq_ctx);
    if (MFD_SUCCESS != rc) {
        /*
         * nothing we can do about it but log it
         */
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                    "ieee8021BridgeBasePortTable_undo_cleanup\n", rc));
    }

    /*
     * release undo context, if needed
     */
    if(rowreq_ctx->undo) {
         ieee8021BridgeBasePortTable_release_data(rowreq_ctx->undo);
         rowreq_ctx->undo = NULL;
    }


    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_undo_cleanup */

/*----------------------------------------------------------------------
 *
 * SET: Set values
 *
 *---------------------------------------------------------------------*/
/*
 * @internal
 * Set the value for a particular column
 */
NETSNMP_STATIC_INLINE int
_ieee8021BridgeBasePortTable_set_column( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx,
                       netsnmp_variable_list *var, int column )
{
    int rc = SNMPERR_SUCCESS;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_set_column",
                "called for %d\n", column));

    netsnmp_assert(NULL != rowreq_ctx);

    switch(column) {

    /* ieee8021BridgeBasePortIfIndex(3)/InterfaceIndexOrZero/ASN_INTEGER/long(long)//l/A/W/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX:
        rowreq_ctx->column_set_flags |= COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX_FLAG;
        rc = ieee8021BridgeBasePortIfIndex_set(rowreq_ctx, *((long *)var->val.string) );
        break;

    /* ieee8021BridgeBasePortAdminPointToPoint(10)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/D/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT:
        rowreq_ctx->column_set_flags |= COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT_FLAG;
        rc = ieee8021BridgeBasePortAdminPointToPoint_set(rowreq_ctx, *((u_long *)var->val.string) );
        break;

     default:
         snmp_log(LOG_ERR,"unknown column %d in _ieee8021BridgeBasePortTable_set_column\n", column);
         rc = SNMP_ERR_GENERR;
         break;
    }

    return rc;
} /* _ieee8021BridgeBasePortTable_set_column */

int
_mfd_ieee8021BridgeBasePortTable_set_values(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);
    netsnmp_table_request_info * tri;
    int                          rc = SNMP_ERR_NOERROR;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_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 = _ieee8021BridgeBasePortTable_set_column(rowreq_ctx,
                                    requests->requestvb, tri->colnum);
        if(MFD_SUCCESS != rc)  {
            DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                        "ieee8021BridgeBasePortTable_set_column\n", rc));
            netsnmp_set_request_error(agtreq_info, requests, SNMP_VALIDATE_ERR(rc));
        }
    } /* for results */

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_set_values */

/*----------------------------------------------------------------------
 *
 * SET: commit
 *
 *---------------------------------------------------------------------*/
/**
 * @internal
 * commit the values
 */
int
_mfd_ieee8021BridgeBasePortTable_commit(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    int                    rc;
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);

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

    netsnmp_assert(NULL != rowreq_ctx);

    rc = ieee8021BridgeBasePortTable_commit(rowreq_ctx);
    if (MFD_SUCCESS != rc) {
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                    "ieee8021BridgeBasePortTable_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...
         */
        ieee8021BridgeBasePortTable_dirty_set( ieee8021BridgeBasePortTable_dirty_get() + 1 ); /* set table dirty flag */
    }

    return SNMP_ERR_NOERROR;
}

int
_mfd_ieee8021BridgeBasePortTable_undo_commit(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    int                    rc;
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);

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

    netsnmp_assert(NULL != rowreq_ctx);

    if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
        u_int  d = ieee8021BridgeBasePortTable_dirty_get();

        netsnmp_assert(d != 0);
        if(d)
            ieee8021BridgeBasePortTable_dirty_set( d - 1 );
    }

    rc = ieee8021BridgeBasePortTable_undo_commit(rowreq_ctx);
    if (MFD_SUCCESS != rc) {
        /*
         * nothing we can do about it but log it
         */
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                    "ieee8021BridgeBasePortTable_undo_commit\n", rc));
    }

    if (rowreq_ctx->rowreq_flags & MFD_ROW_DIRTY) {
        snmp_log(LOG_WARNING, "ieee8021BridgeBasePortTable row dirty flag still set after undo_commit\n");
        rowreq_ctx->rowreq_flags &= ~MFD_ROW_DIRTY;
    }

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_commit */

/*----------------------------------------------------------------------
 *
 * SET: Undo
 *
 *---------------------------------------------------------------------*/
/**
 * @internal
 * undo the value for a particular column
 */
NETSNMP_STATIC_INLINE int
_ieee8021BridgeBasePortTable_undo_column( ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx,
                       netsnmp_variable_list *var, int column )
{
    int rc = SNMPERR_SUCCESS;

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_undo_column",
                "called for %d\n", column));

    netsnmp_assert(NULL != rowreq_ctx);

    switch(column) {

    /* ieee8021BridgeBasePortIfIndex(3)/InterfaceIndexOrZero/ASN_INTEGER/long(long)//l/A/W/e/R/d/H */
    case COLUMN_IEEE8021BRIDGEBASEPORTIFINDEX:
        rc = ieee8021BridgeBasePortIfIndex_undo(rowreq_ctx);
        break;

    /* ieee8021BridgeBasePortAdminPointToPoint(10)/INTEGER/ASN_INTEGER/long(u_long)//l/A/W/E/r/D/h */
    case COLUMN_IEEE8021BRIDGEBASEPORTADMINPOINTTOPOINT:
        rc = ieee8021BridgeBasePortAdminPointToPoint_undo(rowreq_ctx);
        break;

     default:
         snmp_log(LOG_ERR,"unknown column %d in _ieee8021BridgeBasePortTable_undo_column\n", column);
         break;
    }

    return rc;
} /* _ieee8021BridgeBasePortTable_undo_column */

int
_mfd_ieee8021BridgeBasePortTable_undo_values(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    int                    rc;
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);
    netsnmp_table_request_info * tri;

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

    netsnmp_assert(NULL != rowreq_ctx);

    rc = ieee8021BridgeBasePortTable_undo(rowreq_ctx);
    if (MFD_SUCCESS != rc) {
        /*
         * nothing we can do about it but log it
         */
        DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                    "ieee8021BridgeBasePortTable_undo\n", rc));
    }

    for(;requests; requests = requests->next) {
        /*
         * set column data
         */
        tri = netsnmp_extract_table_info(requests);
        if(NULL == tri)
            continue;

        rc = _ieee8021BridgeBasePortTable_undo_column(rowreq_ctx, requests->requestvb,
                                     tri->colnum);
        if (MFD_SUCCESS != rc) {
            /*
             * nothing we can do about it but log it
             */
            DEBUGMSGTL(("ieee8021BridgeBasePortTable:mfd","error %d from "
                        "ieee8021BridgeBasePortTable_undo_column\n", rc));
        }
    } /* for results */

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_undo_values */

/*----------------------------------------------------------------------
 *
 * SET: irreversible commit
 *
 *---------------------------------------------------------------------*/
/**
 * @internal
 * commit irreversible actions
 */
int
_mfd_ieee8021BridgeBasePortTable_irreversible_commit(netsnmp_mib_handler *handler,
                         netsnmp_handler_registration *reginfo,
                         netsnmp_agent_request_info *agtreq_info,
                         netsnmp_request_info *requests)
{
    ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx =
                  netsnmp_container_table_row_extract(requests);

    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_ieee8021BridgeBasePortTable_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(ieee8021BridgeBasePortTable_if_ctx.container, rowreq_ctx);
    }
    else {
        if (rowreq_ctx->column_set_flags) {
           DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_mfd_irreversible_commit",
                       "updating exists (%p) w/set (%p) = %p\n",
                       rowreq_ctx->column_exists_flags,
                       rowreq_ctx->column_set_flags,
                       (rowreq_ctx->column_exists_flags |
                        rowreq_ctx->column_set_flags)));
           rowreq_ctx->column_exists_flags |=
           rowreq_ctx->column_set_flags;
           rowreq_ctx->column_set_flags = 0;
        }
    }

    return SNMP_ERR_NOERROR;
} /* _mfd_ieee8021BridgeBasePortTable_irreversible_commit */

/***********************************************************************
 *
 * DATA ACCESS
 *
 ***********************************************************************/
static void _container_free(netsnmp_container *container);

/**
 * @internal
 */
static int
_cache_load(netsnmp_cache *cache, void *vmagic)
{
    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_cache_load","called\n"));

    if((NULL == cache) || (NULL == cache->magic)) {
        snmp_log(LOG_ERR, "invalid cache for ieee8021BridgeBasePortTable_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 ieee8021BridgeBasePortTable_container_load((netsnmp_container*)cache->magic);
} /* _cache_load */

/**
 * @internal
 */
static void
_cache_free(netsnmp_cache *cache, void *magic)
{
    netsnmp_container *container;

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

    if((NULL == cache) || (NULL == cache->magic)) {
        snmp_log(LOG_ERR, "invalid cache in ieee8021BridgeBasePortTable_cache_free\n");
        return;
    }

    container = (netsnmp_container*)cache->magic;

    _container_free(container);
} /* _cache_free */

/**
 * @internal
 */
static void
_container_item_free(ieee8021BridgeBasePortTable_rowreq_ctx *rowreq_ctx, void *context)
{
    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_container_item_free","called\n"));

    if(NULL == rowreq_ctx)
        return;

    ieee8021BridgeBasePortTable_release_rowreq_ctx(rowreq_ctx);
} /* _container_item_free */

/**
 * @internal
 */
static void
_container_free(netsnmp_container *container)
{
    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_container_free","called\n"));

    if (NULL == container) {
        snmp_log(LOG_ERR, "invalid container in ieee8021BridgeBasePortTable_container_free\n");
        return;
    }

    /*
     * call user code
     */
    ieee8021BridgeBasePortTable_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
_ieee8021BridgeBasePortTable_container_init(ieee8021BridgeBasePortTable_interface_ctx *if_ctx)
{
    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_container_init","called\n"));

    /*
     * cache init
     */
    if_ctx->cache = netsnmp_cache_create(30, /* timeout in seconds */
                                         _cache_load, _cache_free,
                                         ieee8021BridgeBasePortTable_oid,
                                         ieee8021BridgeBasePortTable_oid_size);

    if(NULL == if_ctx->cache) {
        snmp_log(LOG_ERR, "error creating cache for ieee8021BridgeBasePortTable\n");
        return;
    }

    if_ctx->cache->flags = NETSNMP_CACHE_DONT_INVALIDATE_ON_SET;

    ieee8021BridgeBasePortTable_container_init(&if_ctx->container, if_ctx->cache);
    if(NULL == if_ctx->container)
        if_ctx->container = netsnmp_container_find("ieee8021BridgeBasePortTable:table_container");
    if(NULL == if_ctx->container) {
        snmp_log(LOG_ERR,"error creating container in "
                 "ieee8021BridgeBasePortTable_container_init\n");
        return;
    }

    if (NULL != if_ctx->cache)
        if_ctx->cache->magic = (void*)if_ctx->container;
} /* _ieee8021BridgeBasePortTable_container_init */

/**
 * @internal
 * shutdown the container with functions or wrappers
 */
void
_ieee8021BridgeBasePortTable_container_shutdown(ieee8021BridgeBasePortTable_interface_ctx *if_ctx)
{
    DEBUGMSGTL(("internal:ieee8021BridgeBasePortTable:_ieee8021BridgeBasePortTable_container_shutdown","called\n"));

    ieee8021BridgeBasePortTable_container_shutdown(if_ctx->container);

    _container_free(if_ctx->container);

} /* _ieee8021BridgeBasePortTable_container_shutdown */


ieee8021BridgeBasePortTable_rowreq_ctx *
ieee8021BridgeBasePortTable_row_find_by_mib_index(ieee8021BridgeBasePortTable_mib_index *mib_idx)
{
    ieee8021BridgeBasePortTable_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 = ieee8021BridgeBasePortTable_index_to_oid(&oid_idx, mib_idx);
    if (MFD_SUCCESS != rc)
        return NULL;

    rowreq_ctx = CONTAINER_FIND(ieee8021BridgeBasePortTable_if_ctx.container, &oid_idx);

    return rowreq_ctx;
}
