4 // Various routines that deal with parsing the configuration file.
10 struct MarkPoolConfig {
15 std::string stream_id;
16 std::string src; // Can be empty.
18 int mark_pool; // -1 for none.
21 struct AcceptorConfig {
26 enum { LOG_TYPE_FILE, LOG_TYPE_CONSOLE, LOG_TYPE_SYSLOG } type;
33 std::vector<MarkPoolConfig> mark_pools;
34 std::vector<StreamConfig> streams;
35 std::vector<AcceptorConfig> acceptors;
36 std::vector<LogConfig> log_destinations;
38 std::string stats_file; // Empty means no stats file.
41 std::string access_log_file; // Empty means no accses_log file.
44 // Parse and validate configuration. Returns false on error.
45 // <config> is taken to be empty (uninitialized) on entry.
46 bool parse_config(const std::string &filename, Config *config);
48 #endif // !defined(_CONFIG_H)