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

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: ipCidrRouteTable.h,v 1.11.2.1 2005/09/06 20:26:02 rstory Exp $
  6.  */
  7. #ifndef IPCIDRROUTETABLE_H
  8. #define IPCIDRROUTETABLE_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/route.h>
  18. #include "mibII/route_headers.h"
  19.     /*
  20.      * other required module components 
  21.      */
  22.     /* *INDENT-OFF*  */
  23.     config_require(ip-forward-mib/data_access/route);
  24.     config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface);
  25.     config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access);
  26.     /* *INDENT-ON*  */
  27.     /*
  28.      * OID, column number and enum definions for  
  29.      */
  30. #include "ipCidrRouteTable_constants.h"
  31.     /*
  32.      *********************************************************************
  33.      * function declarations
  34.      */
  35.     void            init_ipCidrRouteTable(void);
  36.     /*
  37.      *********************************************************************
  38.      * Table declarations
  39.      */
  40. /**********************************************************************
  41.  **********************************************************************
  42.  ***
  43.  *** Table ipCidrRouteTable
  44.  ***
  45.  **********************************************************************
  46.  **********************************************************************/
  47.     /*
  48.      * ipCidrRouteTable is subid 4 of ipForward.
  49.      * Its status is Deprecated.
  50.      * OID: .1.3.6.1.2.1.4.24.4, length: 9
  51.      */
  52.     /*
  53.      *********************************************************************
  54.      * When you register your mib, you get to provide a generic
  55.      * pointer that will be passed back to you for most of the
  56.      * functions calls.
  57.      *
  58.      * TODO:100:r: Review all context structures
  59.      */
  60.     /*
  61.      * TODO:101:o: |-> Review ipCidrRouteTable registration context.
  62.      */
  63.     typedef netsnmp_data_list *ipCidrRouteTable_registration_ptr;
  64. /**********************************************************************/
  65.     /*
  66.      * TODO:110:r: |-> Review ipCidrRouteTable data context structure.
  67.      * This structure is used to represent the data for ipCidrRouteTable.
  68.      */
  69.     typedef netsnmp_route_entry ipCidrRouteTable_data;
  70.     /*
  71.      *********************************************************************
  72.      * TODO:115:o: |-> Review ipCidrRouteTable undo context.
  73.      * We're just going to use the same data structure for our
  74.      * undo_context. If you want to do something more efficent,
  75.      * define your typedef here.
  76.      */
  77.     typedef ipCidrRouteTable_data ipCidrRouteTable_undo_data;
  78.     /*
  79.      * TODO:120:r: |-> Review ipCidrRouteTable mib index.
  80.      * This structure is used to represent the index for ipCidrRouteTable.
  81.      */
  82.     typedef struct ipCidrRouteTable_mib_index_s {
  83.         /*
  84.          * ipCidrRouteDest(1)/IPADDR/ASN_IPADDRESS/u_long(u_long)//l/A/w/e/r/d/h
  85.          */
  86.         uint32_t        ipCidrRouteDest;
  87.         /*
  88.          * ipCidrRouteMask(2)/IPADDR/ASN_IPADDRESS/u_long(u_long)//l/A/w/e/r/d/h
  89.          */
  90.         uint32_t        ipCidrRouteMask;
  91.         /*
  92.          * ipCidrRouteTos(3)/INTEGER32/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
  93.          */
  94.         long            ipCidrRouteTos;
  95.         /*
  96.          * ipCidrRouteNextHop(4)/IPADDR/ASN_IPADDRESS/u_long(u_long)//l/A/w/e/r/d/h
  97.          */
  98.         uint32_t        ipCidrRouteNextHop;
  99.     } ipCidrRouteTable_mib_index;
  100.     /*
  101.      * TODO:121:r: |   |-> Review ipCidrRouteTable max index length.
  102.      * If you KNOW that your indexes will never exceed a certain
  103.      * length, update this macro to that length.
  104.      */
  105. #define MAX_ipCidrRouteTable_IDX_LEN     13
  106.     /*
  107.      *********************************************************************
  108.      * TODO:130:o: |-> Review ipCidrRouteTable Row request (rowreq) context.
  109.      * When your functions are called, you will be passed a
  110.      * ipCidrRouteTable_rowreq_ctx pointer.
  111.      */
  112.     typedef struct ipCidrRouteTable_rowreq_ctx_s {
  113.     /** this must be first for container compare to work */
  114.         netsnmp_index   oid_idx;
  115.         oid             oid_tmp[MAX_ipCidrRouteTable_IDX_LEN];
  116.         ipCidrRouteTable_mib_index tbl_idx;
  117.         ipCidrRouteTable_data *data;
  118.         ipCidrRouteTable_undo_data *undo;
  119.         unsigned int    column_set_flags;       /* flags for set columns */
  120.         /*
  121.          * flags per row. Currently, the first 8 bits are reserverd
  122.          * for the user. See mfd.h for other flags.
  123.          */
  124.         u_int           rowreq_flags;
  125.         /*
  126.          * implementor's context pointer (provided during registration)
  127.          */
  128.         ipCidrRouteTable_registration_ptr ipCidrRouteTable_reg;
  129.         /*
  130.          * TODO:131:o: |   |-> Add useful data to ipCidrRouteTable rowreq context.
  131.          */
  132.         u_char          ipCidrRouteStatus;
  133.         /*
  134.          * storage for future expansion
  135.          */
  136.         netsnmp_data_list *ipCidrRouteTable_data_list;
  137.     } ipCidrRouteTable_rowreq_ctx;
  138.     typedef struct ipCidrRouteTable_ref_rowreq_ctx_s {
  139.         ipCidrRouteTable_rowreq_ctx *rowreq_ctx;
  140.     } ipCidrRouteTable_ref_rowreq_ctx;
  141.     /*
  142.      *********************************************************************
  143.      * function prototypes
  144.      */
  145.     int
  146.         ipCidrRouteTable_pre_request(ipCidrRouteTable_registration_ptr
  147.                                      user_context);
  148.     int
  149.         ipCidrRouteTable_post_request(ipCidrRouteTable_registration_ptr
  150.                                       user_context);
  151.     ipCidrRouteTable_data *ipCidrRouteTable_allocate_data(void);
  152.     void            ipCidrRouteTable_release_data(ipCidrRouteTable_data *
  153.                                                   data);
  154.     int             ipCidrRouteTable_commit(ipCidrRouteTable_rowreq_ctx *
  155.                                             rowreq_ctx);
  156.     extern oid      ipCidrRouteTable_oid[];
  157.     extern int      ipCidrRouteTable_oid_size;
  158. #include "ipCidrRouteTable_interface.h"
  159. #include "ipCidrRouteTable_data_access.h"
  160.     /*
  161.      *********************************************************************
  162.      * GET function declarations
  163.      */
  164.     /*
  165.      *********************************************************************
  166.      * GET Table declarations
  167.      */
  168. /**********************************************************************
  169.  **********************************************************************
  170.  ***
  171.  *** Table ipCidrRouteTable
  172.  ***
  173.  **********************************************************************
  174.  **********************************************************************/
  175.     /*
  176.      * ipCidrRouteTable is subid 4 of ipForward.
  177.      * Its status is Deprecated.
  178.      * OID: .1.3.6.1.2.1.4.24.4, length: 9
  179.      */
  180.     /*
  181.      * indexes
  182.      */
  183.     int             ipCidrRouteIfIndex_get(ipCidrRouteTable_rowreq_ctx *
  184.                                            rowreq_ctx, long
  185.                                            *ipCidrRouteIfIndex_val_ptr);
  186.     int             ipCidrRouteType_get(ipCidrRouteTable_rowreq_ctx *
  187.                                         rowreq_ctx,
  188.                                         u_long * ipCidrRouteType_val_ptr);
  189.     int             ipCidrRouteProto_get(ipCidrRouteTable_rowreq_ctx *
  190.                                          rowreq_ctx,
  191.                                          u_long *
  192.                                          ipCidrRouteProto_val_ptr);
  193.     int             ipCidrRouteAge_get(ipCidrRouteTable_rowreq_ctx *
  194.                                        rowreq_ctx,
  195.                                        long *ipCidrRouteAge_val_ptr);
  196.     int             ipCidrRouteInfo_get(ipCidrRouteTable_rowreq_ctx *
  197.                                         rowreq_ctx,
  198.                                         oid ** ipCidrRouteInfo_val_ptr_ptr,
  199.                                         size_t
  200.                                         *ipCidrRouteInfo_val_ptr_len_ptr);
  201.     int             ipCidrRouteNextHopAS_get(ipCidrRouteTable_rowreq_ctx *
  202.                                              rowreq_ctx, long
  203.                                              *ipCidrRouteNextHopAS_val_ptr);
  204.     int             ipCidrRouteMetric1_get(ipCidrRouteTable_rowreq_ctx *
  205.                                            rowreq_ctx, long
  206.                                            *ipCidrRouteMetric1_val_ptr);
  207.     int             ipCidrRouteMetric2_get(ipCidrRouteTable_rowreq_ctx *
  208.                                            rowreq_ctx, long
  209.                                            *ipCidrRouteMetric2_val_ptr);
  210.     int             ipCidrRouteMetric3_get(ipCidrRouteTable_rowreq_ctx *
  211.                                            rowreq_ctx, long
  212.                                            *ipCidrRouteMetric3_val_ptr);
  213.     int             ipCidrRouteMetric4_get(ipCidrRouteTable_rowreq_ctx *
  214.                                            rowreq_ctx, long
  215.                                            *ipCidrRouteMetric4_val_ptr);
  216.     int             ipCidrRouteMetric5_get(ipCidrRouteTable_rowreq_ctx *
  217.                                            rowreq_ctx, long
  218.                                            *ipCidrRouteMetric5_val_ptr);
  219.     int             ipCidrRouteStatus_get(ipCidrRouteTable_rowreq_ctx *
  220.                                           rowreq_ctx,
  221.                                           u_long *
  222.                                           ipCidrRouteStatus_val_ptr);
  223.     int
  224.         ipCidrRouteTable_indexes_set_tbl_idx(ipCidrRouteTable_mib_index *
  225.                                              tbl_idx,
  226.                                              u_long ipCidrRouteDest_val,
  227.                                              u_long ipCidrRouteMask_val,
  228.                                              long ipCidrRouteTos_val,
  229.                                              u_long
  230.                                              ipCidrRouteNextHop_val);
  231.     int
  232.         ipCidrRouteTable_indexes_set(ipCidrRouteTable_rowreq_ctx *
  233.                                      rowreq_ctx,
  234.                                      u_long ipCidrRouteDest_val,
  235.                                      u_long ipCidrRouteMask_val,
  236.                                      long ipCidrRouteTos_val,
  237.                                      u_long ipCidrRouteNextHop_val);
  238.     /*
  239.      *********************************************************************
  240.      * SET function declarations
  241.      */
  242.     /*
  243.      *********************************************************************
  244.      * SET Table declarations
  245.      */
  246. /**********************************************************************
  247.  **********************************************************************
  248.  ***
  249.  *** Table ipCidrRouteTable
  250.  ***
  251.  **********************************************************************
  252.  **********************************************************************/
  253.     /*
  254.      * ipCidrRouteTable is subid 4 of ipForward.
  255.      * Its status is Deprecated.
  256.      * OID: .1.3.6.1.2.1.4.24.4, length: 9
  257.      */
  258.     int             ipCidrRouteDest_check_index(ipCidrRouteTable_rowreq_ctx * rowreq_ctx);      /* internal */
  259.     int             ipCidrRouteMask_check_index(ipCidrRouteTable_rowreq_ctx * rowreq_ctx);      /* internal */
  260.     int             ipCidrRouteTos_check_index(ipCidrRouteTable_rowreq_ctx * rowreq_ctx);       /* internal */
  261.     int             ipCidrRouteNextHop_check_index(ipCidrRouteTable_rowreq_ctx * rowreq_ctx);   /* internal */
  262.     int
  263.         ipCidrRouteTable_validate_index(ipCidrRouteTable_registration_ptr
  264.                                         ipCidrRouteTable_reg,
  265.                                         ipCidrRouteTable_rowreq_ctx *
  266.                                         rowreq_ctx);
  267.     int             ipCidrRouteTable_undo_setup(ipCidrRouteTable_rowreq_ctx
  268.                                                 * rowreq_ctx);
  269.     int
  270.         ipCidrRouteTable_undo_cleanup(ipCidrRouteTable_rowreq_ctx *
  271.                                       rowreq_ctx);
  272.     int             ipCidrRouteTable_commit(ipCidrRouteTable_rowreq_ctx *
  273.                                             rowreq_ctx);
  274.     int
  275.         ipCidrRouteTable_undo_commit(ipCidrRouteTable_rowreq_ctx *
  276.                                      rowreq_ctx);
  277.     int
  278.         ipCidrRouteIfIndex_check_value(ipCidrRouteTable_rowreq_ctx *
  279.                                        rowreq_ctx,
  280.                                        long ipCidrRouteIfIndex_val);
  281.     int
  282.         ipCidrRouteIfIndex_undo_setup(ipCidrRouteTable_rowreq_ctx *
  283.                                       rowreq_ctx);
  284.     int             ipCidrRouteIfIndex_set(ipCidrRouteTable_rowreq_ctx *
  285.                                            rowreq_ctx,
  286.                                            long ipCidrRouteIfIndex_val);
  287.     int             ipCidrRouteIfIndex_undo(ipCidrRouteTable_rowreq_ctx *
  288.                                             rowreq_ctx);
  289.     int             ipCidrRouteType_check_value(ipCidrRouteTable_rowreq_ctx
  290.                                                 * rowreq_ctx,
  291.                                                 u_long
  292.                                                 ipCidrRouteType_val);
  293.     int             ipCidrRouteType_undo_setup(ipCidrRouteTable_rowreq_ctx
  294.                                                * rowreq_ctx);
  295.     int             ipCidrRouteType_set(ipCidrRouteTable_rowreq_ctx *
  296.                                         rowreq_ctx,
  297.                                         u_long ipCidrRouteType_val);
  298.     int             ipCidrRouteType_undo(ipCidrRouteTable_rowreq_ctx *
  299.                                          rowreq_ctx);
  300.     int
  301.         ipCidrRouteProto_check_value(ipCidrRouteTable_rowreq_ctx *
  302.                                      rowreq_ctx,
  303.                                      u_long ipCidrRouteProto_val);
  304.     int             ipCidrRouteProto_undo_setup(ipCidrRouteTable_rowreq_ctx
  305.                                                 * rowreq_ctx);
  306.     int             ipCidrRouteProto_set(ipCidrRouteTable_rowreq_ctx *
  307.                                          rowreq_ctx,
  308.                                          u_long ipCidrRouteProto_val);
  309.     int             ipCidrRouteProto_undo(ipCidrRouteTable_rowreq_ctx *
  310.                                           rowreq_ctx);
  311.     int             ipCidrRouteAge_check_value(ipCidrRouteTable_rowreq_ctx
  312.                                                * rowreq_ctx,
  313.                                                long ipCidrRouteAge_val);
  314.     int             ipCidrRouteAge_undo_setup(ipCidrRouteTable_rowreq_ctx *
  315.                                               rowreq_ctx);
  316.     int             ipCidrRouteAge_set(ipCidrRouteTable_rowreq_ctx *
  317.                                        rowreq_ctx,
  318.                                        long ipCidrRouteAge_val);
  319.     int             ipCidrRouteAge_undo(ipCidrRouteTable_rowreq_ctx *
  320.                                         rowreq_ctx);
  321.     int             ipCidrRouteInfo_check_value(ipCidrRouteTable_rowreq_ctx
  322.                                                 * rowreq_ctx,
  323.                                                 oid *
  324.                                                 ipCidrRouteInfo_val_ptr,
  325.                                                 size_t
  326.                                                 ipCidrRouteInfo_val_ptr_len);
  327.     int             ipCidrRouteInfo_undo_setup(ipCidrRouteTable_rowreq_ctx
  328.                                                * rowreq_ctx);
  329.     int             ipCidrRouteInfo_set(ipCidrRouteTable_rowreq_ctx *
  330.                                         rowreq_ctx,
  331.                                         oid * ipCidrRouteInfo_val_ptr,
  332.                                         size_t
  333.                                         ipCidrRouteInfo_val_ptr_len);
  334.     int             ipCidrRouteInfo_undo(ipCidrRouteTable_rowreq_ctx *
  335.                                          rowreq_ctx);
  336.     int
  337.         ipCidrRouteNextHopAS_check_value(ipCidrRouteTable_rowreq_ctx *
  338.                                          rowreq_ctx,
  339.                                          long ipCidrRouteNextHopAS_val);
  340.     int
  341.         ipCidrRouteNextHopAS_undo_setup(ipCidrRouteTable_rowreq_ctx *
  342.                                         rowreq_ctx);
  343.     int             ipCidrRouteNextHopAS_set(ipCidrRouteTable_rowreq_ctx *
  344.                                              rowreq_ctx, long
  345.                                              ipCidrRouteNextHopAS_val);
  346.     int             ipCidrRouteNextHopAS_undo(ipCidrRouteTable_rowreq_ctx *
  347.                                               rowreq_ctx);
  348.     int
  349.         ipCidrRouteMetric1_check_value(ipCidrRouteTable_rowreq_ctx *
  350.                                        rowreq_ctx,
  351.                                        long ipCidrRouteMetric1_val);
  352.     int
  353.         ipCidrRouteMetric1_undo_setup(ipCidrRouteTable_rowreq_ctx *
  354.                                       rowreq_ctx);
  355.     int             ipCidrRouteMetric1_set(ipCidrRouteTable_rowreq_ctx *
  356.                                            rowreq_ctx,
  357.                                            long ipCidrRouteMetric1_val);
  358.     int             ipCidrRouteMetric1_undo(ipCidrRouteTable_rowreq_ctx *
  359.                                             rowreq_ctx);
  360.     int
  361.         ipCidrRouteMetric2_check_value(ipCidrRouteTable_rowreq_ctx *
  362.                                        rowreq_ctx,
  363.                                        long ipCidrRouteMetric2_val);
  364.     int
  365.         ipCidrRouteMetric2_undo_setup(ipCidrRouteTable_rowreq_ctx *
  366.                                       rowreq_ctx);
  367.     int             ipCidrRouteMetric2_set(ipCidrRouteTable_rowreq_ctx *
  368.                                            rowreq_ctx,
  369.                                            long ipCidrRouteMetric2_val);
  370.     int             ipCidrRouteMetric2_undo(ipCidrRouteTable_rowreq_ctx *
  371.                                             rowreq_ctx);
  372.     int
  373.         ipCidrRouteMetric3_check_value(ipCidrRouteTable_rowreq_ctx *
  374.                                        rowreq_ctx,
  375.                                        long ipCidrRouteMetric3_val);
  376.     int
  377.         ipCidrRouteMetric3_undo_setup(ipCidrRouteTable_rowreq_ctx *
  378.                                       rowreq_ctx);
  379.     int             ipCidrRouteMetric3_set(ipCidrRouteTable_rowreq_ctx *
  380.                                            rowreq_ctx,
  381.                                            long ipCidrRouteMetric3_val);
  382.     int             ipCidrRouteMetric3_undo(ipCidrRouteTable_rowreq_ctx *
  383.                                             rowreq_ctx);
  384.     int
  385.         ipCidrRouteMetric4_check_value(ipCidrRouteTable_rowreq_ctx *
  386.                                        rowreq_ctx,
  387.                                        long ipCidrRouteMetric4_val);
  388.     int
  389.         ipCidrRouteMetric4_undo_setup(ipCidrRouteTable_rowreq_ctx *
  390.                                       rowreq_ctx);
  391.     int             ipCidrRouteMetric4_set(ipCidrRouteTable_rowreq_ctx *
  392.                                            rowreq_ctx,
  393.                                            long ipCidrRouteMetric4_val);
  394.     int             ipCidrRouteMetric4_undo(ipCidrRouteTable_rowreq_ctx *
  395.                                             rowreq_ctx);
  396.     int
  397.         ipCidrRouteMetric5_check_value(ipCidrRouteTable_rowreq_ctx *
  398.                                        rowreq_ctx,
  399.                                        long ipCidrRouteMetric5_val);
  400.     int
  401.         ipCidrRouteMetric5_undo_setup(ipCidrRouteTable_rowreq_ctx *
  402.                                       rowreq_ctx);
  403.     int             ipCidrRouteMetric5_set(ipCidrRouteTable_rowreq_ctx *
  404.                                            rowreq_ctx,
  405.                                            long ipCidrRouteMetric5_val);
  406.     int             ipCidrRouteMetric5_undo(ipCidrRouteTable_rowreq_ctx *
  407.                                             rowreq_ctx);
  408.     int
  409.         ipCidrRouteStatus_check_value(ipCidrRouteTable_rowreq_ctx *
  410.                                       rowreq_ctx,
  411.                                       u_long ipCidrRouteStatus_val);
  412.     int
  413.         ipCidrRouteStatus_undo_setup(ipCidrRouteTable_rowreq_ctx *
  414.                                      rowreq_ctx);
  415.     int             ipCidrRouteStatus_set(ipCidrRouteTable_rowreq_ctx *
  416.                                           rowreq_ctx,
  417.                                           u_long ipCidrRouteStatus_val);
  418.     int             ipCidrRouteStatus_undo(ipCidrRouteTable_rowreq_ctx *
  419.                                            rowreq_ctx);
  420.     int
  421.         ipCidrRouteTable_check_dependencies(ipCidrRouteTable_rowreq_ctx *
  422.                                             ctx);
  423.     /*
  424.      * DUMMY markers, ignore
  425.      *
  426.      * TODO:099:x: *************************************************************
  427.      * TODO:199:x: *************************************************************
  428.      * TODO:299:x: *************************************************************
  429.      * TODO:399:x: *************************************************************
  430.      * TODO:499:x: *************************************************************
  431.      */
  432. #ifdef __cplusplus
  433. }
  434. #endif
  435. #endif                          /* IPCIDRROUTETABLE_H */