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

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: inetCidrRouteTable.h,v 1.9 2004/10/18 03:53:19 rstory Exp $
  6.  */
  7. #ifndef INETCIDRROUTETABLE_H
  8. #define INETCIDRROUTETABLE_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.     /*
  19.      * other required module components 
  20.      */
  21.     /* *INDENT-OFF*  */
  22.     config_require(ip-forward-mib/data_access/route);
  23.     config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface);
  24.     config_require(ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_data_access);
  25.     /* *INDENT-ON*  */
  26.     /*
  27.      * OID, column number and enum definions for  
  28.      */
  29. #include "inetCidrRouteTable_constants.h"
  30.     /*
  31.      *********************************************************************
  32.      * function declarations
  33.      */
  34.     void            init_inetCidrRouteTable(void);
  35.     /*
  36.      *********************************************************************
  37.      * Table declarations
  38.      */
  39. /**********************************************************************
  40.  **********************************************************************
  41.  ***
  42.  *** Table inetCidrRouteTable
  43.  ***
  44.  **********************************************************************
  45.  **********************************************************************/
  46.     /*
  47.      * inetCidrRouteTable is subid 7 of ipForward.
  48.      * Its status is Current.
  49.      * OID: .1.3.6.1.2.1.4.24.7, length: 9
  50.      */
  51.     /*
  52.      *********************************************************************
  53.      * When you register your mib, you get to provide a generic
  54.      * pointer that will be passed back to you for most of the
  55.      * functions calls.
  56.      *
  57.      * TODO:100:r: Review all context structures
  58.      */
  59.     /*
  60.      * TODO:101:o: |-> Review inetCidrRouteTable registration context.
  61.      */
  62.     typedef netsnmp_data_list *inetCidrRouteTable_registration_ptr;
  63. /**********************************************************************/
  64.     /*
  65.      * TODO:110:r: |-> Review inetCidrRouteTable data context structure.
  66.      * This structure is used to represent the data for inetCidrRouteTable.
  67.      */
  68.     typedef netsnmp_route_entry inetCidrRouteTable_data;
  69.     /*
  70.      *********************************************************************
  71.      * TODO:115:o: |-> Review inetCidrRouteTable undo context.
  72.      * We're just going to use the same data structure for our
  73.      * undo_context. If you want to do something more efficent,
  74.      * define your typedef here.
  75.      */
  76.     typedef inetCidrRouteTable_data inetCidrRouteTable_undo_data;
  77.     /*
  78.      * TODO:120:r: |-> Review inetCidrRouteTable mib index.
  79.      * This structure is used to represent the index for inetCidrRouteTable.
  80.      */
  81.     typedef struct inetCidrRouteTable_mib_index_s {
  82.         /*
  83.          * inetCidrRouteDestType(1)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
  84.          */
  85.         u_long          inetCidrRouteDestType;
  86.         /*
  87.          * inetCidrRouteDest(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h
  88.          */
  89.         char           
  90.             inetCidrRouteDest[NETSNMP_ACCESS_ROUTE_ADDR_BUF_SIZE];
  91.         size_t          inetCidrRouteDest_len;
  92.         /*
  93.          * inetCidrRoutePfxLen(3)/InetAddressPrefixLength/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H
  94.          */
  95.         u_long          inetCidrRoutePfxLen;
  96.         /*
  97.          * inetCidrRoutePolicy(4)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/a/w/e/r/d/h
  98.          */
  99.         oid             inetCidrRoutePolicy[NETSNMP_POLICY_OID_MAX_LEN];
  100.         size_t          inetCidrRoutePolicy_len;
  101.         /*
  102.          * inetCidrRouteNextHopType(5)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
  103.          */
  104.         u_long          inetCidrRouteNextHopType;
  105.         /*
  106.          * inetCidrRouteNextHop(6)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h
  107.          */
  108.         char           
  109.             inetCidrRouteNextHop[NETSNMP_ACCESS_ROUTE_ADDR_BUF_SIZE];
  110.         size_t          inetCidrRouteNextHop_len;
  111.     } inetCidrRouteTable_mib_index;
  112.     /*
  113.      * TODO:121:r: |   |-> Review inetCidrRouteTable max index length.
  114.      * If you KNOW that your indexes will never exceed a certain
  115.      * length, update this macro to that length.
  116.      *
  117.      * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
  118.      * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
  119.      */
  120. #define MAX_inetCidrRouteTable_IDX_LEN (((NETSNMP_ACCESS_ROUTE_ADDR_BUF_SIZE+1)*2)+ 3 + (NETSNMP_POLICY_OID_MAX_LEN + 1))
  121.     /*
  122.      *********************************************************************
  123.      * TODO:130:o: |-> Review inetCidrRouteTable Row request (rowreq) context.
  124.      * When your functions are called, you will be passed a
  125.      * inetCidrRouteTable_rowreq_ctx pointer.
  126.      */
  127.     typedef struct inetCidrRouteTable_rowreq_ctx_s {
  128.     /** this must be first for container compare to work */
  129.         netsnmp_index   oid_idx;
  130.         oid             oid_tmp[MAX_inetCidrRouteTable_IDX_LEN];
  131.         inetCidrRouteTable_mib_index tbl_idx;
  132.         inetCidrRouteTable_data *data;
  133.         inetCidrRouteTable_undo_data *undo;
  134.         unsigned int    column_set_flags;       /* flags for set columns */
  135.         /*
  136.          * flags per row. Currently, the first 8 bits are reserverd
  137.          * for the user. See mfd.h for other flags.
  138.          */
  139.         u_int           rowreq_flags;
  140.         /*
  141.          * implementor's context pointer (provided during registration)
  142.          */
  143.         inetCidrRouteTable_registration_ptr inetCidrRouteTable_reg;
  144.         /*
  145.          * TODO:131:o: |   |-> Add useful data to inetCidrRouteTable rowreq context.
  146.          */
  147.         u_char          inetCidrRouteStatus;
  148.         /*
  149.          * storage for future expansion
  150.          */
  151.         netsnmp_data_list *inetCidrRouteTable_data_list;
  152.     } inetCidrRouteTable_rowreq_ctx;
  153.     typedef struct inetCidrRouteTable_ref_rowreq_ctx_s {
  154.         inetCidrRouteTable_rowreq_ctx *rowreq_ctx;
  155.     } inetCidrRouteTable_ref_rowreq_ctx;
  156.     /*
  157.      *********************************************************************
  158.      * function prototypes
  159.      */
  160.     int
  161.         inetCidrRouteTable_pre_request(inetCidrRouteTable_registration_ptr
  162.                                        user_context);
  163.     int
  164.         inetCidrRouteTable_post_request(inetCidrRouteTable_registration_ptr
  165.                                         user_context);
  166.     inetCidrRouteTable_data *inetCidrRouteTable_allocate_data(void);
  167.     void            inetCidrRouteTable_release_data(inetCidrRouteTable_data
  168.                                                     * data);
  169.     int             inetCidrRouteTable_commit(inetCidrRouteTable_rowreq_ctx
  170.                                               * rowreq_ctx);
  171.     extern oid      inetCidrRouteTable_oid[];
  172.     extern int      inetCidrRouteTable_oid_size;
  173. #include "inetCidrRouteTable_interface.h"
  174. #include "inetCidrRouteTable_data_access.h"
  175.     /*
  176.      *********************************************************************
  177.      * GET function declarations
  178.      */
  179.     /*
  180.      *********************************************************************
  181.      * GET Table declarations
  182.      */
  183. /**********************************************************************
  184.  **********************************************************************
  185.  ***
  186.  *** Table inetCidrRouteTable
  187.  ***
  188.  **********************************************************************
  189.  **********************************************************************/
  190.     /*
  191.      * inetCidrRouteTable is subid 7 of ipForward.
  192.      * Its status is Current.
  193.      * OID: .1.3.6.1.2.1.4.24.7, length: 9
  194.      */
  195.     /*
  196.      * indexes
  197.      */
  198.     int             inetCidrRouteIfIndex_get(inetCidrRouteTable_rowreq_ctx
  199.                                              * rowreq_ctx, long
  200.                                              *inetCidrRouteIfIndex_val_ptr);
  201.     int             inetCidrRouteType_get(inetCidrRouteTable_rowreq_ctx *
  202.                                           rowreq_ctx,
  203.                                           u_long *
  204.                                           inetCidrRouteType_val_ptr);
  205.     int             inetCidrRouteProto_get(inetCidrRouteTable_rowreq_ctx *
  206.                                            rowreq_ctx,
  207.                                            u_long *
  208.                                            inetCidrRouteProto_val_ptr);
  209.     int             inetCidrRouteAge_get(inetCidrRouteTable_rowreq_ctx *
  210.                                          rowreq_ctx,
  211.                                          u_long *
  212.                                          inetCidrRouteAge_val_ptr);
  213.     int
  214.         inetCidrRouteNextHopAS_get(inetCidrRouteTable_rowreq_ctx *
  215.                                    rowreq_ctx,
  216.                                    u_long *
  217.                                    inetCidrRouteNextHopAS_val_ptr);
  218.     int             inetCidrRouteMetric1_get(inetCidrRouteTable_rowreq_ctx
  219.                                              * rowreq_ctx, long
  220.                                              *inetCidrRouteMetric1_val_ptr);
  221.     int             inetCidrRouteMetric2_get(inetCidrRouteTable_rowreq_ctx
  222.                                              * rowreq_ctx, long
  223.                                              *inetCidrRouteMetric2_val_ptr);
  224.     int             inetCidrRouteMetric3_get(inetCidrRouteTable_rowreq_ctx
  225.                                              * rowreq_ctx, long
  226.                                              *inetCidrRouteMetric3_val_ptr);
  227.     int             inetCidrRouteMetric4_get(inetCidrRouteTable_rowreq_ctx
  228.                                              * rowreq_ctx, long
  229.                                              *inetCidrRouteMetric4_val_ptr);
  230.     int             inetCidrRouteMetric5_get(inetCidrRouteTable_rowreq_ctx
  231.                                              * rowreq_ctx, long
  232.                                              *inetCidrRouteMetric5_val_ptr);
  233.     int             inetCidrRouteStatus_get(inetCidrRouteTable_rowreq_ctx *
  234.                                             rowreq_ctx,
  235.                                             u_long *
  236.                                             inetCidrRouteStatus_val_ptr);
  237.     int
  238.         inetCidrRouteTable_indexes_set_tbl_idx(inetCidrRouteTable_mib_index
  239.                                                * tbl_idx,
  240.                                                u_long
  241.                                                inetCidrRouteDestType_val,
  242.                                                char
  243.                                                *inetCidrRouteDest_val_ptr, size_t
  244.                                                inetCidrRouteDest_val_ptr_len,
  245.                                                u_long
  246.                                                inetCidrRoutePfxLen_val,
  247.                                                oid *
  248.                                                inetCidrRoutePolicy_val_ptr,
  249.                                                size_t
  250.                                                inetCidrRoutePolicy_val_ptr_len,
  251.                                                u_long
  252.                                                inetCidrRouteNextHopType_val,
  253.                                                char
  254.                                                *inetCidrRouteNextHop_val_ptr, size_t
  255.                                                inetCidrRouteNextHop_val_ptr_len);
  256.     int
  257.         inetCidrRouteTable_indexes_set(inetCidrRouteTable_rowreq_ctx *
  258.                                        rowreq_ctx,
  259.                                        u_long inetCidrRouteDestType_val,
  260.                                        char *inetCidrRouteDest_val_ptr,
  261.                                        size_t
  262.                                        inetCidrRouteDest_val_ptr_len,
  263.                                        u_long inetCidrRoutePfxLen_val,
  264.                                        oid * inetCidrRoutePolicy_val_ptr,
  265.                                        size_t
  266.                                        inetCidrRoutePolicy_val_ptr_len,
  267.                                        u_long inetCidrRouteNextHopType_val,
  268.                                        char *inetCidrRouteNextHop_val_ptr,
  269.                                        size_t
  270.                                        inetCidrRouteNextHop_val_ptr_len);
  271.     /*
  272.      *********************************************************************
  273.      * SET function declarations
  274.      */
  275.     /*
  276.      *********************************************************************
  277.      * SET Table declarations
  278.      */
  279. /**********************************************************************
  280.  **********************************************************************
  281.  ***
  282.  *** Table inetCidrRouteTable
  283.  ***
  284.  **********************************************************************
  285.  **********************************************************************/
  286.     /*
  287.      * inetCidrRouteTable is subid 7 of ipForward.
  288.      * Its status is Current.
  289.      * OID: .1.3.6.1.2.1.4.24.7, length: 9
  290.      */
  291.     int             inetCidrRouteDestType_check_index(inetCidrRouteTable_rowreq_ctx * rowreq_ctx);      /* internal */
  292.     int             inetCidrRouteDest_check_index(inetCidrRouteTable_rowreq_ctx * rowreq_ctx);  /* internal */
  293.     int             inetCidrRoutePfxLen_check_index(inetCidrRouteTable_rowreq_ctx * rowreq_ctx);        /* internal */
  294.     int             inetCidrRoutePolicy_check_index(inetCidrRouteTable_rowreq_ctx * rowreq_ctx);        /* internal */
  295.     int             inetCidrRouteNextHopType_check_index(inetCidrRouteTable_rowreq_ctx * rowreq_ctx);   /* internal */
  296.     int             inetCidrRouteNextHop_check_index(inetCidrRouteTable_rowreq_ctx * rowreq_ctx);       /* internal */
  297.     int
  298.         inetCidrRouteTable_validate_index
  299.         (inetCidrRouteTable_registration_ptr inetCidrRouteTable_reg,
  300.          inetCidrRouteTable_rowreq_ctx * rowreq_ctx);
  301.     int
  302.         inetCidrRouteTable_undo_setup(inetCidrRouteTable_rowreq_ctx *
  303.                                       rowreq_ctx);
  304.     int
  305.         inetCidrRouteTable_undo_cleanup(inetCidrRouteTable_rowreq_ctx *
  306.                                         rowreq_ctx);
  307.     int             inetCidrRouteTable_commit(inetCidrRouteTable_rowreq_ctx
  308.                                               * rowreq_ctx);
  309.     int
  310.         inetCidrRouteTable_undo_commit(inetCidrRouteTable_rowreq_ctx *
  311.                                        rowreq_ctx);
  312.     int
  313.         inetCidrRouteIfIndex_check_value(inetCidrRouteTable_rowreq_ctx *
  314.                                          rowreq_ctx,
  315.                                          long inetCidrRouteIfIndex_val);
  316.     int
  317.         inetCidrRouteIfIndex_undo_setup(inetCidrRouteTable_rowreq_ctx *
  318.                                         rowreq_ctx);
  319.     int             inetCidrRouteIfIndex_set(inetCidrRouteTable_rowreq_ctx
  320.                                              * rowreq_ctx, long
  321.                                              inetCidrRouteIfIndex_val);
  322.     int             inetCidrRouteIfIndex_undo(inetCidrRouteTable_rowreq_ctx
  323.                                               * rowreq_ctx);
  324.     int
  325.         inetCidrRouteType_check_value(inetCidrRouteTable_rowreq_ctx *
  326.                                       rowreq_ctx,
  327.                                       u_long inetCidrRouteType_val);
  328.     int
  329.         inetCidrRouteType_undo_setup(inetCidrRouteTable_rowreq_ctx *
  330.                                      rowreq_ctx);
  331.     int             inetCidrRouteType_set(inetCidrRouteTable_rowreq_ctx *
  332.                                           rowreq_ctx,
  333.                                           u_long inetCidrRouteType_val);
  334.     int             inetCidrRouteType_undo(inetCidrRouteTable_rowreq_ctx *
  335.                                            rowreq_ctx);
  336.     int
  337.         inetCidrRouteProto_check_value(inetCidrRouteTable_rowreq_ctx *
  338.                                        rowreq_ctx,
  339.                                        u_long inetCidrRouteProto_val);
  340.     int
  341.         inetCidrRouteProto_undo_setup(inetCidrRouteTable_rowreq_ctx *
  342.                                       rowreq_ctx);
  343.     int             inetCidrRouteProto_set(inetCidrRouteTable_rowreq_ctx *
  344.                                            rowreq_ctx,
  345.                                            u_long inetCidrRouteProto_val);
  346.     int             inetCidrRouteProto_undo(inetCidrRouteTable_rowreq_ctx *
  347.                                             rowreq_ctx);
  348.     int
  349.         inetCidrRouteAge_check_value(inetCidrRouteTable_rowreq_ctx *
  350.                                      rowreq_ctx,
  351.                                      u_long inetCidrRouteAge_val);
  352.     int
  353.         inetCidrRouteAge_undo_setup(inetCidrRouteTable_rowreq_ctx *
  354.                                     rowreq_ctx);
  355.     int             inetCidrRouteAge_set(inetCidrRouteTable_rowreq_ctx *
  356.                                          rowreq_ctx,
  357.                                          u_long inetCidrRouteAge_val);
  358.     int             inetCidrRouteAge_undo(inetCidrRouteTable_rowreq_ctx *
  359.                                           rowreq_ctx);
  360.     int
  361.         inetCidrRouteNextHopAS_check_value(inetCidrRouteTable_rowreq_ctx *
  362.                                            rowreq_ctx,
  363.                                            u_long
  364.                                            inetCidrRouteNextHopAS_val);
  365.     int
  366.         inetCidrRouteNextHopAS_undo_setup(inetCidrRouteTable_rowreq_ctx *
  367.                                           rowreq_ctx);
  368.     int
  369.         inetCidrRouteNextHopAS_set(inetCidrRouteTable_rowreq_ctx *
  370.                                    rowreq_ctx,
  371.                                    u_long inetCidrRouteNextHopAS_val);
  372.     int
  373.         inetCidrRouteNextHopAS_undo(inetCidrRouteTable_rowreq_ctx *
  374.                                     rowreq_ctx);
  375.     int
  376.         inetCidrRouteMetric1_check_value(inetCidrRouteTable_rowreq_ctx *
  377.                                          rowreq_ctx,
  378.                                          long inetCidrRouteMetric1_val);
  379.     int
  380.         inetCidrRouteMetric1_undo_setup(inetCidrRouteTable_rowreq_ctx *
  381.                                         rowreq_ctx);
  382.     int             inetCidrRouteMetric1_set(inetCidrRouteTable_rowreq_ctx
  383.                                              * rowreq_ctx, long
  384.                                              inetCidrRouteMetric1_val);
  385.     int             inetCidrRouteMetric1_undo(inetCidrRouteTable_rowreq_ctx
  386.                                               * rowreq_ctx);
  387.     int
  388.         inetCidrRouteMetric2_check_value(inetCidrRouteTable_rowreq_ctx *
  389.                                          rowreq_ctx,
  390.                                          long inetCidrRouteMetric2_val);
  391.     int
  392.         inetCidrRouteMetric2_undo_setup(inetCidrRouteTable_rowreq_ctx *
  393.                                         rowreq_ctx);
  394.     int             inetCidrRouteMetric2_set(inetCidrRouteTable_rowreq_ctx
  395.                                              * rowreq_ctx, long
  396.                                              inetCidrRouteMetric2_val);
  397.     int             inetCidrRouteMetric2_undo(inetCidrRouteTable_rowreq_ctx
  398.                                               * rowreq_ctx);
  399.     int
  400.         inetCidrRouteMetric3_check_value(inetCidrRouteTable_rowreq_ctx *
  401.                                          rowreq_ctx,
  402.                                          long inetCidrRouteMetric3_val);
  403.     int
  404.         inetCidrRouteMetric3_undo_setup(inetCidrRouteTable_rowreq_ctx *
  405.                                         rowreq_ctx);
  406.     int             inetCidrRouteMetric3_set(inetCidrRouteTable_rowreq_ctx
  407.                                              * rowreq_ctx, long
  408.                                              inetCidrRouteMetric3_val);
  409.     int             inetCidrRouteMetric3_undo(inetCidrRouteTable_rowreq_ctx
  410.                                               * rowreq_ctx);
  411.     int
  412.         inetCidrRouteMetric4_check_value(inetCidrRouteTable_rowreq_ctx *
  413.                                          rowreq_ctx,
  414.                                          long inetCidrRouteMetric4_val);
  415.     int
  416.         inetCidrRouteMetric4_undo_setup(inetCidrRouteTable_rowreq_ctx *
  417.                                         rowreq_ctx);
  418.     int             inetCidrRouteMetric4_set(inetCidrRouteTable_rowreq_ctx
  419.                                              * rowreq_ctx, long
  420.                                              inetCidrRouteMetric4_val);
  421.     int             inetCidrRouteMetric4_undo(inetCidrRouteTable_rowreq_ctx
  422.                                               * rowreq_ctx);
  423.     int
  424.         inetCidrRouteMetric5_check_value(inetCidrRouteTable_rowreq_ctx *
  425.                                          rowreq_ctx,
  426.                                          long inetCidrRouteMetric5_val);
  427.     int
  428.         inetCidrRouteMetric5_undo_setup(inetCidrRouteTable_rowreq_ctx *
  429.                                         rowreq_ctx);
  430.     int             inetCidrRouteMetric5_set(inetCidrRouteTable_rowreq_ctx
  431.                                              * rowreq_ctx, long
  432.                                              inetCidrRouteMetric5_val);
  433.     int             inetCidrRouteMetric5_undo(inetCidrRouteTable_rowreq_ctx
  434.                                               * rowreq_ctx);
  435.     int
  436.         inetCidrRouteStatus_check_value(inetCidrRouteTable_rowreq_ctx *
  437.                                         rowreq_ctx,
  438.                                         u_long inetCidrRouteStatus_val);
  439.     int
  440.         inetCidrRouteStatus_undo_setup(inetCidrRouteTable_rowreq_ctx *
  441.                                        rowreq_ctx);
  442.     int             inetCidrRouteStatus_set(inetCidrRouteTable_rowreq_ctx *
  443.                                             rowreq_ctx,
  444.                                             u_long
  445.                                             inetCidrRouteStatus_val);
  446.     int             inetCidrRouteStatus_undo(inetCidrRouteTable_rowreq_ctx
  447.                                              * rowreq_ctx);
  448.     int
  449.         inetCidrRouteTable_check_dependencies(inetCidrRouteTable_rowreq_ctx
  450.                                               * ctx);
  451.     /*
  452.      * DUMMY markers, ignore
  453.      *
  454.      * TODO:099:x: *************************************************************
  455.      * TODO:199:x: *************************************************************
  456.      * TODO:299:x: *************************************************************
  457.      * TODO:399:x: *************************************************************
  458.      * TODO:499:x: *************************************************************
  459.      */
  460. #ifdef __cplusplus
  461. }
  462. #endif
  463. #endif                          /* INETCIDRROUTETABLE_H */