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

📄 ipv6interfacetable.c

📁 开发snmp的开发包有两个开放的SNMP开发库
💻 C
📖 第 1 页 / 共 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 ipv6InterfaceEnableStatus_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 * ipv6InterfaceTable_check_dependencies() function. * * The following checks have already been done for you: *    The syntax is ASN_INTEGER *    The value is one of  up(1), down(2) * * If there a no other checks you need to do, simply return MFD_SUCCESS. * */intipv6InterfaceEnableStatus_check_value(ipv6InterfaceTable_rowreq_ctx *                                      rowreq_ctx,                                      u_long ipv6InterfaceEnableStatus_val){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceEnableStatus_check_value", "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:441:o: |-> Check for valid ipv6InterfaceEnableStatus value.     */    return MFD_SUCCESS;         /* ipv6InterfaceEnableStatus value not illegal */}                               /* ipv6InterfaceEnableStatus_check_value *//** * Save old value information * * @param rowreq_ctx *        Pointer to the table context (ipv6InterfaceTable_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 * ipv6InterfaceTable_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. */intipv6InterfaceEnableStatus_undo_setup(ipv6InterfaceTable_rowreq_ctx *                                     rowreq_ctx){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceEnableStatus_undo_setup", "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:455:o: |-> Setup ipv6InterfaceEnableStatus undo.     */    /*     * copy ipv6InterfaceEnableStatus data     * set rowreq_ctx->undo->ipv6InterfaceEnableStatus from rowreq_ctx->data.ipv6InterfaceEnableStatus     */    rowreq_ctx->undo->ipv6InterfaceEnableStatus =        rowreq_ctx->data.ipv6InterfaceEnableStatus;    return MFD_SUCCESS;}                               /* ipv6InterfaceEnableStatus_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 ipv6InterfaceEnableStatus_val *        A long containing the new value. */intipv6InterfaceEnableStatus_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx,                              u_long ipv6InterfaceEnableStatus_val){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceEnableStatus_set",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:461:M: |-> Set ipv6InterfaceEnableStatus value.     * set ipv6InterfaceEnableStatus value in rowreq_ctx->data     */    rowreq_ctx->data.ipv6InterfaceEnableStatus =        ipv6InterfaceEnableStatus_val;    return MFD_SUCCESS;}                               /* ipv6InterfaceEnableStatus_set *//** * undo the previous set. * * @param rowreq_ctx *        Pointer to the users context. */intipv6InterfaceEnableStatus_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceEnableStatus_undo", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:456:o: |-> Clean up ipv6InterfaceEnableStatus undo.     */    /*     * copy ipv6InterfaceEnableStatus data     * set rowreq_ctx->data.ipv6InterfaceEnableStatus from rowreq_ctx->undo->ipv6InterfaceEnableStatus     */    rowreq_ctx->data.ipv6InterfaceEnableStatus =        rowreq_ctx->undo->ipv6InterfaceEnableStatus;    return MFD_SUCCESS;}                               /* ipv6InterfaceEnableStatus_undo *//*--------------------------------------------------------------------- * IP-MIB::ipv6InterfaceEntry.ipv6InterfaceForwarding * ipv6InterfaceForwarding is subid 8 of ipv6InterfaceEntry. * Its status is Current, and its access level is ReadWrite. * OID: .1.3.6.1.2.1.4.30.1.8 * Description:The indication of whether this entity is acting as an IPv6            router on this interface with respect to the forwarding of            datagrams received by, but not addressed to, this entity.            IPv6 routers forward datagrams.  IPv6 hosts do not (except            those source-routed via the host).            This object is constrained by ipv6IpForwarding and is            ignored if ipv6IpForwarding is set to notForwarding.  Those            systems that do not provide per-interface control of the            forwarding function should set this object to forwarding for            all interfaces and allow the ipv6IpForwarding object to            control the forwarding capability.            When this object is written the entity SHOULD save the            change to non-volatile storage and restore the object from            non-volatile storage upon re-initialization of the system. * * Attributes: *   accessible 1     isscalar 0     enums  1      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 * * Enum range: 2/8. Values:  forwarding(1), notForwarding(2) * * 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 ipv6InterfaceForwarding_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 * ipv6InterfaceTable_check_dependencies() function. * * The following checks have already been done for you: *    The syntax is ASN_INTEGER *    The value is one of  forwarding(1), notForwarding(2) * * If there a no other checks you need to do, simply return MFD_SUCCESS. * */intipv6InterfaceForwarding_check_value(ipv6InterfaceTable_rowreq_ctx *                                    rowreq_ctx,                                    u_long ipv6InterfaceForwarding_val){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceForwarding_check_value", "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:441:o: |-> Check for valid ipv6InterfaceForwarding value.     */    return MFD_SUCCESS;         /* ipv6InterfaceForwarding value not illegal */}                               /* ipv6InterfaceForwarding_check_value *//** * Save old value information * * @param rowreq_ctx *        Pointer to the table context (ipv6InterfaceTable_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 * ipv6InterfaceTable_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. */intipv6InterfaceForwarding_undo_setup(ipv6InterfaceTable_rowreq_ctx *                                   rowreq_ctx){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceForwarding_undo_setup", "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:455:o: |-> Setup ipv6InterfaceForwarding undo.     */    /*     * copy ipv6InterfaceForwarding data     * set rowreq_ctx->undo->ipv6InterfaceForwarding from rowreq_ctx->data.ipv6InterfaceForwarding     */    rowreq_ctx->undo->ipv6InterfaceForwarding =        rowreq_ctx->data.ipv6InterfaceForwarding;    return MFD_SUCCESS;}                               /* ipv6InterfaceForwarding_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 ipv6InterfaceForwarding_val *        A long containing the new value. */intipv6InterfaceForwarding_set(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx,                            u_long ipv6InterfaceForwarding_val){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceForwarding_set",                "called\n"));    /** should never get a NULL pointer */    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:461:M: |-> Set ipv6InterfaceForwarding value.     * set ipv6InterfaceForwarding value in rowreq_ctx->data     */    rowreq_ctx->data.ipv6InterfaceForwarding = ipv6InterfaceForwarding_val;    return MFD_SUCCESS;}                               /* ipv6InterfaceForwarding_set *//** * undo the previous set. * * @param rowreq_ctx *        Pointer to the users context. */intipv6InterfaceForwarding_undo(ipv6InterfaceTable_rowreq_ctx * rowreq_ctx){    DEBUGMSGTL(("verbose:ipv6InterfaceTable:ipv6InterfaceForwarding_undo",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:456:o: |-> Clean up ipv6InterfaceForwarding undo.     */    /*     * copy ipv6InterfaceForwarding data     * set rowreq_ctx->data.ipv6InterfaceForwarding from rowreq_ctx->undo->ipv6InterfaceForwarding     */    rowreq_ctx->data.ipv6InterfaceForwarding =        rowreq_ctx->undo->ipv6InterfaceForwarding;    return MFD_SUCCESS;}                               /* ipv6InterfaceForwarding_undo *//** @} *//** @{ */

⌨️ 快捷键说明

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