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

📄 inetcidrroutetable.c

📁 snmp的源代码,已经在我的ubuntu下编译通过
💻 C
📖 第 1 页 / 共 5 页
字号:
                set to -1. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 1 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 *   defval: -1 * * * Its syntax is INTEGER32 (based on perltype INTEGER32) * The net-snmp type is ASN_INTEGER. The C type decl is long (long) *//** * Extract the current value of the inetCidrRouteMetric2 data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param inetCidrRouteMetric2_val_ptr *        Pointer to storage for a long variable * * @retval MFD_SUCCESS         : success * @retval MFD_SKIP            : skip this node (no value for now) * @retval MFD_ERROR           : Any other error */intinetCidrRouteMetric2_get(inetCidrRouteTable_rowreq_ctx * rowreq_ctx,                         long *inetCidrRouteMetric2_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != inetCidrRouteMetric2_val_ptr);    DEBUGMSGTL(("verbose:inetCidrRouteTable:inetCidrRouteMetric2_get",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the inetCidrRouteMetric2 data.     * set (* inetCidrRouteMetric2_val_ptr ) from rowreq_ctx->data     */    (*inetCidrRouteMetric2_val_ptr) = rowreq_ctx->data->rt_metric2;    return MFD_SUCCESS;}                               /* inetCidrRouteMetric2_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::inetCidrRouteEntry.inetCidrRouteMetric3 * inetCidrRouteMetric3 is subid 14 of inetCidrRouteEntry. * Its status is Current, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.7.1.14 * Description:An alternate routing metric for this route.  The                  semantics of this metric are determined by the routing-                 protocol specified in the route's inetCidrRouteProto                  value.  If this metric is not used, its value should be                  set to -1. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 1 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 *   defval: -1 * * * Its syntax is INTEGER32 (based on perltype INTEGER32) * The net-snmp type is ASN_INTEGER. The C type decl is long (long) *//** * Extract the current value of the inetCidrRouteMetric3 data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param inetCidrRouteMetric3_val_ptr *        Pointer to storage for a long variable * * @retval MFD_SUCCESS         : success * @retval MFD_SKIP            : skip this node (no value for now) * @retval MFD_ERROR           : Any other error */intinetCidrRouteMetric3_get(inetCidrRouteTable_rowreq_ctx * rowreq_ctx,                         long *inetCidrRouteMetric3_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != inetCidrRouteMetric3_val_ptr);    DEBUGMSGTL(("verbose:inetCidrRouteTable:inetCidrRouteMetric3_get",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the inetCidrRouteMetric3 data.     * set (* inetCidrRouteMetric3_val_ptr ) from rowreq_ctx->data     */    (*inetCidrRouteMetric3_val_ptr) = rowreq_ctx->data->rt_metric3;    return MFD_SUCCESS;}                               /* inetCidrRouteMetric3_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::inetCidrRouteEntry.inetCidrRouteMetric4 * inetCidrRouteMetric4 is subid 15 of inetCidrRouteEntry. * Its status is Current, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.7.1.15 * Description:An alternate routing metric for this route.  The                  semantics of this metric are determined by the routing-                 protocol specified in the route's inetCidrRouteProto                  value.  If this metric is not used, its value should be                  set to -1. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 1 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 *   defval: -1 * * * Its syntax is INTEGER32 (based on perltype INTEGER32) * The net-snmp type is ASN_INTEGER. The C type decl is long (long) *//** * Extract the current value of the inetCidrRouteMetric4 data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param inetCidrRouteMetric4_val_ptr *        Pointer to storage for a long variable * * @retval MFD_SUCCESS         : success * @retval MFD_SKIP            : skip this node (no value for now) * @retval MFD_ERROR           : Any other error */intinetCidrRouteMetric4_get(inetCidrRouteTable_rowreq_ctx * rowreq_ctx,                         long *inetCidrRouteMetric4_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != inetCidrRouteMetric4_val_ptr);    DEBUGMSGTL(("verbose:inetCidrRouteTable:inetCidrRouteMetric4_get",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the inetCidrRouteMetric4 data.     * set (* inetCidrRouteMetric4_val_ptr ) from rowreq_ctx->data     */    (*inetCidrRouteMetric4_val_ptr) = rowreq_ctx->data->rt_metric4;    return MFD_SUCCESS;}                               /* inetCidrRouteMetric4_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::inetCidrRouteEntry.inetCidrRouteMetric5 * inetCidrRouteMetric5 is subid 16 of inetCidrRouteEntry. * Its status is Current, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.7.1.16 * Description:An alternate routing metric for this route.  The                  semantics of this metric are determined by the routing-                 protocol specified in the route's inetCidrRouteProto                  value.  If this metric is not used, its value should be                  set to -1. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 1 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 *   defval: -1 * * * Its syntax is INTEGER32 (based on perltype INTEGER32) * The net-snmp type is ASN_INTEGER. The C type decl is long (long) *//** * Extract the current value of the inetCidrRouteMetric5 data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param inetCidrRouteMetric5_val_ptr *        Pointer to storage for a long variable * * @retval MFD_SUCCESS         : success * @retval MFD_SKIP            : skip this node (no value for now) * @retval MFD_ERROR           : Any other error */intinetCidrRouteMetric5_get(inetCidrRouteTable_rowreq_ctx * rowreq_ctx,                         long *inetCidrRouteMetric5_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != inetCidrRouteMetric5_val_ptr);    DEBUGMSGTL(("verbose:inetCidrRouteTable:inetCidrRouteMetric5_get",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the inetCidrRouteMetric5 data.     * set (* inetCidrRouteMetric5_val_ptr ) from rowreq_ctx->data     */    (*inetCidrRouteMetric5_val_ptr) = rowreq_ctx->data->rt_metric5;    return MFD_SUCCESS;}                               /* inetCidrRouteMetric5_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::inetCidrRouteEntry.inetCidrRouteStatus * inetCidrRouteStatus is subid 17 of inetCidrRouteEntry. * Its status is Current, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.7.1.17 * Description:The row status variable, used according to row                  installation and removal conventions.                 A row entry cannot be modified when the status is                 marked as active(1). * * Attributes: *   accessible 1     isscalar 0     enums  1      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   1 * * Enum range: 3/8. Values:  active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6) * * Its syntax is RowStatus (based on perltype INTEGER) * The net-snmp type is ASN_INTEGER. The C type decl is long (u_long) *//** * Extract the current value of the inetCidrRouteStatus data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param inetCidrRouteStatus_val_ptr *        Pointer to storage for a long variable * * @retval MFD_SUCCESS         : success * @retval MFD_SKIP            : skip this node (no value for now) * @retval MFD_ERROR           : Any other error */intinetCidrRouteStatus_get(inetCidrRouteTable_rowreq_ctx * rowreq_ctx,                        u_long * inetCidrRouteStatus_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != inetCidrRouteStatus_val_ptr);    /** WARNING: this code might not work for netsnmp_route_entry */    (*inetCidrRouteStatus_val_ptr) = rowreq_ctx->inetCidrRouteStatus;    return MFD_SUCCESS;}                               /* inetCidrRouteStatus_get *//** @} *//********************************************************************** ********************************************************************** *** *** Table inetCidrRouteTable *** ********************************************************************** **********************************************************************//* * inetCidrRouteTable is subid 7 of ipForward. * Its status is Current. * OID: .1.3.6.1.2.1.4.24.7, length: 9 */    /*     * 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     * +-------------+        +==============+     * |    row    |f|<-------||  object    ||     * |  create   |1|      E ||  lookup    ||     * +-------------+        +==============+     *     E |   | S                 | 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     *                               |     *                          (err && f1)------------------->+     *                               |                         |     *                        +--------------+         +--------------+     *                        |    post      |<--------|      row     |     *                        |   request    |       U |    release   |     *                        +--------------+         +--------------+     *     *//** * verify specified index is valid. * * This check is independent of whether or not the values specified for * the columns of the new row are valid. Column values and row consistency * will be checked later. At this point, only the index values should be * checked.

⌨️ 快捷键说明

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