// Various routines that deal with parsing the configuration file.
-#include <vector>
+#include <stddef.h>
#include <string>
+#include <vector>
struct MarkPoolConfig {
int from, to;
struct StreamConfig {
std::string stream_id;
std::string src; // Can be empty.
+ size_t backlog_size;
int mark_pool; // -1 for none.
};
int port;
};
+struct LogConfig {
+ enum { LOG_TYPE_FILE, LOG_TYPE_CONSOLE, LOG_TYPE_SYSLOG } type;
+ std::string filename;
+};
+
struct Config {
int num_servers;
std::vector<MarkPoolConfig> mark_pools;
std::vector<StreamConfig> streams;
std::vector<AcceptorConfig> acceptors;
+ std::vector<LogConfig> log_destinations;
std::string stats_file; // Empty means no stats file.
int stats_interval;