1 #ifndef NET_SNMP_MIB_API_H 2 #define NET_SNMP_MIB_API_H 3 4 /** 5 * Library API routines concerned with MIB files and objects, and OIDs 6 */ 7 8 #include <net-snmp/types.h> 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 /* Initialisation and Shutdown */ 15 NETSNMP_IMPORT 16 int add_mibdir(const char *); 17 18 NETSNMP_IMPORT 19 void netsnmp_init_mib(void); 20 #ifndef NETSNMP_NO_LEGACY_DEFINITIONS 21 NETSNMP_IMPORT 22 void init_mib(void); 23 NETSNMP_IMPORT 24 void init_mib_internals(void); 25 #endif 26 NETSNMP_IMPORT 27 void shutdown_mib(void); 28 29 /* Reading and Parsing MIBs */ 30 NETSNMP_IMPORT 31 struct tree *netsnmp_read_module(const char *); 32 #ifndef NETSNMP_NO_LEGACY_DEFINITIONS 33 NETSNMP_IMPORT 34 struct tree *read_module(const char *); 35 #endif 36 37 NETSNMP_IMPORT 38 struct tree *read_mib(const char *); 39 NETSNMP_IMPORT 40 struct tree *read_all_mibs(void); 41 42 NETSNMP_IMPORT 43 void add_module_replacement(const char *, const char *, 44 const char *, int); 45 46 /* from ucd-compat.h */ 47 NETSNMP_IMPORT 48 void snmp_set_mib_warnings(int); 49 NETSNMP_IMPORT 50 void snmp_set_mib_errors(int); 51 NETSNMP_IMPORT 52 void snmp_set_save_descriptions(int); 53 54 55 /* Searching the MIB Tree */ 56 NETSNMP_IMPORT 57 int read_objid(const char *, oid *, size_t *); 58 NETSNMP_IMPORT 59 oid *snmp_parse_oid(const char *, oid *, size_t *); 60 NETSNMP_IMPORT 61 int get_module_node(const char *, const char *, oid *, size_t *); 62 63 /* Output */ 64 NETSNMP_IMPORT 65 void print_mib(FILE * fp); 66 67 NETSNMP_IMPORT 68 void print_objid(const oid * objid, size_t objidlen); 69 NETSNMP_IMPORT 70 void fprint_objid(FILE * fp, 71 const oid * objid, size_t objidlen); 72 NETSNMP_IMPORT 73 int snprint_objid(char *buf, size_t buf_len, 74 const oid * objid, size_t objidlen); 75 76 NETSNMP_IMPORT 77 void print_description(oid * objid, size_t objidlen, int width); 78 NETSNMP_IMPORT 79 void fprint_description(FILE * fp, 80 oid * objid, size_t objidlen, int width); 81 NETSNMP_IMPORT 82 int snprint_description(char *buf, size_t buf_len, 83 oid * objid, size_t objidlen, int width); 84 85 #ifdef __cplusplus 86 } 87 #endif 88 89 /* 90 * Having extracted the main ("public API") calls relevant 91 * to this area of the Net-SNMP project, the next step is to 92 * identify the related "public internal API" routines. 93 * 94 * In due course, these should probably be gathered 95 * together into a companion 'library/mib_api.h' header file. 96 * [Or some suitable name] 97 * 98 * But for the time being, the expectation is that the 99 * traditional headers that provided the above definitions 100 * will probably also cover the relevant internal API calls. 101 * Hence they are listed here: 102 */ 103 104 #include <net-snmp/library/snmp_api.h> 105 #include <net-snmp/library/mib.h> 106 #ifndef NETSNMP_DISABLE_MIB_LOADING 107 #include <net-snmp/library/parse.h> 108 #endif 109 #include <net-snmp/library/callback.h> 110 #include <net-snmp/library/oid_stash.h> 111 #include <net-snmp/library/ucd_compat.h> 112 113 #endif /* NET_SNMP_MIB_API_H */ 114