2 * read_config.h: reads configuration files for extensible sections.
12 #define STRINGMAX 1024
14 #define NORMAL_CONFIG 0
15 #define PREMIB_CONFIG 1
16 #define EITHER_CONFIG 2
21 * Defines a set of file types and the parse and free functions
22 * which process the syntax following a given token in a given file.
25 char *fileHeader; /* Label for entire file. */
26 struct config_line *start;
27 struct config_files *next;
31 char *config_token; /* Label for each line parser
32 * in the given file. */
33 void (*parse_line) (const char *, char *);
34 void (*free_func) (void);
35 struct config_line *next;
36 char config_time; /* {NORMAL,PREMIB,EITHER}_CONFIG */
40 struct read_config_memory {
42 struct read_config_memory *next;
46 int netsnmp_config(char *); /* parse a simple line: token=values */
47 void netsnmp_config_remember(char *); /* process later, during snmp_init() */
48 void netsnmp_config_process_memories(void); /* run all memories through parser */
50 Renamed to read_config_snmp to resolve linket error:
51 read_config is redefined in /CommEngine/user96345/src/udhcp-0.9.6/udhcp.a
52 See also "/net-snmp-5.0.3/snmplib/read_config.c"
55 void read_config_snmp(const char *, struct config_line *, int);
56 void read_configs(void);
57 void read_premib_configs(void);
58 void read_config_files(int);
59 void free_config(void);
60 void config_perror(const char *);
61 void config_pwarn(const char *);
62 char *skip_white(char *);
63 char *skip_not_white(char *);
64 char *skip_token(char *);
65 char *copy_nword(char *, char *, int);
66 char *copy_word(char *, char *); /* do not use */
67 void read_config_with_type(const char *, const char *);
68 struct config_line *register_config_handler(const char *, const char *,
69 void (*parser) (const char
71 void (*releaser) (void),
73 struct config_line *register_app_config_handler(const char *,
79 (void), const char *);
80 struct config_line *register_prenetsnmp_mib_handler(const char *,
88 struct config_line *register_app_prenetsnmp_mib_handler(const char *,
96 void unregister_config_handler(const char *, const char *);
97 void unregister_app_config_handler(const char *);
98 void unregister_all_config_handlers(void);
99 void read_config_print_usage(const char *lead);
100 char *read_config_save_octet_string(char *saveto,
103 char *read_config_read_octet_string(char *readfrom,
106 char *read_config_read_objid(char *readfrom, oid ** objid,
108 char *read_config_save_objid(char *saveto, oid * objid,
110 char *read_config_read_data(int type, char *readfrom,
111 void *dataptr, size_t * len);
112 char *read_config_read_memory(int type, char *readfrom,
113 char *dataptr, size_t * len);
114 char *read_config_store_data(int type, char *storeto,
115 void *dataptr, size_t * len);
116 char *read_config_store_data_prefix(char prefix, int type,
118 void *dataptr, size_t len);
119 void read_config_store(const char *type, const char *line);
120 void read_app_config_store(const char *line);
121 void snmp_save_persistent(const char *type);
122 void snmp_clean_persistent(const char *type);
123 struct config_line *read_config_get_handlers(const char *type);
126 * external memory list handlers
128 void snmp_config_remember_in_list(char *line,
129 struct read_config_memory
131 void snmp_config_process_memory_list(struct
134 void snmp_config_remember_free_list(struct
138 void set_configuration_directory(const char *dir);
139 const char *get_configuration_directory(void);
140 void set_persistent_directory(const char *dir);
141 const char *get_persistent_directory(void);
142 void handle_long_opt(const char *myoptarg);
147 #endif /* READ_CONFIG_H */