LogMessage(" Max File Size: " STDu64 "\n", config.max_file_size);
LogMessage(" Summary Mode: %s\n",
config.perf_flags & PERF_SUMMARY ? "ACTIVE" : "INACTIVE");
- LogMessage(" Base Stats: %s%s\n",
+ LogMessage(" Base Stats: %s\n",
config.perf_flags & PERF_BASE ? "ACTIVE" : "INACTIVE");
- LogMessage(" Flow Stats: %s%s\n",
+ LogMessage(" Flow Stats: %s\n",
config.perf_flags & PERF_FLOW ? "ACTIVE" : "INACTIVE");
if (config.perf_flags & PERF_FLOW)
{
LogMessage(" Max Flow Port: %u\n", config.flow_max_port_to_track);
}
- LogMessage(" Event Stats: %s%s\n",
+ LogMessage(" Event Stats: %s\n",
config.perf_flags & PERF_EVENT ? "ACTIVE" : "INACTIVE");
- LogMessage(" Flow IP Stats: %s%s\n",
+ LogMessage(" Flow IP Stats: %s\n",
config.perf_flags & PERF_FLOWIP ? "ACTIVE" : "INACTIVE");
if (config.perf_flags & PERF_FLOWIP)
{
virtual bool convert(std::istringstream& data_stream);
private:
+ bool output_set = false;
+
bool parse_file_option(std::istringstream& data_stream,
std::string orig_name,
std::string option_name,
tmpval = table_api.add_option("flow", true);
else if (!keyword.compare("max"))
- tmpval = table_api.add_option("max", true);
+ table_api.add_deleted_comment("max");
else if (!keyword.compare("events"))
tmpval = table_api.add_option("events", true);
else if (!keyword.compare("console"))
- tmpval = table_api.add_option("console", true);
+ {
+ table_api.add_diff_option_comment("console", "output = 'console'");
+ table_api.add_diff_option_comment("console", "format = 'text'");
+ if (!output_set)
+ {
+ tmpval = table_api.add_option("output", "console");
+ tmpval &= table_api.add_option("format", "text");
+ output_set = true;
+ }
+ }
else if (!keyword.compare("reset"))
- tmpval = table_api.add_option("reset", true);
+ table_api.add_deleted_comment("atexitonly: reset");
else if (!keyword.compare("atexitonly"))
table_api.add_deleted_comment("atexitonly");
tmpval = parse_int_option("max_file_size", data_stream, false);
else if (!keyword.compare("file"))
- parse_file_option(data_stream, "file",
- "file", "perf_monitor.csv");
+ {
+ table_api.add_diff_option_comment("file", "output = 'file'");
+ table_api.add_diff_option_comment("file", "format = 'csv'");
+ if (!output_set)
+ {
+ tmpval = table_api.add_option("output", "file");
+ tmpval &= table_api.add_option("format", "csv");
+ output_set = true;
+ }
+ eat_option(data_stream);
+ }
else if (!keyword.compare("snortfile"))
{
- table_api.add_diff_option_comment("snortfile", "file = true");
- parse_file_option(data_stream, "snortfile",
- "file", "perf_monitor.csv");
+ table_api.add_diff_option_comment("snortfile", "output = 'file'");
+ table_api.add_diff_option_comment("snortfile", "format = 'csv'");
+ if (!output_set)
+ {
+ tmpval = table_api.add_option("output", "file");
+ tmpval &= table_api.add_option("format", "csv");
+ output_set = true;
+ }
+ eat_option(data_stream);
}
else if (!keyword.compare("flow-file"))
{
- table_api.add_diff_option_comment("flow-file", "flow_file = true");
- parse_file_option(data_stream, "flow-file",
- "flow_file", "perf_monitor_flow.csv");
+ table_api.add_diff_option_comment("flow-file", "output = 'file'");
+ table_api.add_diff_option_comment("flow-file", "format = 'csv'");
+ if (!output_set)
+ {
+ tmpval = table_api.add_option("output", "file");
+ tmpval &= table_api.add_option("format", "csv");
+ output_set = true;
+ }
+ eat_option(data_stream);
}
else if (!keyword.compare("flow-ip-file"))
{
- table_api.add_diff_option_comment("flow-ip-file", "flow_ip_file = true");
- parse_file_option(data_stream, "flow-ip-file",
- "flow_ip_file", "perf_monitor_flow_ip.csv");
+ table_api.add_diff_option_comment("flow-ip-file", "output = 'file'");
+ table_api.add_diff_option_comment("flow-ip-file", "format = 'csv'");
+ if (!output_set)
+ {
+ tmpval = table_api.add_option("output", "file");
+ tmpval &= table_api.add_option("format", "csv");
+ output_set = true;
+ }
+ eat_option(data_stream);
}
else if (!keyword.compare("accumulate"))
{
- table_api.add_diff_option_comment("accumulate", "reset = false");
- tmpval = table_api.add_option("reset", false);
+ table_api.add_deleted_comment("accumulate");
}
else if (!keyword.compare("flow-ip"))
{