net-snmp 5.7
mib_api.h
00001 #ifndef NET_SNMP_MIB_API_H
00002 #define NET_SNMP_MIB_API_H
00003 
00008 #include <net-snmp/types.h>
00009 
00010 #ifdef __cplusplus
00011 extern          "C" {
00012 #endif
00013 
00014     /* Initialisation and Shutdown */
00015     NETSNMP_IMPORT
00016     int             add_mibdir(const char *);
00017 
00018     NETSNMP_IMPORT
00019     void            netsnmp_init_mib(void);
00020 #ifndef NETSNMP_NO_LEGACY_DEFINITIONS
00021     NETSNMP_IMPORT
00022     void            init_mib(void);
00023     NETSNMP_IMPORT
00024     void            init_mib_internals(void);
00025 #endif
00026     NETSNMP_IMPORT
00027     void            shutdown_mib(void);
00028 
00029      /* Reading and Parsing MIBs */
00030     NETSNMP_IMPORT
00031     struct tree    *netsnmp_read_module(const char *);
00032 #ifndef NETSNMP_NO_LEGACY_DEFINITIONS
00033     NETSNMP_IMPORT
00034     struct tree    *read_module(const char *);
00035 #endif
00036 
00037     NETSNMP_IMPORT
00038     struct tree    *read_mib(const char *);
00039     NETSNMP_IMPORT
00040     struct tree    *read_all_mibs(void);
00041 
00042     NETSNMP_IMPORT
00043     void            add_module_replacement(const char *, const char *,
00044                                            const char *, int);
00045 
00046          /* from ucd-compat.h */
00047     NETSNMP_IMPORT
00048     void            snmp_set_mib_warnings(int);
00049     NETSNMP_IMPORT
00050     void            snmp_set_mib_errors(int);
00051     NETSNMP_IMPORT
00052     void            snmp_set_save_descriptions(int);
00053 
00054 
00055      /* Searching the MIB Tree */
00056     NETSNMP_IMPORT
00057     int             read_objid(const char *, oid *, size_t *);
00058     NETSNMP_IMPORT
00059     oid            *snmp_parse_oid(const char *, oid *, size_t *);
00060     NETSNMP_IMPORT
00061     int             get_module_node(const char *, const char *, oid *, size_t *);
00062 
00063      /* Output */
00064     NETSNMP_IMPORT
00065     void            print_mib(FILE * fp);
00066 
00067     NETSNMP_IMPORT
00068     void            print_objid(const oid * objid, size_t objidlen);
00069     NETSNMP_IMPORT
00070     void           fprint_objid(FILE * fp,
00071                                 const oid * objid, size_t objidlen);
00072     NETSNMP_IMPORT
00073     int           snprint_objid(char *buf, size_t buf_len,
00074                                 const oid * objid, size_t objidlen);
00075 
00076     NETSNMP_IMPORT
00077     void            print_description(oid * objid, size_t objidlen, int width);
00078     NETSNMP_IMPORT
00079     void           fprint_description(FILE * fp,
00080                                 oid * objid, size_t objidlen, int width);
00081     NETSNMP_IMPORT
00082     int           snprint_description(char *buf, size_t buf_len,
00083                                 oid * objid, size_t objidlen, int width);
00084 
00085 #ifdef __cplusplus
00086 }
00087 #endif
00088 
00089     /*
00090      *    Having extracted the main ("public API") calls relevant
00091      *  to this area of the Net-SNMP project, the next step is to
00092      *  identify the related "public internal API" routines.
00093      *
00094      *    In due course, these should probably be gathered
00095      *  together into a companion 'library/mib_api.h' header file.
00096      *  [Or some suitable name]
00097      *
00098      *    But for the time being, the expectation is that the
00099      *  traditional headers that provided the above definitions
00100      *  will probably also cover the relevant internal API calls.
00101      *  Hence they are listed here:
00102      */
00103 
00104 #include <net-snmp/library/snmp_api.h>
00105 #include <net-snmp/library/mib.h>
00106 #ifndef NETSNMP_DISABLE_MIB_LOADING
00107 #include <net-snmp/library/parse.h>
00108 #endif
00109 #include <net-snmp/library/callback.h>
00110 #include <net-snmp/library/oid_stash.h>
00111 #include <net-snmp/library/ucd_compat.h>
00112 
00113 #endif                          /* NET_SNMP_MIB_API_H */