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

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: inetNetToMediaTable.h,v 1.6 2004/10/16 00:21:20 rstory Exp $
  6.  */
  7. #ifndef INETNETTOMEDIATABLE_H
  8. #define INETNETTOMEDIATABLE_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/arp.h>
  18.     /*
  19.      * OID, column number and enum definions for  
  20.      */
  21. #include "inetNetToMediaTable_constants.h"
  22.     /*
  23.      *********************************************************************
  24.      * function declarations
  25.      */
  26.     void            init_inetNetToMediaTable(void);
  27.     /*
  28.      *********************************************************************
  29.      * Table declarations
  30.      */
  31. /**********************************************************************
  32.  **********************************************************************
  33.  ***
  34.  *** Table inetNetToMediaTable
  35.  ***
  36.  **********************************************************************
  37.  **********************************************************************/
  38.     /*
  39.      * inetNetToMediaTable is subid 35 of ip.
  40.      * Its status is Current.
  41.      * OID: .1.3.6.1.2.1.4.35, 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 inetNetToMediaTable registration context.
  53.      */
  54.     typedef netsnmp_data_list *inetNetToMediaTable_registration_ptr;
  55. /**********************************************************************/
  56.     /*
  57.      * TODO:110:r: |-> Review inetNetToMediaTable data context structure.
  58.      * This structure is used to represent the data for inetNetToMediaTable.
  59.      */
  60.     typedef netsnmp_arp_entry inetNetToMediaTable_data;
  61.     /*
  62.      *********************************************************************
  63.      * TODO:115:o: |-> Review inetNetToMediaTable 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 inetNetToMediaTable_data inetNetToMediaTable_undo_data;
  69.     /*
  70.      * TODO:120:r: |-> Review inetNetToMediaTable mib index.
  71.      * This structure is used to represent the index for inetNetToMediaTable.
  72.      */
  73.     typedef struct inetNetToMediaTable_mib_index_s {
  74.         /*
  75.          * inetNetToMediaIfIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H
  76.          */
  77.         long            inetNetToMediaIfIndex;
  78.         /*
  79.          * inetNetToMediaNetAddressType(2)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
  80.          */
  81.         u_long          inetNetToMediaNetAddressType;
  82.         /*
  83.          * inetNetToMediaNetAddress(3)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h
  84.          */
  85.         /** 128 - 2(other indexes) - oid length(10) = 115 */
  86.         char            inetNetToMediaNetAddress[115];
  87.         size_t          inetNetToMediaNetAddress_len;
  88.     } inetNetToMediaTable_mib_index;
  89.     /*
  90.      * TODO:121:r: |   |-> Review inetNetToMediaTable max index length.
  91.      * If you KNOW that your indexes will never exceed a certain
  92.      * length, update this macro to that length.
  93.      *
  94.      * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
  95.      * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
  96.      * Guessing 128 - col/entry(2)  - oid len(8)
  97.      */
  98. #define MAX_inetNetToMediaTable_IDX_LEN     118
  99.     /*
  100.      *********************************************************************
  101.      * TODO:130:o: |-> Review inetNetToMediaTable Row request (rowreq) context.
  102.      * When your functions are called, you will be passed a
  103.      * inetNetToMediaTable_rowreq_ctx pointer.
  104.      */
  105.     typedef struct inetNetToMediaTable_rowreq_ctx_s {
  106.     /** this must be first for container compare to work */
  107.         netsnmp_index   oid_idx;
  108.         oid             oid_tmp[MAX_inetNetToMediaTable_IDX_LEN];
  109.         inetNetToMediaTable_mib_index tbl_idx;
  110.         inetNetToMediaTable_data *data;
  111.         inetNetToMediaTable_undo_data *undo;
  112.         unsigned int    column_set_flags;       /* flags for set columns */
  113.         /*
  114.          * flags per row. Currently, the first 8 bits are reserverd
  115.          * for the user. See mfd.h for other flags.
  116.          */
  117.         u_int           rowreq_flags;
  118.         /*
  119.          * implementor's context pointer (provided during registration)
  120.          */
  121.         inetNetToMediaTable_registration_ptr inetNetToMediaTable_reg;
  122.         /*
  123.          * TODO:131:o: |   |-> Add useful data to inetNetToMediaTable rowreq context.
  124.          */
  125.         int             inetNetToMediaRowStatus,
  126.             inetNetToMediaRowStatus_undo;
  127.         /*
  128.          * storage for future expansion
  129.          */
  130.         netsnmp_data_list *inetNetToMediaTable_data_list;
  131.     } inetNetToMediaTable_rowreq_ctx;
  132.     typedef struct inetNetToMediaTable_ref_rowreq_ctx_s {
  133.         inetNetToMediaTable_rowreq_ctx *rowreq_ctx;
  134.     } inetNetToMediaTable_ref_rowreq_ctx;
  135.     /*
  136.      *********************************************************************
  137.      * function prototypes
  138.      */
  139.     int
  140.         inetNetToMediaTable_pre_request
  141.         (inetNetToMediaTable_registration_ptr user_context);
  142.     int
  143.         inetNetToMediaTable_post_request
  144.         (inetNetToMediaTable_registration_ptr user_context);
  145.     inetNetToMediaTable_data *inetNetToMediaTable_allocate_data(void);
  146.     void
  147.          inetNetToMediaTable_release_data(inetNetToMediaTable_data * data);
  148.     int
  149.         inetNetToMediaTable_check_dependencies
  150.         (inetNetToMediaTable_rowreq_ctx * rowreq_ctx);
  151.     int
  152.         inetNetToMediaTable_commit(inetNetToMediaTable_rowreq_ctx *
  153.                                    rowreq_ctx);
  154.     extern oid      inetNetToMediaTable_oid[];
  155.     extern int      inetNetToMediaTable_oid_size;
  156. #include "inetNetToMediaTable_interface.h"
  157. #include "inetNetToMediaTable_data_access.h"
  158.     /*
  159.      *********************************************************************
  160.      * GET function declarations
  161.      */
  162.     /*
  163.      *********************************************************************
  164.      * GET Table declarations
  165.      */
  166. /**********************************************************************
  167.  **********************************************************************
  168.  ***
  169.  *** Table inetNetToMediaTable
  170.  ***
  171.  **********************************************************************
  172.  **********************************************************************/
  173.     /*
  174.      * inetNetToMediaTable is subid 35 of ip.
  175.      * Its status is Current.
  176.      * OID: .1.3.6.1.2.1.4.35, length: 8
  177.      */
  178.     /*
  179.      * indexes
  180.      */
  181.     int
  182.         inetNetToMediaPhysAddress_get(inetNetToMediaTable_rowreq_ctx *
  183.                                       rowreq_ctx, char
  184.                                       **inetNetToMediaPhysAddress_val_ptr_ptr, size_t
  185.                                       *inetNetToMediaPhysAddress_val_ptr_len_ptr);
  186.     int
  187.         inetNetToMediaLastUpdated_get(inetNetToMediaTable_rowreq_ctx *
  188.                                       rowreq_ctx,
  189.                                       u_long *
  190.                                       inetNetToMediaLastUpdated_val_ptr);
  191.     int             inetNetToMediaType_get(inetNetToMediaTable_rowreq_ctx *
  192.                                            rowreq_ctx,
  193.                                            u_long *
  194.                                            inetNetToMediaType_val_ptr);
  195.     int             inetNetToMediaState_get(inetNetToMediaTable_rowreq_ctx
  196.                                             * rowreq_ctx,
  197.                                             u_long *
  198.                                             inetNetToMediaState_val_ptr);
  199.     int
  200.         inetNetToMediaRowStatus_get(inetNetToMediaTable_rowreq_ctx *
  201.                                     rowreq_ctx,
  202.                                     u_long *
  203.                                     inetNetToMediaRowStatus_val_ptr);
  204.     int
  205.         inetNetToMediaTable_indexes_set_tbl_idx
  206.         (inetNetToMediaTable_mib_index * tbl_idx,
  207.          long inetNetToMediaIfIndex_val,
  208.          u_long inetNetToMediaNetAddressType_val,
  209.          char *inetNetToMediaNetAddress_val_ptr,
  210.          size_t inetNetToMediaNetAddress_val_ptr_len);
  211.     int
  212.         inetNetToMediaTable_indexes_set(inetNetToMediaTable_rowreq_ctx *
  213.                                         rowreq_ctx,
  214.                                         long inetNetToMediaIfIndex_val,
  215.                                         u_long
  216.                                         inetNetToMediaNetAddressType_val,
  217.                                         char
  218.                                         *inetNetToMediaNetAddress_val_ptr, size_t
  219.                                         inetNetToMediaNetAddress_val_ptr_len);
  220.     /*
  221.      *********************************************************************
  222.      * SET function declarations
  223.      */
  224.     /*
  225.      *********************************************************************
  226.      * SET Table declarations
  227.      */
  228. /**********************************************************************
  229.  **********************************************************************
  230.  ***
  231.  *** Table inetNetToMediaTable
  232.  ***
  233.  **********************************************************************
  234.  **********************************************************************/
  235.     /*
  236.      * inetNetToMediaTable is subid 35 of ip.
  237.      * Its status is Current.
  238.      * OID: .1.3.6.1.2.1.4.35, length: 8
  239.      */
  240.     int             inetNetToMediaIfIndex_check_index(inetNetToMediaTable_rowreq_ctx * rowreq_ctx);     /* internal */
  241.     int             inetNetToMediaNetAddressType_check_index(inetNetToMediaTable_rowreq_ctx * rowreq_ctx);      /* internal */
  242.     int             inetNetToMediaNetAddress_check_index(inetNetToMediaTable_rowreq_ctx * rowreq_ctx);  /* internal */
  243.     int
  244.         inetNetToMediaTable_validate_index
  245.         (inetNetToMediaTable_registration_ptr inetNetToMediaTable_reg,
  246.          inetNetToMediaTable_rowreq_ctx * rowreq_ctx);
  247.     int
  248.         inetNetToMediaTable_undo_setup(inetNetToMediaTable_rowreq_ctx *
  249.                                        rowreq_ctx);
  250.     int
  251.         inetNetToMediaTable_undo_cleanup(inetNetToMediaTable_rowreq_ctx *
  252.                                          rowreq_ctx);
  253.     int
  254.         inetNetToMediaTable_commit(inetNetToMediaTable_rowreq_ctx *
  255.                                    rowreq_ctx);
  256.     int
  257.         inetNetToMediaTable_undo_commit(inetNetToMediaTable_rowreq_ctx *
  258.                                         rowreq_ctx);
  259.     int
  260.         inetNetToMediaPhysAddress_check_value
  261.         (inetNetToMediaTable_rowreq_ctx * rowreq_ctx,
  262.          char *inetNetToMediaPhysAddress_val_ptr,
  263.          size_t inetNetToMediaPhysAddress_val_ptr_len);
  264.     int
  265.         inetNetToMediaPhysAddress_undo_setup(inetNetToMediaTable_rowreq_ctx
  266.                                              * rowreq_ctx);
  267.     int
  268.         inetNetToMediaPhysAddress_set(inetNetToMediaTable_rowreq_ctx *
  269.                                       rowreq_ctx, char
  270.                                       *inetNetToMediaPhysAddress_val_ptr, size_t
  271.                                       inetNetToMediaPhysAddress_val_ptr_len);
  272.     int
  273.         inetNetToMediaPhysAddress_undo(inetNetToMediaTable_rowreq_ctx *
  274.                                        rowreq_ctx);
  275.     int
  276.         inetNetToMediaLastUpdated_check_value
  277.         (inetNetToMediaTable_rowreq_ctx * rowreq_ctx,
  278.          u_long inetNetToMediaLastUpdated_val);
  279.     int
  280.         inetNetToMediaLastUpdated_undo_setup(inetNetToMediaTable_rowreq_ctx
  281.                                              * rowreq_ctx);
  282.     int
  283.         inetNetToMediaLastUpdated_set(inetNetToMediaTable_rowreq_ctx *
  284.                                       rowreq_ctx,
  285.                                       u_long
  286.                                       inetNetToMediaLastUpdated_val);
  287.     int
  288.         inetNetToMediaLastUpdated_undo(inetNetToMediaTable_rowreq_ctx *
  289.                                        rowreq_ctx);
  290.     int
  291.         inetNetToMediaType_check_value(inetNetToMediaTable_rowreq_ctx *
  292.                                        rowreq_ctx,
  293.                                        u_long inetNetToMediaType_val);
  294.     int
  295.         inetNetToMediaType_undo_setup(inetNetToMediaTable_rowreq_ctx *
  296.                                       rowreq_ctx);
  297.     int             inetNetToMediaType_set(inetNetToMediaTable_rowreq_ctx *
  298.                                            rowreq_ctx,
  299.                                            u_long inetNetToMediaType_val);
  300.     int             inetNetToMediaType_undo(inetNetToMediaTable_rowreq_ctx
  301.                                             * rowreq_ctx);
  302.     int
  303.         inetNetToMediaState_check_value(inetNetToMediaTable_rowreq_ctx *
  304.                                         rowreq_ctx,
  305.                                         u_long inetNetToMediaState_val);
  306.     int
  307.         inetNetToMediaState_undo_setup(inetNetToMediaTable_rowreq_ctx *
  308.                                        rowreq_ctx);
  309.     int             inetNetToMediaState_set(inetNetToMediaTable_rowreq_ctx
  310.                                             * rowreq_ctx,
  311.                                             u_long
  312.                                             inetNetToMediaState_val);
  313.     int             inetNetToMediaState_undo(inetNetToMediaTable_rowreq_ctx
  314.                                              * rowreq_ctx);
  315.     int
  316.         inetNetToMediaRowStatus_check_value(inetNetToMediaTable_rowreq_ctx
  317.                                             * rowreq_ctx,
  318.                                             u_long
  319.                                             inetNetToMediaRowStatus_val);
  320.     int
  321.         inetNetToMediaRowStatus_undo_setup(inetNetToMediaTable_rowreq_ctx *
  322.                                            rowreq_ctx);
  323.     int
  324.         inetNetToMediaRowStatus_set(inetNetToMediaTable_rowreq_ctx *
  325.                                     rowreq_ctx,
  326.                                     u_long inetNetToMediaRowStatus_val);
  327.     int
  328.         inetNetToMediaRowStatus_undo(inetNetToMediaTable_rowreq_ctx *
  329.                                      rowreq_ctx);
  330.     int
  331.         inetNetToMediaTable_check_dependencies
  332.         (inetNetToMediaTable_rowreq_ctx * ctx);
  333.     /*
  334.      * DUMMY markers, ignore
  335.      *
  336.      * TODO:099:x: *************************************************************
  337.      * TODO:199:x: *************************************************************
  338.      * TODO:299:x: *************************************************************
  339.      * TODO:399:x: *************************************************************
  340.      * TODO:499:x: *************************************************************
  341.      */
  342. #ifdef __cplusplus
  343. }
  344. #endif
  345. #endif                          /* INETNETTOMEDIATABLE_H */