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

📄 ipaddressprefixtable.c

📁 开发snmp的开发包有两个开放的SNMP开发库
💻 C
📖 第 1 页 / 共 2 页
字号:
                                               &rowreq_ctx->tbl_idx)) {        return MFD_ERROR;    }    return MFD_SUCCESS;}                               /* ipAddressPrefixTable_indexes_set *//*--------------------------------------------------------------------- * IP-MIB::ipAddressPrefixEntry.ipAddressPrefixOrigin * ipAddressPrefixOrigin is subid 5 of ipAddressPrefixEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.4.32.1.5 * Description:The origin of this prefix. * * Attributes: *   accessible 1     isscalar 0     enums  1      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * Enum range: 4/8. Values:  other(1), manual(2), wellknown(3), dhcp(4), routeradv(5) * * Its syntax is IpAddressPrefixOriginTC (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 ipAddressPrefixOrigin data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ipAddressPrefixOrigin_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 */intipAddressPrefixOrigin_get(ipAddressPrefixTable_rowreq_ctx * rowreq_ctx,                          u_long * ipAddressPrefixOrigin_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ipAddressPrefixOrigin_val_ptr);    DEBUGMSGTL(("verbose:ipAddressPrefixTable:ipAddressPrefixOrigin_get",                "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ipAddressPrefixOrigin data.     * copy (* ipAddressPrefixOrigin_val_ptr ) from rowreq_ctx->data     */    (*ipAddressPrefixOrigin_val_ptr) =        rowreq_ctx->data.ipAddressPrefixOrigin;    return MFD_SUCCESS;}                               /* ipAddressPrefixOrigin_get *//*--------------------------------------------------------------------- * IP-MIB::ipAddressPrefixEntry.ipAddressPrefixOnLinkFlag * ipAddressPrefixOnLinkFlag is subid 6 of ipAddressPrefixEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.4.32.1.6 * Description:This object has the value 'true(1)', if this prefix can be            used  for on-link determination and the value 'false(2)'            otherwise.            The default for IPv4 prefixes is 'true(1)'. * * Attributes: *   accessible 1     isscalar 0     enums  1      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * Enum range: 2/8. Values:  true(1), false(2) * * Its syntax is TruthValue (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 ipAddressPrefixOnLinkFlag data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ipAddressPrefixOnLinkFlag_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 */intipAddressPrefixOnLinkFlag_get(ipAddressPrefixTable_rowreq_ctx * rowreq_ctx,                              u_long * ipAddressPrefixOnLinkFlag_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ipAddressPrefixOnLinkFlag_val_ptr);    DEBUGMSGTL(("verbose:ipAddressPrefixTable:ipAddressPrefixOnLinkFlag_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ipAddressPrefixOnLinkFlag data.     * copy (* ipAddressPrefixOnLinkFlag_val_ptr ) from rowreq_ctx->data     */    if (INETADDRESSTYPE_IPV4 == rowreq_ctx->tbl_idx.ipAddressPrefixType) {        (*ipAddressPrefixOnLinkFlag_val_ptr) = 1;       /* per MIB */    } else        (*ipAddressPrefixOnLinkFlag_val_ptr) =            rowreq_ctx->data.ipAddressPrefixOnLinkFlag;    return MFD_SUCCESS;}                               /* ipAddressPrefixOnLinkFlag_get *//*--------------------------------------------------------------------- * IP-MIB::ipAddressPrefixEntry.ipAddressPrefixAutonomousFlag * ipAddressPrefixAutonomousFlag is subid 7 of ipAddressPrefixEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.4.32.1.7 * Description:Autonomous address configuration flag. When true(1),            indicates that this prefix can be used for autonomous            address configuration (i.e. can be used to form a local            interface address).  If false(2), it is not used to auto-            configure a local interface address.            The default for IPv4 prefixes is 'false(2)'. * * Attributes: *   accessible 1     isscalar 0     enums  1      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * Enum range: 2/8. Values:  true(1), false(2) * * Its syntax is TruthValue (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 ipAddressPrefixAutonomousFlag data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ipAddressPrefixAutonomousFlag_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 */intipAddressPrefixAutonomousFlag_get(ipAddressPrefixTable_rowreq_ctx *                                  rowreq_ctx,                                  u_long *                                  ipAddressPrefixAutonomousFlag_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ipAddressPrefixAutonomousFlag_val_ptr);    DEBUGMSGTL(("verbose:ipAddressPrefixTable:ipAddressPrefixAutonomousFlag_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ipAddressPrefixAutonomousFlag data.     * copy (* ipAddressPrefixAutonomousFlag_val_ptr ) from rowreq_ctx->data     */    if (INETADDRESSTYPE_IPV4 == rowreq_ctx->tbl_idx.ipAddressPrefixType)        (*ipAddressPrefixAutonomousFlag_val_ptr) = 2;   /* per MIB */    else        (*ipAddressPrefixAutonomousFlag_val_ptr) =            rowreq_ctx->data.ipAddressPrefixAutonomousFlag;    return MFD_SUCCESS;}                               /* ipAddressPrefixAutonomousFlag_get *//*--------------------------------------------------------------------- * IP-MIB::ipAddressPrefixEntry.ipAddressPrefixAdvPreferredLifetime * ipAddressPrefixAdvPreferredLifetime is subid 8 of ipAddressPrefixEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.4.32.1.8 * Description:The remaining length of time in seconds that this prefix            will continue to be preferred, i.e. time until deprecation.            A value of 4,294,967,295 represents infinity.            The address generated from a deprecated prefix should no            longer be used as a source address in new communications,            but packets received on such an interface are processed as            expected.            The default for IPv4 prefixes is 4,294,967,295 (infinity). * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * * Its syntax is UNSIGNED32 (based on perltype UNSIGNED32) * The net-snmp type is ASN_UNSIGNED. The C type decl is u_long (u_long) *//** * Extract the current value of the ipAddressPrefixAdvPreferredLifetime data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ipAddressPrefixAdvPreferredLifetime_val_ptr *        Pointer to storage for a u_long variable * * @retval MFD_SUCCESS         : success * @retval MFD_SKIP            : skip this node (no value for now) * @retval MFD_ERROR           : Any other error */intipAddressPrefixAdvPreferredLifetime_get(ipAddressPrefixTable_rowreq_ctx *                                        rowreq_ctx,                                        u_long *                                        ipAddressPrefixAdvPreferredLifetime_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ipAddressPrefixAdvPreferredLifetime_val_ptr);    DEBUGMSGTL(("verbose:ipAddressPrefixTable:ipAddressPrefixAdvPreferredLifetime_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ipAddressPrefixAdvPreferredLifetime data.     * copy (* ipAddressPrefixAdvPreferredLifetime_val_ptr ) from rowreq_ctx->data     */    if (INETADDRESSTYPE_IPV4 == rowreq_ctx->tbl_idx.ipAddressPrefixType)        (*ipAddressPrefixAdvPreferredLifetime_val_ptr) = 4294967295;    /* per MIB */    else        (*ipAddressPrefixAdvPreferredLifetime_val_ptr) =            rowreq_ctx->data.ipAddressPrefixAdvPreferredLifetime;    return MFD_SUCCESS;}                               /* ipAddressPrefixAdvPreferredLifetime_get *//*--------------------------------------------------------------------- * IP-MIB::ipAddressPrefixEntry.ipAddressPrefixAdvValidLifetime * ipAddressPrefixAdvValidLifetime is subid 9 of ipAddressPrefixEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.4.32.1.9 * Description:The remaining length of time, in seconds, that this prefix            will continue to be valid, i.e. time until invalidation.  A            value of 4,294,967,295 represents infinity.            The address generated from an invalidated prefix should not            appear as the destination or source address of a packet.            The default for IPv4 prefixes is 4,294,967,295 (infinity). * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * * Its syntax is UNSIGNED32 (based on perltype UNSIGNED32) * The net-snmp type is ASN_UNSIGNED. The C type decl is u_long (u_long) *//** * Extract the current value of the ipAddressPrefixAdvValidLifetime data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ipAddressPrefixAdvValidLifetime_val_ptr *        Pointer to storage for a u_long variable * * @retval MFD_SUCCESS         : success * @retval MFD_SKIP            : skip this node (no value for now) * @retval MFD_ERROR           : Any other error */intipAddressPrefixAdvValidLifetime_get(ipAddressPrefixTable_rowreq_ctx *                                    rowreq_ctx,                                    u_long *                                    ipAddressPrefixAdvValidLifetime_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ipAddressPrefixAdvValidLifetime_val_ptr);    DEBUGMSGTL(("verbose:ipAddressPrefixTable:ipAddressPrefixAdvValidLifetime_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ipAddressPrefixAdvValidLifetime data.     * copy (* ipAddressPrefixAdvValidLifetime_val_ptr ) from rowreq_ctx->data     */    if (INETADDRESSTYPE_IPV4 == rowreq_ctx->tbl_idx.ipAddressPrefixType)        (*ipAddressPrefixAdvValidLifetime_val_ptr) = 4294967295;        /* per MIB */    else        (*ipAddressPrefixAdvValidLifetime_val_ptr) =            rowreq_ctx->data.ipAddressPrefixAdvValidLifetime;    return MFD_SUCCESS;}                               /* ipAddressPrefixAdvValidLifetime_get *//** @} *//** @} *//** @{ */

⌨️ 快捷键说明

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