net-snmp 5.7
|
00001 #ifndef NET_SNMP_CONFIG_API_H 00002 #define NET_SNMP_CONFIG_API_H 00003 00009 #include <net-snmp/types.h> 00010 00011 #ifdef __cplusplus 00012 extern "C" { 00013 #endif 00014 00015 /* Config Handlers */ 00016 NETSNMP_IMPORT 00017 struct config_line *register_config_handler(const char *filePrefix, 00018 const char *token, 00019 void (*parser) (const char *, char *), 00020 void (*releaser) (void), 00021 const char *usageLine); 00022 NETSNMP_IMPORT 00023 struct config_line *register_const_config_handler(const char *filePrefix, 00024 const char *token, 00025 void (*parser) (const char *, const char *), 00026 void (*releaser) (void), 00027 const char *usageLine); 00028 NETSNMP_IMPORT 00029 struct config_line *register_prenetsnmp_mib_handler(const char *filePrefix, 00030 const char *token, 00031 void (*parser) (const char *, char *), 00032 void (*releaser) (void), 00033 const char *usageLine); 00034 NETSNMP_IMPORT 00035 void unregister_config_handler(const char *filePrefix, const char *token); 00036 00037 /* Defined in mib.c, rather than read_config.c */ 00038 void register_mib_handlers(void); 00039 void unregister_all_config_handlers(void); 00040 00041 /* Application Handlers */ 00042 NETSNMP_IMPORT 00043 struct config_line *register_app_config_handler( 00044 const char *token, 00045 void (*parser) (const char *, char *), 00046 void (*releaser) (void), 00047 const char *usageLine); 00048 00049 NETSNMP_IMPORT 00050 struct config_line *register_app_prenetsnmp_mib_handler( 00051 const char *token, 00052 void (*parser) (const char *, char *), 00053 void (*releaser) (void), 00054 const char *usageLine); 00055 NETSNMP_IMPORT 00056 void unregister_app_config_handler( const char *token); 00057 00058 /* Reading Config Files */ 00059 NETSNMP_IMPORT 00060 void read_configs(void); 00061 NETSNMP_IMPORT 00062 void read_premib_configs(void); 00063 00064 /* Help Strings and Errors */ 00065 NETSNMP_IMPORT 00066 void read_config_print_usage(const char *lead); 00067 NETSNMP_IMPORT 00068 void config_perror(const char *); 00069 NETSNMP_IMPORT 00070 void config_pwarn(const char *); 00071 00072 #ifdef __cplusplus 00073 } 00074 #endif 00075 00076 /* 00077 * Having extracted the main ("public API") calls relevant 00078 * to this area of the Net-SNMP project, the next step is to 00079 * identify the related "public internal API" routines. 00080 * 00081 * In due course, these should probably be gathered 00082 * together into a companion 'library/config_api.h' header file. 00083 * [Or some suitable name] 00084 * 00085 * But for the time being, the expectation is that the 00086 * traditional headers that provided the above definitions 00087 * will probably also cover the relevant internal API calls. 00088 * Hence they are listed here: 00089 */ 00090 #include <net-snmp/library/snmp_api.h> 00091 00092 #include <net-snmp/library/read_config.h> 00093 #include <net-snmp/library/default_store.h> 00094 00095 #include <stdio.h> /* for FILE definition */ 00096 #include <net-snmp/library/snmp_parse_args.h> 00097 #include <net-snmp/library/snmp_enum.h> 00098 #include <net-snmp/library/vacm.h> 00099 00100 #endif /* NET_SNMP_CONFIG_API_H */