📄 ipcidrroutetable.c
字号:
* * @retval MFD_SUCCESS : success * @retval MFD_SKIP : skip this node (no value for now) * @retval MFD_ERROR : Any other error */intipCidrRouteMetric2_get(ipCidrRouteTable_rowreq_ctx * rowreq_ctx, long *ipCidrRouteMetric2_val_ptr){ /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipCidrRouteMetric2_val_ptr); DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteMetric2_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the ipCidrRouteMetric2 data. * set (* ipCidrRouteMetric2_val_ptr ) from rowreq_ctx->data */ (*ipCidrRouteMetric2_val_ptr) = rowreq_ctx->data->rt_metric2; return MFD_SUCCESS;} /* ipCidrRouteMetric2_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::ipCidrRouteEntry.ipCidrRouteMetric3 * ipCidrRouteMetric3 is subid 13 of ipCidrRouteEntry. * Its status is Deprecated, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.4.1.13 * Description:An alternate routing metric for this route. The semantics of this metric are determined by the routing- protocol specified in the route's ipCidrRouteProto 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 ipCidrRouteMetric3 data. * * Set a value using the data context for the row. * * @param rowreq_ctx * Pointer to the row request context. * @param ipCidrRouteMetric3_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 */intipCidrRouteMetric3_get(ipCidrRouteTable_rowreq_ctx * rowreq_ctx, long *ipCidrRouteMetric3_val_ptr){ /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipCidrRouteMetric3_val_ptr); DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteMetric3_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the ipCidrRouteMetric3 data. * set (* ipCidrRouteMetric3_val_ptr ) from rowreq_ctx->data */ (*ipCidrRouteMetric3_val_ptr) = rowreq_ctx->data->rt_metric3; return MFD_SUCCESS;} /* ipCidrRouteMetric3_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::ipCidrRouteEntry.ipCidrRouteMetric4 * ipCidrRouteMetric4 is subid 14 of ipCidrRouteEntry. * Its status is Deprecated, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.4.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 ipCidrRouteProto 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 ipCidrRouteMetric4 data. * * Set a value using the data context for the row. * * @param rowreq_ctx * Pointer to the row request context. * @param ipCidrRouteMetric4_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 */intipCidrRouteMetric4_get(ipCidrRouteTable_rowreq_ctx * rowreq_ctx, long *ipCidrRouteMetric4_val_ptr){ /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipCidrRouteMetric4_val_ptr); DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteMetric4_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the ipCidrRouteMetric4 data. * set (* ipCidrRouteMetric4_val_ptr ) from rowreq_ctx->data */ (*ipCidrRouteMetric4_val_ptr) = rowreq_ctx->data->rt_metric4; return MFD_SUCCESS;} /* ipCidrRouteMetric4_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::ipCidrRouteEntry.ipCidrRouteMetric5 * ipCidrRouteMetric5 is subid 15 of ipCidrRouteEntry. * Its status is Deprecated, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.4.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 ipCidrRouteProto 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 ipCidrRouteMetric5 data. * * Set a value using the data context for the row. * * @param rowreq_ctx * Pointer to the row request context. * @param ipCidrRouteMetric5_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 */intipCidrRouteMetric5_get(ipCidrRouteTable_rowreq_ctx * rowreq_ctx, long *ipCidrRouteMetric5_val_ptr){ /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipCidrRouteMetric5_val_ptr); DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteMetric5_get", "called\n")); netsnmp_assert(NULL != rowreq_ctx); /* * TODO:231:o: |-> Extract the current value of the ipCidrRouteMetric5 data. * set (* ipCidrRouteMetric5_val_ptr ) from rowreq_ctx->data */ (*ipCidrRouteMetric5_val_ptr) = rowreq_ctx->data->rt_metric5; return MFD_SUCCESS;} /* ipCidrRouteMetric5_get *//*--------------------------------------------------------------------- * IP-FORWARD-MIB::ipCidrRouteEntry.ipCidrRouteStatus * ipCidrRouteStatus is subid 16 of ipCidrRouteEntry. * Its status is Deprecated, and its access level is Create. * OID: .1.3.6.1.2.1.4.24.4.1.16 * Description:The row status variable, used according to row installation and removal conventions. * * 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 ipCidrRouteStatus data. * * Set a value using the data context for the row. * * @param rowreq_ctx * Pointer to the row request context. * @param ipCidrRouteStatus_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 */intipCidrRouteStatus_get(ipCidrRouteTable_rowreq_ctx * rowreq_ctx, u_long * ipCidrRouteStatus_val_ptr){ /** we should have a non-NULL pointer */ netsnmp_assert(NULL != ipCidrRouteStatus_val_ptr); (*ipCidrRouteStatus_val_ptr) = rowreq_ctx->ipCidrRouteStatus; return MFD_SUCCESS;} /* ipCidrRouteStatus_get *//** @} *//********************************************************************** ********************************************************************** *** *** Table ipCidrRouteTable *** ********************************************************************** **********************************************************************//* * ipCidrRouteTable is subid 4 of ipForward. * Its status is Deprecated. * OID: .1.3.6.1.2.1.4.24.4, 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. * * All of the individual index validation functions have been called, so this * is the place to make sure they are valid as a whole when combined. If * you only have one index, * * * * @param ipCidrRouteTable_reg * Pointer to the user registration data * @param ipCidrRouteTable_rowreq_ctx * Pointer to the users context. * @retval MFD_SUCCESS : success * @retval MFD_CANNOT_CREATE_NOW : index not valid right now * @retval MFD_CANNOT_CREATE_EVER : index never valid */intipCidrRouteTable_validate_index(ipCidrRouteTable_registration_ptr ipCidrRouteTable_reg, ipCidrRouteTable_rowreq_ctx * rowreq_ctx){ int rc = MFD_SUCCESS; DEBUGMSGTL(("verbose:ipCidrRouteTable:ipCidrRouteTable_validate_index", "called\n")); /** we should have a non-NULL pointer */ netsnmp_assert(NULL != rowreq_ctx); /* * TODO:430:M: |-> Validate potential ipCidrRouteTable index. */ if (1) { snmp_log(LOG_WARNING, "invalid index for a new row in the " "ipCidrRouteTable table.\n"); /* * determine failure type. * * If the index could not ever be created, return MFD_NOT_EVER
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -