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

📄 iftable.c

📁 snmp的源代码,已经在我的ubuntu下编译通过
💻 C
📖 第 1 页 / 共 5 页
字号:
            incoming connection); it should remain in the down(2) state            if and only if there is a fault that prevents it from going            to the up(1) state; it should remain in the notPresent(6)            state if the interface has missing (typically, hardware)            components. * * Attributes: *   accessible 1     isscalar 0     enums  1      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * Enum range: 5/8. Values:  up(1), down(2), testing(3), unknown(4), dormant(5), notPresent(6), lowerLayerDown(7) * * Its syntax is INTEGER (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 ifOperStatus data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ifOperStatus_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 */intifOperStatus_get(ifTable_rowreq_ctx * rowreq_ctx,                 u_long * ifOperStatus_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ifOperStatus_val_ptr);    DEBUGMSGTL(("verbose:ifTable:ifOperStatus_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ifOperStatus data.     * set (* ifOperStatus_val_ptr ) from rowreq_ctx->data     */    (*ifOperStatus_val_ptr) = rowreq_ctx->data.ifOperStatus;    return MFD_SUCCESS;}                               /* ifOperStatus_get *//*--------------------------------------------------------------------- * IF-MIB::ifEntry.ifLastChange * ifLastChange is subid 9 of ifEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.2.2.1.9 * Description:The value of sysUpTime at the time the interface entered            its current operational state.  If the current state was            entered prior to the last re-initialization of the local            network management subsystem, then this object contains a            zero value. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * * Its syntax is TICKS (based on perltype TICKS) * The net-snmp type is ASN_TIMETICKS. The C type decl is u_long (u_long) *//** * Extract the current value of the ifLastChange data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ifLastChange_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 */intifLastChange_get(ifTable_rowreq_ctx * rowreq_ctx,                 u_long * ifLastChange_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ifLastChange_val_ptr);    DEBUGMSGTL(("verbose:ifTable:ifLastChange_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ifLastChange data.     * set (* ifLastChange_val_ptr ) from rowreq_ctx->data     */    (*ifLastChange_val_ptr) = rowreq_ctx->data.ifLastChange;    return MFD_SUCCESS;}                               /* ifLastChange_get *//*--------------------------------------------------------------------- * IF-MIB::ifEntry.ifInOctets * ifInOctets is subid 10 of ifEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.2.2.1.10 * Description:The total number of octets received on the interface,            including framing characters.            Discontinuities in the value of this counter can occur at            re-initialization of the management system, and at other            times as indicated by the value of            ifCounterDiscontinuityTime. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * * Its syntax is COUNTER (based on perltype COUNTER) * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long) *//** * Extract the current value of the ifInOctets data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ifInOctets_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 */intifInOctets_get(ifTable_rowreq_ctx * rowreq_ctx,               u_long * ifInOctets_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ifInOctets_val_ptr);    DEBUGMSGTL(("verbose:ifTable:ifInOctets_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ifInOctets data.     * set (* ifInOctets_val_ptr ) from rowreq_ctx->data     */    (*ifInOctets_val_ptr) = rowreq_ctx->data.ifInOctets;    return MFD_SUCCESS;}                               /* ifInOctets_get *//*--------------------------------------------------------------------- * IF-MIB::ifEntry.ifInUcastPkts * ifInUcastPkts is subid 11 of ifEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.2.2.1.11 * Description:The number of packets, delivered by this sub-layer to a            higher (sub-)layer, which were not addressed to a multicast            or broadcast address at this sub-layer.            Discontinuities in the value of this counter can occur at            re-initialization of the management system, and at other            times as indicated by the value of            ifCounterDiscontinuityTime. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * * Its syntax is COUNTER (based on perltype COUNTER) * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long) *//** * Extract the current value of the ifInUcastPkts data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ifInUcastPkts_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 */intifInUcastPkts_get(ifTable_rowreq_ctx * rowreq_ctx,                  u_long * ifInUcastPkts_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ifInUcastPkts_val_ptr);    DEBUGMSGTL(("verbose:ifTable:ifInUcastPkts_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ifInUcastPkts data.     * set (* ifInUcastPkts_val_ptr ) from rowreq_ctx->data     */    (*ifInUcastPkts_val_ptr) = rowreq_ctx->data.ifInUcastPkts;    return MFD_SUCCESS;}                               /* ifInUcastPkts_get *//*--------------------------------------------------------------------- * IF-MIB::ifEntry.ifInNUcastPkts * ifInNUcastPkts is subid 12 of ifEntry. * Its status is Deprecated, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.2.2.1.12 * Description:The number of packets, delivered by this sub-layer to a            higher (sub-)layer, which were addressed to a multicast or            broadcast address at this sub-layer.            Discontinuities in the value of this counter can occur at            re-initialization of the management system, and at other            times as indicated by the value of            ifCounterDiscontinuityTime.            This object is deprecated in favour of ifInMulticastPkts and            ifInBroadcastPkts. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * * Its syntax is COUNTER (based on perltype COUNTER) * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long) *//** * Extract the current value of the ifInNUcastPkts data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ifInNUcastPkts_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 */intifInNUcastPkts_get(ifTable_rowreq_ctx * rowreq_ctx,                   u_long * ifInNUcastPkts_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ifInNUcastPkts_val_ptr);    DEBUGMSGTL(("verbose:ifTable:ifInNUcastPkts_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ifInNUcastPkts data.     * set (* ifInNUcastPkts_val_ptr ) from rowreq_ctx->data     */    (*ifInNUcastPkts_val_ptr) = rowreq_ctx->data.ifInNUcastPkts;    return MFD_SUCCESS;}                               /* ifInNUcastPkts_get *//*--------------------------------------------------------------------- * IF-MIB::ifEntry.ifInDiscards * ifInDiscards is subid 13 of ifEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.2.2.1.13 * Description:The number of inbound packets which were chosen to be            discarded even though no errors had been detected to prevent            their being deliverable to a higher-layer protocol.  One            possible reason for discarding such a packet could be to            free up buffer space.            Discontinuities in the value of this counter can occur at            re-initialization of the management system, and at other            times as indicated by the value of            ifCounterDiscontinuityTime. * * Attributes: *   accessible 1     isscalar 0     enums  0      hasdefval 0 *   readable   1     iscolumn 1     ranges 0      hashint   0 *   settable   0 * * * Its syntax is COUNTER (based on perltype COUNTER) * The net-snmp type is ASN_COUNTER. The C type decl is u_long (u_long) *//** * Extract the current value of the ifInDiscards data. * * Set a value using the data context for the row. * * @param rowreq_ctx *        Pointer to the row request context. * @param ifInDiscards_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 */intifInDiscards_get(ifTable_rowreq_ctx * rowreq_ctx,                 u_long * ifInDiscards_val_ptr){   /** we should have a non-NULL pointer */    netsnmp_assert(NULL != ifInDiscards_val_ptr);    DEBUGMSGTL(("verbose:ifTable:ifInDiscards_get", "called\n"));    netsnmp_assert(NULL != rowreq_ctx);    /*     * TODO:231:o: |-> Extract the current value of the ifInDiscards data.     * set (* ifInDiscards_val_ptr ) from rowreq_ctx->data     */    (*ifInDiscards_val_ptr) = rowreq_ctx->data.ifInDiscards;    return MFD_SUCCESS;}                               /* ifInDiscards_get *//*--------------------------------------------------------------------- * IF-MIB::ifEntry.ifInErrors * ifInErrors is subid 14 of ifEntry. * Its status is Current, and its access level is ReadOnly. * OID: .1.3.6.1.2.1.2.2.1.14 * Description:For packet-oriented interfaces, the number of inbound            packets that contained errors preventing them from being            deliverable to a higher-layer protocol.  For character-            oriented or fixed-length interfaces, the number of inbound            transmission units that contained errors preventing them            from being deliverable to a higher-layer protocol.            Discontinuities in the value of this counter can occur at

⌨️ 快捷键说明

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