ipSystemStatsTable.h
上传用户:wxp200602
上传日期:2007-10-30
资源大小:4028k
文件大小:18k
源码类别:

SNMP编程

开发平台:

Unix_Linux

  1. /*
  2.  * Note: this file originally auto-generated by mib2c using
  3.  *       version : 1.32 $ of : mfd-top.m2c,v $
  4.  *
  5.  * $Id: ipSystemStatsTable.h,v 1.4 2004/10/16 00:31:18 rstory Exp $
  6.  */
  7. #ifndef IPSYSTEMSTATSTABLE_H
  8. #define IPSYSTEMSTATSTABLE_H
  9. #ifdef __cplusplus
  10. extern          "C" {
  11. #endif
  12. /** @defgroup misc misc: Miscelaneous routines
  13.  *
  14.  * @{
  15.  */
  16. #include <net-snmp/library/asn1.h>
  17. #include <net-snmp/data_access/ipstats.h>
  18. #include <net-snmp/data_access/systemstats.h>
  19.     /*
  20.      * OID, column number and enum definions for  
  21.      */
  22. #include "ipSystemStatsTable_constants.h"
  23.     /*
  24.      *********************************************************************
  25.      * function declarations
  26.      */
  27.     void            init_ipSystemStatsTable(void);
  28.     /*
  29.      *********************************************************************
  30.      * Table declarations
  31.      */
  32. /**********************************************************************
  33.  **********************************************************************
  34.  ***
  35.  *** Table ipSystemStatsTable
  36.  ***
  37.  **********************************************************************
  38.  **********************************************************************/
  39.     /*
  40.      * ipSystemStatsTable is subid 1 of ipTrafficStats.
  41.      * Its status is Current.
  42.      * OID: .1.3.6.1.2.1.4.31.1, length: 9
  43.      */
  44.     /*
  45.      *********************************************************************
  46.      * When you register your mib, you get to provide a generic
  47.      * pointer that will be passed back to you for most of the
  48.      * functions calls.
  49.      *
  50.      * TODO:100:r: Review all context structures
  51.      */
  52.     /*
  53.      * TODO:101:o: |-> Review ipSystemStatsTable registration context.
  54.      */
  55.     typedef netsnmp_data_list *ipSystemStatsTable_registration_ptr;
  56. /**********************************************************************/
  57.     /*
  58.      * TODO:110:r: |-> Review ipSystemStatsTable data context structure.
  59.      * This structure is used to represent the data for ipSystemStatsTable.
  60.      */
  61.     typedef netsnmp_systemstats_entry ipSystemStatsTable_data;
  62.     /*
  63.      * TODO:120:r: |-> Review ipSystemStatsTable mib index.
  64.      * This structure is used to represent the index for ipSystemStatsTable.
  65.      */
  66.     typedef struct ipSystemStatsTable_mib_index_s {
  67.         /*
  68.          * ipSystemStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
  69.          */
  70.         u_long          ipSystemStatsIPVersion;
  71.     } ipSystemStatsTable_mib_index;
  72.     /*
  73.      * TODO:121:r: |   |-> Review ipSystemStatsTable max index length.
  74.      * If you KNOW that your indexes will never exceed a certain
  75.      * length, update this macro to that length.
  76.      */
  77. #define MAX_ipSystemStatsTable_IDX_LEN     1
  78.     /*
  79.      *********************************************************************
  80.      * TODO:130:o: |-> Review ipSystemStatsTable Row request (rowreq) context.
  81.      * When your functions are called, you will be passed a
  82.      * ipSystemStatsTable_rowreq_ctx pointer.
  83.      */
  84.     typedef struct ipSystemStatsTable_rowreq_ctx_s {
  85.     /** this must be first for container compare to work */
  86.         netsnmp_index   oid_idx;
  87.         oid             oid_tmp[MAX_ipSystemStatsTable_IDX_LEN];
  88.         ipSystemStatsTable_mib_index tbl_idx;
  89.         ipSystemStatsTable_data *data;
  90.         /*
  91.          * flags per row. Currently, the first 8 bits are reserverd
  92.          * for the user. See mfd.h for other flags.
  93.          */
  94.         u_int           rowreq_flags;
  95.         /*
  96.          * implementor's context pointer (provided during registration)
  97.          */
  98.         ipSystemStatsTable_registration_ptr ipSystemStatsTable_reg;
  99.         /*
  100.          * TODO:131:o: |   |-> Add useful data to ipSystemStatsTable rowreq context.
  101.          */
  102.         char            known_missing;
  103.         uint32_t        ipSystemStatsDiscontinuityTime;
  104.         uint32_t        ipSystemStatsRefreshRate;
  105.         /*
  106.          * storage for future expansion
  107.          */
  108.         netsnmp_data_list *ipSystemStatsTable_data_list;
  109.     } ipSystemStatsTable_rowreq_ctx;
  110.     typedef struct ipSystemStatsTable_ref_rowreq_ctx_s {
  111.         ipSystemStatsTable_rowreq_ctx *rowreq_ctx;
  112.     } ipSystemStatsTable_ref_rowreq_ctx;
  113.     /*
  114.      *********************************************************************
  115.      * function prototypes
  116.      */
  117.     int
  118.         ipSystemStatsTable_pre_request(ipSystemStatsTable_registration_ptr
  119.                                        user_context);
  120.     int
  121.         ipSystemStatsTable_post_request(ipSystemStatsTable_registration_ptr
  122.                                         user_context);
  123.     ipSystemStatsTable_data *ipSystemStatsTable_allocate_data(void);
  124.     void            ipSystemStatsTable_release_data(ipSystemStatsTable_data
  125.                                                     * data);
  126.     extern oid      ipSystemStatsTable_oid[];
  127.     extern int      ipSystemStatsTable_oid_size;
  128. #include "ipSystemStatsTable_interface.h"
  129. #include "ipSystemStatsTable_data_access.h"
  130.     /*
  131.      *********************************************************************
  132.      * GET function declarations
  133.      */
  134.     /*
  135.      *********************************************************************
  136.      * GET Table declarations
  137.      */
  138. /**********************************************************************
  139.  **********************************************************************
  140.  ***
  141.  *** Table ipSystemStatsTable
  142.  ***
  143.  **********************************************************************
  144.  **********************************************************************/
  145.     /*
  146.      * ipSystemStatsTable is subid 1 of ipTrafficStats.
  147.      * Its status is Current.
  148.      * OID: .1.3.6.1.2.1.4.31.1, length: 9
  149.      */
  150.     /*
  151.      * indexes
  152.      */
  153.     int
  154.         ipSystemStatsInReceives_get(ipSystemStatsTable_rowreq_ctx *
  155.                                     rowreq_ctx,
  156.                                     u_long *
  157.                                     ipSystemStatsInReceives_val_ptr);
  158.     int
  159.         ipSystemStatsHCInReceives_get(ipSystemStatsTable_rowreq_ctx *
  160.                                       rowreq_ctx,
  161.                                       U64 *
  162.                                       ipSystemStatsHCInReceives_val_ptr);
  163.     int             ipSystemStatsInOctets_get(ipSystemStatsTable_rowreq_ctx
  164.                                               * rowreq_ctx,
  165.                                               u_long *
  166.                                               ipSystemStatsInOctets_val_ptr);
  167.     int
  168.         ipSystemStatsHCInOctets_get(ipSystemStatsTable_rowreq_ctx *
  169.                                     rowreq_ctx,
  170.                                     U64 * ipSystemStatsHCInOctets_val_ptr);
  171.     int
  172.         ipSystemStatsInHdrErrors_get(ipSystemStatsTable_rowreq_ctx *
  173.                                      rowreq_ctx,
  174.                                      u_long *
  175.                                      ipSystemStatsInHdrErrors_val_ptr);
  176.     int
  177.         ipSystemStatsInNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
  178.                                     rowreq_ctx,
  179.                                     u_long *
  180.                                     ipSystemStatsInNoRoutes_val_ptr);
  181.     int
  182.         ipSystemStatsInAddrErrors_get(ipSystemStatsTable_rowreq_ctx *
  183.                                       rowreq_ctx,
  184.                                       u_long *
  185.                                       ipSystemStatsInAddrErrors_val_ptr);
  186.     int
  187.         ipSystemStatsInUnknownProtos_get(ipSystemStatsTable_rowreq_ctx *
  188.                                          rowreq_ctx,
  189.                                          u_long *
  190.                                          ipSystemStatsInUnknownProtos_val_ptr);
  191.     int
  192.         ipSystemStatsInTruncatedPkts_get(ipSystemStatsTable_rowreq_ctx *
  193.                                          rowreq_ctx,
  194.                                          u_long *
  195.                                          ipSystemStatsInTruncatedPkts_val_ptr);
  196.     int
  197.         ipSystemStatsInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
  198.                                          rowreq_ctx,
  199.                                          u_long *
  200.                                          ipSystemStatsInForwDatagrams_val_ptr);
  201.     int
  202.         ipSystemStatsHCInForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
  203.                                            rowreq_ctx,
  204.                                            U64 *
  205.                                            ipSystemStatsHCInForwDatagrams_val_ptr);
  206.     int
  207.         ipSystemStatsReasmReqds_get(ipSystemStatsTable_rowreq_ctx *
  208.                                     rowreq_ctx,
  209.                                     u_long *
  210.                                     ipSystemStatsReasmReqds_val_ptr);
  211.     int             ipSystemStatsReasmOKs_get(ipSystemStatsTable_rowreq_ctx
  212.                                               * rowreq_ctx,
  213.                                               u_long *
  214.                                               ipSystemStatsReasmOKs_val_ptr);
  215.     int
  216.         ipSystemStatsReasmFails_get(ipSystemStatsTable_rowreq_ctx *
  217.                                     rowreq_ctx,
  218.                                     u_long *
  219.                                     ipSystemStatsReasmFails_val_ptr);
  220.     int
  221.         ipSystemStatsInDiscards_get(ipSystemStatsTable_rowreq_ctx *
  222.                                     rowreq_ctx,
  223.                                     u_long *
  224.                                     ipSystemStatsInDiscards_val_ptr);
  225.     int
  226.         ipSystemStatsInDelivers_get(ipSystemStatsTable_rowreq_ctx *
  227.                                     rowreq_ctx,
  228.                                     u_long *
  229.                                     ipSystemStatsInDelivers_val_ptr);
  230.     int
  231.         ipSystemStatsHCInDelivers_get(ipSystemStatsTable_rowreq_ctx *
  232.                                       rowreq_ctx,
  233.                                       U64 *
  234.                                       ipSystemStatsHCInDelivers_val_ptr);
  235.     int
  236.         ipSystemStatsOutRequests_get(ipSystemStatsTable_rowreq_ctx *
  237.                                      rowreq_ctx,
  238.                                      u_long *
  239.                                      ipSystemStatsOutRequests_val_ptr);
  240.     int
  241.         ipSystemStatsHCOutRequests_get(ipSystemStatsTable_rowreq_ctx *
  242.                                        rowreq_ctx,
  243.                                        U64 *
  244.                                        ipSystemStatsHCOutRequests_val_ptr);
  245.     int
  246.         ipSystemStatsOutNoRoutes_get(ipSystemStatsTable_rowreq_ctx *
  247.                                      rowreq_ctx,
  248.                                      u_long *
  249.                                      ipSystemStatsOutNoRoutes_val_ptr);
  250.     int
  251.         ipSystemStatsOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
  252.                                           rowreq_ctx,
  253.                                           u_long *
  254.                                           ipSystemStatsOutForwDatagrams_val_ptr);
  255.     int
  256.         ipSystemStatsHCOutForwDatagrams_get(ipSystemStatsTable_rowreq_ctx *
  257.                                             rowreq_ctx,
  258.                                             U64 *
  259.                                             ipSystemStatsHCOutForwDatagrams_val_ptr);
  260.     int
  261.         ipSystemStatsOutDiscards_get(ipSystemStatsTable_rowreq_ctx *
  262.                                      rowreq_ctx,
  263.                                      u_long *
  264.                                      ipSystemStatsOutDiscards_val_ptr);
  265.     int
  266.         ipSystemStatsOutFragReqds_get(ipSystemStatsTable_rowreq_ctx *
  267.                                       rowreq_ctx,
  268.                                       u_long *
  269.                                       ipSystemStatsOutFragReqds_val_ptr);
  270.     int
  271.         ipSystemStatsOutFragOKs_get(ipSystemStatsTable_rowreq_ctx *
  272.                                     rowreq_ctx,
  273.                                     u_long *
  274.                                     ipSystemStatsOutFragOKs_val_ptr);
  275.     int
  276.         ipSystemStatsOutFragFails_get(ipSystemStatsTable_rowreq_ctx *
  277.                                       rowreq_ctx,
  278.                                       u_long *
  279.                                       ipSystemStatsOutFragFails_val_ptr);
  280.     int
  281.         ipSystemStatsOutFragCreates_get(ipSystemStatsTable_rowreq_ctx *
  282.                                         rowreq_ctx,
  283.                                         u_long *
  284.                                         ipSystemStatsOutFragCreates_val_ptr);
  285.     int
  286.         ipSystemStatsOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
  287.                                       rowreq_ctx,
  288.                                       u_long *
  289.                                       ipSystemStatsOutTransmits_val_ptr);
  290.     int
  291.         ipSystemStatsHCOutTransmits_get(ipSystemStatsTable_rowreq_ctx *
  292.                                         rowreq_ctx,
  293.                                         U64 *
  294.                                         ipSystemStatsHCOutTransmits_val_ptr);
  295.     int
  296.         ipSystemStatsOutOctets_get(ipSystemStatsTable_rowreq_ctx *
  297.                                    rowreq_ctx,
  298.                                    u_long *
  299.                                    ipSystemStatsOutOctets_val_ptr);
  300.     int
  301.         ipSystemStatsHCOutOctets_get(ipSystemStatsTable_rowreq_ctx *
  302.                                      rowreq_ctx,
  303.                                      U64 *
  304.                                      ipSystemStatsHCOutOctets_val_ptr);
  305.     int
  306.         ipSystemStatsInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  307.                                      rowreq_ctx,
  308.                                      u_long *
  309.                                      ipSystemStatsInMcastPkts_val_ptr);
  310.     int
  311.         ipSystemStatsHCInMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  312.                                        rowreq_ctx,
  313.                                        U64 *
  314.                                        ipSystemStatsHCInMcastPkts_val_ptr);
  315.     int
  316.         ipSystemStatsInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
  317.                                        rowreq_ctx,
  318.                                        u_long *
  319.                                        ipSystemStatsInMcastOctets_val_ptr);
  320.     int
  321.         ipSystemStatsHCInMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
  322.                                          rowreq_ctx,
  323.                                          U64 *
  324.                                          ipSystemStatsHCInMcastOctets_val_ptr);
  325.     int
  326.         ipSystemStatsOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  327.                                       rowreq_ctx,
  328.                                       u_long *
  329.                                       ipSystemStatsOutMcastPkts_val_ptr);
  330.     int
  331.         ipSystemStatsHCOutMcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  332.                                         rowreq_ctx,
  333.                                         U64 *
  334.                                         ipSystemStatsHCOutMcastPkts_val_ptr);
  335.     int
  336.         ipSystemStatsOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
  337.                                         rowreq_ctx,
  338.                                         u_long *
  339.                                         ipSystemStatsOutMcastOctets_val_ptr);
  340.     int
  341.         ipSystemStatsHCOutMcastOctets_get(ipSystemStatsTable_rowreq_ctx *
  342.                                           rowreq_ctx,
  343.                                           U64 *
  344.                                           ipSystemStatsHCOutMcastOctets_val_ptr);
  345.     int
  346.         ipSystemStatsInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  347.                                      rowreq_ctx,
  348.                                      u_long *
  349.                                      ipSystemStatsInBcastPkts_val_ptr);
  350.     int
  351.         ipSystemStatsHCInBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  352.                                        rowreq_ctx,
  353.                                        U64 *
  354.                                        ipSystemStatsHCInBcastPkts_val_ptr);
  355.     int
  356.         ipSystemStatsOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  357.                                       rowreq_ctx,
  358.                                       u_long *
  359.                                       ipSystemStatsOutBcastPkts_val_ptr);
  360.     int
  361.         ipSystemStatsHCOutBcastPkts_get(ipSystemStatsTable_rowreq_ctx *
  362.                                         rowreq_ctx,
  363.                                         U64 *
  364.                                         ipSystemStatsHCOutBcastPkts_val_ptr);
  365.     int
  366.         ipSystemStatsDiscontinuityTime_get(ipSystemStatsTable_rowreq_ctx *
  367.                                            rowreq_ctx,
  368.                                            u_long *
  369.                                            ipSystemStatsDiscontinuityTime_val_ptr);
  370.     int
  371.         ipSystemStatsRefreshRate_get(ipSystemStatsTable_rowreq_ctx *
  372.                                      rowreq_ctx,
  373.                                      u_long *
  374.                                      ipSystemStatsRefreshRate_val_ptr);
  375.     int
  376.         ipSystemStatsTable_indexes_set_tbl_idx(ipSystemStatsTable_mib_index
  377.                                                * tbl_idx,
  378.                                                u_long
  379.                                                ipSystemStatsIPVersion_val);
  380.     int
  381.         ipSystemStatsTable_indexes_set(ipSystemStatsTable_rowreq_ctx *
  382.                                        rowreq_ctx,
  383.                                        u_long ipSystemStatsIPVersion_val);
  384.     /*
  385.      *********************************************************************
  386.      * SET function declarations
  387.      */
  388.     /*
  389.      *********************************************************************
  390.      * SET Table declarations
  391.      */
  392.     /*
  393.      * DUMMY markers, ignore
  394.      *
  395.      * TODO:099:x: *************************************************************
  396.      * TODO:199:x: *************************************************************
  397.      * TODO:299:x: *************************************************************
  398.      * TODO:399:x: *************************************************************
  399.      * TODO:499:x: *************************************************************
  400.      */
  401. #ifdef __cplusplus
  402. }
  403. #endif
  404. #endif                          /* IPSYSTEMSTATSTABLE_H */