ipAddressTable.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: ipAddressTable.h,v 1.12 2004/10/16 00:25:45 rstory Exp $
  6.  */
  7. #ifndef IPADDRESSTABLE_H
  8. #define IPADDRESSTABLE_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/ipaddress.h>
  18.     /*
  19.      * OID, column number and enum definions for  
  20.      */
  21. #include "ipAddressTable_constants.h"
  22.     /*
  23.      *********************************************************************
  24.      * function declarations
  25.      */
  26.     void            init_ipAddressTable(void);
  27.     /*
  28.      *********************************************************************
  29.      * Table declarations
  30.      */
  31. /**********************************************************************
  32.  **********************************************************************
  33.  ***
  34.  *** Table ipAddressTable
  35.  ***
  36.  **********************************************************************
  37.  **********************************************************************/
  38.     /*
  39.      * ipAddressTable is subid 34 of ip.
  40.      * Its status is Current.
  41.      * OID: .1.3.6.1.2.1.4.34, length: 8
  42.      */
  43.     /*
  44.      *********************************************************************
  45.      * When you register your mib, you get to provide a generic
  46.      * pointer that will be passed back to you for most of the
  47.      * functions calls.
  48.      *
  49.      * TODO:100:r: Review all context structures
  50.      */
  51.     /*
  52.      * TODO:101:o: |-> Review ipAddressTable registration context.
  53.      */
  54.     typedef netsnmp_data_list *ipAddressTable_registration_ptr;
  55. /**********************************************************************/
  56.     /*
  57.      * TODO:110:r: |-> Review ipAddressTable data context structure.
  58.      * This structure is used to represent the data for ipAddressTable.
  59.      */
  60.     typedef netsnmp_ipaddress_entry ipAddressTable_data;
  61.     /*
  62.      *********************************************************************
  63.      * TODO:115:o: |-> Review ipAddressTable undo context.
  64.      * We're just going to use the same data structure for our
  65.      * undo_context. If you want to do something more efficent,
  66.      * define your typedef here.
  67.      */
  68.     typedef ipAddressTable_data ipAddressTable_undo_data;
  69.     /*
  70.      * TODO:120:r: |-> Review ipAddressTable mib index.
  71.      * This structure is used to represent the index for ipAddressTable.
  72.      */
  73.     typedef struct ipAddressTable_mib_index_s {
  74.         /*
  75.          * ipAddressAddrType(1)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
  76.          */
  77.         u_long          ipAddressAddrType;
  78.         /*
  79.          * ipAddressAddr(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h
  80.          */
  81.         /** 128 - 1(other indexes) - oid length(10) = 116 */
  82.         char            ipAddressAddr[116];
  83.         size_t          ipAddressAddr_len;
  84.     } ipAddressTable_mib_index;
  85.     /*
  86.      * TODO:121:r: |   |-> Review ipAddressTable max index length.
  87.      * If you KNOW that your indexes will never exceed a certain
  88.      * length, update this macro to that length.
  89.      *
  90.      * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
  91.      * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
  92.      * Guessing 128 - col/entry(2)  - oid len(8)
  93.      */
  94. #define MAX_ipAddressTable_IDX_LEN     118
  95.     /*
  96.      *********************************************************************
  97.      * TODO:130:o: |-> Review ipAddressTable Row request (rowreq) context.
  98.      * When your functions are called, you will be passed a
  99.      * ipAddressTable_rowreq_ctx pointer.
  100.      */
  101.     typedef struct ipAddressTable_rowreq_ctx_s {
  102.     /** this must be first for container compare to work */
  103.         netsnmp_index   oid_idx;
  104.         oid             oid_tmp[MAX_ipAddressTable_IDX_LEN];
  105.         ipAddressTable_mib_index tbl_idx;
  106.         ipAddressTable_data *data;
  107.         ipAddressTable_undo_data *undo;
  108.         unsigned int    column_set_flags;       /* flags for set columns */
  109.         /*
  110.          * flags per row. Currently, the first 8 bits are reserverd
  111.          * for the user. See mfd.h for other flags.
  112.          */
  113.         u_int           rowreq_flags;
  114.         /*
  115.          * implementor's context pointer (provided during registration)
  116.          */
  117.         ipAddressTable_registration_ptr ipAddressTable_reg;
  118.         /*
  119.          * TODO:131:o: |   |-> Add useful data to ipAddressTable rowreq context.
  120.          */
  121.         /*
  122.          * not available from net-snmp ipaddress data_access
  123.          */
  124.         uint32_t        ipAddressCreated;       /* sysUpTime */
  125.         uint32_t        ipAddressLastChanged, ipAddressLastChanged_undo;        /* sysUpTime */
  126.         int             ipAddressRowStatus, ipAddressRowStatus_undo;
  127.         /*
  128.          * storage for future expansion
  129.          */
  130.         netsnmp_data_list *ipAddressTable_data_list;
  131.     } ipAddressTable_rowreq_ctx;
  132.     typedef struct ipAddressTable_ref_rowreq_ctx_s {
  133.         ipAddressTable_rowreq_ctx *rowreq_ctx;
  134.     } ipAddressTable_ref_rowreq_ctx;
  135.     /*
  136.      *********************************************************************
  137.      * function prototypes
  138.      */
  139.     int
  140.         ipAddressTable_pre_request(ipAddressTable_registration_ptr
  141.                                    user_context);
  142.     int
  143.         ipAddressTable_post_request(ipAddressTable_registration_ptr
  144.                                     user_context);
  145.     ipAddressTable_data *ipAddressTable_allocate_data(void);
  146.     void            ipAddressTable_release_data(ipAddressTable_data *
  147.                                                 data);
  148.     int
  149.         ipAddressTable_check_dependencies(ipAddressTable_rowreq_ctx *
  150.                                           rowreq_ctx);
  151.     int             ipAddressTable_commit(ipAddressTable_rowreq_ctx *
  152.                                           rowreq_ctx);
  153.     extern oid      ipAddressTable_oid[];
  154.     extern int      ipAddressTable_oid_size;
  155. #include "ipAddressTable_interface.h"
  156. #include "ipAddressTable_data_access.h"
  157.     /*
  158.      *********************************************************************
  159.      * GET function declarations
  160.      */
  161.     /*
  162.      *********************************************************************
  163.      * GET Table declarations
  164.      */
  165. /**********************************************************************
  166.  **********************************************************************
  167.  ***
  168.  *** Table ipAddressTable
  169.  ***
  170.  **********************************************************************
  171.  **********************************************************************/
  172.     /*
  173.      * ipAddressTable is subid 34 of ip.
  174.      * Its status is Current.
  175.      * OID: .1.3.6.1.2.1.4.34, length: 8
  176.      */
  177.     /*
  178.      * indexes
  179.      */
  180.     int             ipAddressAddrType_map(u_long *
  181.                                           mib_ipAddressAddrType_val_ptr,
  182.                                           u_long
  183.                                           raw_ipAddressAddrType_val);
  184.     int             ipAddressIfIndex_get(ipAddressTable_rowreq_ctx *
  185.                                          rowreq_ctx,
  186.                                          long *ipAddressIfIndex_val_ptr);
  187.     int             ipAddressType_get(ipAddressTable_rowreq_ctx *
  188.                                       rowreq_ctx,
  189.                                       u_long * ipAddressType_val_ptr);
  190.     int             ipAddressPrefix_get(ipAddressTable_rowreq_ctx *
  191.                                         rowreq_ctx,
  192.                                         oid ** ipAddressPrefix_val_ptr_ptr,
  193.                                         size_t
  194.                                         *ipAddressPrefix_val_ptr_len_ptr);
  195.     int             ipAddressOrigin_get(ipAddressTable_rowreq_ctx *
  196.                                         rowreq_ctx,
  197.                                         u_long * ipAddressOrigin_val_ptr);
  198.     int             ipAddressStatus_get(ipAddressTable_rowreq_ctx *
  199.                                         rowreq_ctx,
  200.                                         u_long * ipAddressStatus_val_ptr);
  201.     int             ipAddressCreated_get(ipAddressTable_rowreq_ctx *
  202.                                          rowreq_ctx,
  203.                                          u_long *
  204.                                          ipAddressCreated_val_ptr);
  205.     int             ipAddressLastChanged_get(ipAddressTable_rowreq_ctx *
  206.                                              rowreq_ctx,
  207.                                              u_long *
  208.                                              ipAddressLastChanged_val_ptr);
  209.     int             ipAddressRowStatus_get(ipAddressTable_rowreq_ctx *
  210.                                            rowreq_ctx,
  211.                                            u_long *
  212.                                            ipAddressRowStatus_val_ptr);
  213.     int             ipAddressStorageType_get(ipAddressTable_rowreq_ctx *
  214.                                              rowreq_ctx,
  215.                                              u_long *
  216.                                              ipAddressStorageType_val_ptr);
  217.     int
  218.         ipAddressTable_indexes_set_tbl_idx(ipAddressTable_mib_index *
  219.                                            tbl_idx,
  220.                                            u_long ipAddressAddrType_val,
  221.                                            char *ipAddressAddr_val_ptr,
  222.                                            size_t
  223.                                            ipAddressAddr_val_ptr_len);
  224.     int             ipAddressTable_indexes_set(ipAddressTable_rowreq_ctx *
  225.                                                rowreq_ctx,
  226.                                                u_long
  227.                                                ipAddressAddrType_val,
  228.                                                char *ipAddressAddr_val_ptr,
  229.                                                size_t
  230.                                                ipAddressAddr_val_ptr_len);
  231.     /*
  232.      *********************************************************************
  233.      * SET function declarations
  234.      */
  235.     /*
  236.      *********************************************************************
  237.      * SET Table declarations
  238.      */
  239. /**********************************************************************
  240.  **********************************************************************
  241.  ***
  242.  *** Table ipAddressTable
  243.  ***
  244.  **********************************************************************
  245.  **********************************************************************/
  246.     /*
  247.      * ipAddressTable is subid 34 of ip.
  248.      * Its status is Current.
  249.      * OID: .1.3.6.1.2.1.4.34, length: 8
  250.      */
  251.     int             ipAddressAddrType_check_index(ipAddressTable_rowreq_ctx * rowreq_ctx);      /* internal */
  252.     int             ipAddressAddr_check_index(ipAddressTable_rowreq_ctx * rowreq_ctx);  /* internal */
  253.     int
  254.         ipAddressTable_validate_index(ipAddressTable_registration_ptr
  255.                                       ipAddressTable_reg,
  256.                                       ipAddressTable_rowreq_ctx *
  257.                                       rowreq_ctx);
  258.     int             ipAddressTable_undo_setup(ipAddressTable_rowreq_ctx *
  259.                                               rowreq_ctx);
  260.     int             ipAddressTable_undo_cleanup(ipAddressTable_rowreq_ctx *
  261.                                                 rowreq_ctx);
  262.     int             ipAddressTable_commit(ipAddressTable_rowreq_ctx *
  263.                                           rowreq_ctx);
  264.     int             ipAddressTable_undo_commit(ipAddressTable_rowreq_ctx *
  265.                                                rowreq_ctx);
  266.     int             ipAddressIfIndex_check_value(ipAddressTable_rowreq_ctx
  267.                                                  * rowreq_ctx, long
  268.                                                  ipAddressIfIndex_val);
  269.     int             ipAddressIfIndex_undo_setup(ipAddressTable_rowreq_ctx *
  270.                                                 rowreq_ctx);
  271.     int             ipAddressIfIndex_set(ipAddressTable_rowreq_ctx *
  272.                                          rowreq_ctx,
  273.                                          long ipAddressIfIndex_val);
  274.     int             ipAddressIfIndex_undo(ipAddressTable_rowreq_ctx *
  275.                                           rowreq_ctx);
  276.     int             ipAddressType_check_value(ipAddressTable_rowreq_ctx *
  277.                                               rowreq_ctx,
  278.                                               u_long ipAddressType_val);
  279.     int             ipAddressType_undo_setup(ipAddressTable_rowreq_ctx *
  280.                                              rowreq_ctx);
  281.     int             ipAddressType_set(ipAddressTable_rowreq_ctx *
  282.                                       rowreq_ctx,
  283.                                       u_long ipAddressType_val);
  284.     int             ipAddressType_undo(ipAddressTable_rowreq_ctx *
  285.                                        rowreq_ctx);
  286.     int             ipAddressPrefix_check_value(ipAddressTable_rowreq_ctx *
  287.                                                 rowreq_ctx,
  288.                                                 oid *
  289.                                                 ipAddressPrefix_val_ptr,
  290.                                                 size_t
  291.                                                 ipAddressPrefix_val_ptr_len);
  292.     int             ipAddressPrefix_undo_setup(ipAddressTable_rowreq_ctx *
  293.                                                rowreq_ctx);
  294.     int             ipAddressPrefix_set(ipAddressTable_rowreq_ctx *
  295.                                         rowreq_ctx,
  296.                                         oid * ipAddressPrefix_val_ptr,
  297.                                         size_t
  298.                                         ipAddressPrefix_val_ptr_len);
  299.     int             ipAddressPrefix_undo(ipAddressTable_rowreq_ctx *
  300.                                          rowreq_ctx);
  301.     int             ipAddressOrigin_check_value(ipAddressTable_rowreq_ctx *
  302.                                                 rowreq_ctx,
  303.                                                 u_long
  304.                                                 ipAddressOrigin_val);
  305.     int             ipAddressOrigin_undo_setup(ipAddressTable_rowreq_ctx *
  306.                                                rowreq_ctx);
  307.     int             ipAddressOrigin_set(ipAddressTable_rowreq_ctx *
  308.                                         rowreq_ctx,
  309.                                         u_long ipAddressOrigin_val);
  310.     int             ipAddressOrigin_undo(ipAddressTable_rowreq_ctx *
  311.                                          rowreq_ctx);
  312.     int             ipAddressStatus_check_value(ipAddressTable_rowreq_ctx *
  313.                                                 rowreq_ctx,
  314.                                                 u_long
  315.                                                 ipAddressStatus_val);
  316.     int             ipAddressStatus_undo_setup(ipAddressTable_rowreq_ctx *
  317.                                                rowreq_ctx);
  318.     int             ipAddressStatus_set(ipAddressTable_rowreq_ctx *
  319.                                         rowreq_ctx,
  320.                                         u_long ipAddressStatus_val);
  321.     int             ipAddressStatus_undo(ipAddressTable_rowreq_ctx *
  322.                                          rowreq_ctx);
  323.     int             ipAddressCreated_check_value(ipAddressTable_rowreq_ctx
  324.                                                  * rowreq_ctx,
  325.                                                  u_long
  326.                                                  ipAddressCreated_val);
  327.     int             ipAddressCreated_undo_setup(ipAddressTable_rowreq_ctx *
  328.                                                 rowreq_ctx);
  329.     int             ipAddressCreated_set(ipAddressTable_rowreq_ctx *
  330.                                          rowreq_ctx,
  331.                                          u_long ipAddressCreated_val);
  332.     int             ipAddressCreated_undo(ipAddressTable_rowreq_ctx *
  333.                                           rowreq_ctx);
  334.     int
  335.         ipAddressLastChanged_check_value(ipAddressTable_rowreq_ctx *
  336.                                          rowreq_ctx,
  337.                                          u_long ipAddressLastChanged_val);
  338.     int
  339.         ipAddressLastChanged_undo_setup(ipAddressTable_rowreq_ctx *
  340.                                         rowreq_ctx);
  341.     int             ipAddressLastChanged_set(ipAddressTable_rowreq_ctx *
  342.                                              rowreq_ctx,
  343.                                              u_long
  344.                                              ipAddressLastChanged_val);
  345.     int             ipAddressLastChanged_undo(ipAddressTable_rowreq_ctx *
  346.                                               rowreq_ctx);
  347.     int
  348.         ipAddressRowStatus_check_value(ipAddressTable_rowreq_ctx *
  349.                                        rowreq_ctx,
  350.                                        u_long ipAddressRowStatus_val);
  351.     int             ipAddressRowStatus_undo_setup(ipAddressTable_rowreq_ctx
  352.                                                   * rowreq_ctx);
  353.     int             ipAddressRowStatus_set(ipAddressTable_rowreq_ctx *
  354.                                            rowreq_ctx,
  355.                                            u_long ipAddressRowStatus_val);
  356.     int             ipAddressRowStatus_undo(ipAddressTable_rowreq_ctx *
  357.                                             rowreq_ctx);
  358.     int
  359.         ipAddressStorageType_check_value(ipAddressTable_rowreq_ctx *
  360.                                          rowreq_ctx,
  361.                                          u_long ipAddressStorageType_val);
  362.     int
  363.         ipAddressStorageType_undo_setup(ipAddressTable_rowreq_ctx *
  364.                                         rowreq_ctx);
  365.     int             ipAddressStorageType_set(ipAddressTable_rowreq_ctx *
  366.                                              rowreq_ctx,
  367.                                              u_long
  368.                                              ipAddressStorageType_val);
  369.     int             ipAddressStorageType_undo(ipAddressTable_rowreq_ctx *
  370.                                               rowreq_ctx);
  371.     int
  372.         ipAddressTable_check_dependencies(ipAddressTable_rowreq_ctx * ctx);
  373.     /*
  374.      * DUMMY markers, ignore
  375.      *
  376.      * TODO:099:x: *************************************************************
  377.      * TODO:199:x: *************************************************************
  378.      * TODO:299:x: *************************************************************
  379.      * TODO:399:x: *************************************************************
  380.      * TODO:499:x: *************************************************************
  381.      */
  382. #ifdef __cplusplus
  383. }
  384. #endif
  385. #endif                          /* IPADDRESSTABLE_H */