⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipcidrroutetable.c

📁 开发snmp的开发包有两个开放的SNMP开发库
💻 C
📖 第 1 页 / 共 5 页
字号:
    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteTable_undo_commit",                "called\n"));    /** we should have a non-NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:485:M: |-> Undo ipCidrRouteTable 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;}                               /* ipCidrRouteTable_undo_commit *//* * TODO:440:M: Implement ipCidrRouteTable node value checks. * TODO:450:M: Implement ipCidrRouteTable undo functions. * TODO:460:M: Implement ipCidrRouteTable set functions. * TODO:480:M: Implement ipCidrRouteTable commit functions. *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::ipCidrRouteEntry.ipCidrRouteIfIndex * ipCidrRouteIfIndex is subid 5 of ipCidrRouteEntry. * Its status is Deprecated, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.4.1.5 * Description:The ifIndex value which identifies  the local interface                 through which the next hop of this route should be                  reached. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 1 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 *   defval: 0 * * * Its syntax is INTEGER32 (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 ipCidrRouteIfIndex_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 * ipCidrRouteTable_check_dependencies() function. * * The following checks have already been done for you: *    The syntax is ASN_INTEGER * * If there a no other checks you need to do, simply return MFD_SUCCESS. * */intipCidrRouteIfIndex_check_value(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,                               long ipCidrRouteIfIndex_val){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteIfIndex_check_value",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:441:o: |-> Check for valid ipCidrRouteIfIndex value.     */    return MFD_SUCCESS;         /* ipCidrRouteIfIndex value not illegal */}                               /* ipCidrRouteIfIndex_check_value *//** * Save old value information * * @param rowreq_ctx *        Pointer to the table context (ipCidrRouteTable_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 * ipCidrRouteTable_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. */intipCidrRouteIfIndex_undo_setup(ipCidrRouteTable_rowreq_ctx * rowreq_ctx){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteIfIndex_undo_setup",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:455:o: |-> Setup ipCidrRouteIfIndex undo.     */    /*     * copy ipCidrRouteIfIndex data     * set rowreq_ctx->undo->ipCidrRouteIfIndex from rowreq_ctx->data->ipCidrRouteIfIndex     */    return MFD_SUCCESS;}                               /* ipCidrRouteIfIndex_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 ipCidrRouteIfIndex_val *        A long containing the new value. */intipCidrRouteIfIndex_set(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,                       long ipCidrRouteIfIndex_val){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteIfIndex_set",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:461:M: |-> Set ipCidrRouteIfIndex value.     * set ipCidrRouteIfIndex value in rowreq_ctx->data     */    return MFD_SUCCESS;}                               /* ipCidrRouteIfIndex_set *//** * undo the previous set. * * @param rowreq_ctx *        Pointer to the users context. */intipCidrRouteIfIndex_undo(ipCidrRouteTable_rowreq_ctx * rowreq_ctx){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteIfIndex_undo",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:456:o: |-> Clean up ipCidrRouteIfIndex undo.     */    /*     * copy ipCidrRouteIfIndex data     * set rowreq_ctx->data->ipCidrRouteIfIndex from rowreq_ctx->undo->ipCidrRouteIfIndex     */    return MFD_SUCCESS;}                               /* ipCidrRouteIfIndex_undo *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::ipCidrRouteEntry.ipCidrRouteType * ipCidrRouteType is subid 6 of ipCidrRouteEntry. * Its status is Deprecated, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.4.1.6 * Description:The type of route.  Note that local(3) refers to a                  route for which the next hop is the final destination;                   remote(4) refers to a route for which the next hop is                  not the final destination.                 Routes which do not result in traffic forwarding or                 rejection should not be displayed even if the                  implementation keeps them stored internally.                 reject (2) refers to a route which, if matched,                  discards the message as unreachable. This is used in                  some protocols as a means of correctly aggregating                  routes. * * Attributes: *   accessible 1     isscalar 0     enums  1      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 * * Enum range: 3/8. Values:  other(1), reject(2), local(3), remote(4) * * 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 ipCidrRouteType_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 * ipCidrRouteTable_check_dependencies() function. * * The following checks have already been done for you: *    The syntax is ASN_INTEGER *    The value is one of  other(1), reject(2), local(3), remote(4) * * If there a no other checks you need to do, simply return MFD_SUCCESS. * */intipCidrRouteType_check_value(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,                            u_long ipCidrRouteType_val){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteType_check_value",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:441:o: |-> Check for valid ipCidrRouteType value.     */    return MFD_SUCCESS;         /* ipCidrRouteType value not illegal */}                               /* ipCidrRouteType_check_value *//** * Save old value information * * @param rowreq_ctx *        Pointer to the table context (ipCidrRouteTable_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 * ipCidrRouteTable_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. */intipCidrRouteType_undo_setup(ipCidrRouteTable_rowreq_ctx * rowreq_ctx){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteType_undo_setup",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:455:o: |-> Setup ipCidrRouteType undo.     */    /*     * copy ipCidrRouteType data     * set rowreq_ctx->undo->ipCidrRouteType from rowreq_ctx->data->ipCidrRouteType     */    return MFD_SUCCESS;}                               /* ipCidrRouteType_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 ipCidrRouteType_val *        A long containing the new value. */intipCidrRouteType_set(ipCidrRouteTable_rowreq_ctx * rowreq_ctx,                    u_long ipCidrRouteType_val){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteType_set",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:461:M: |-> Set ipCidrRouteType value.     * set ipCidrRouteType value in rowreq_ctx->data     */    return MFD_SUCCESS;}                               /* ipCidrRouteType_set *//** * undo the previous set. * * @param rowreq_ctx *        Pointer to the users context. */intipCidrRouteType_undo(ipCidrRouteTable_rowreq_ctx * rowreq_ctx){    DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteType_undo",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:456:o: |-> Clean up ipCidrRouteType undo.     */    /*     * copy ipCidrRouteType data     * set rowreq_ctx->data->ipCidrRouteType from rowreq_ctx->undo->ipCidrRouteType     */    return MFD_SUCCESS;}                               /* ipCidrRouteType_undo *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::ipCidrRouteEntry.ipCidrRouteInfo * ipCidrRouteInfo is subid 9 of ipCidrRouteEntry. * Its status is Deprecated, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.4.1.9 * Description:A reference to MIB definitions specific to the           

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -