|
|
|
|
|
|
|
|
// The snf_xci object parses the xml and presents the results on it's surface |
|
|
// The snf_xci object parses the xml and presents the results on it's surface |
|
|
// in easily used variables. |
|
|
// in easily used variables. |
|
|
|
|
|
|
|
|
#ifndef snf_xci_included |
|
|
|
|
|
#define snf_xci_included |
|
|
|
|
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
|
#include "../CodeDweller/configuration.hpp" |
|
|
#include "../CodeDweller/configuration.hpp" |
|
|
|
|
|
|
|
|
|
|
|
namespace cd = codedweller; |
|
|
|
|
|
|
|
|
class snf_xci { // SNF XCI message interpreter. |
|
|
class snf_xci { // SNF XCI message interpreter. |
|
|
private: |
|
|
private: |
|
|
ConfigurationElement Reader; // Our reader. |
|
|
|
|
|
|
|
|
cd::ConfigurationElement Reader; // Our reader. |
|
|
void SetupReader(); // Configure the reader. |
|
|
void SetupReader(); // Configure the reader. |
|
|
ConfiguratorSetTrueOnComplete SNFWasParsed; // Configurator sets the ReadWasGood |
|
|
|
|
|
|
|
|
cd::ConfiguratorSetTrueOnComplete SNFWasParsed; // Configurator sets the ReadWasGood |
|
|
bool ReadWasGood; // flag at the end of the snf element. |
|
|
bool ReadWasGood; // flag at the end of the snf element. |
|
|
void reset(); // Reset/initialize for the next read. |
|
|
void reset(); // Reset/initialize for the next read. |
|
|
|
|
|
|
|
|
public: |
|
|
public: |
|
|
snf_xci(); |
|
|
snf_xci(); |
|
|
snf_xci(const char* bfr, int len); |
|
|
snf_xci(const char* bfr, int len); |
|
|
snf_xci(string& input); |
|
|
|
|
|
|
|
|
snf_xci(std::string& input); |
|
|
bool read(const char* bfr, int len); |
|
|
bool read(const char* bfr, int len); |
|
|
bool read(string& input); |
|
|
|
|
|
|
|
|
bool read(std::string& input); |
|
|
|
|
|
|
|
|
//// And now the interpreted results //// |
|
|
//// And now the interpreted results //// |
|
|
bool good(); |
|
|
bool good(); |
|
|
bool bad(); |
|
|
bool bad(); |
|
|
|
|
|
|
|
|
string scanner_scan_file; |
|
|
|
|
|
|
|
|
std::string scanner_scan_file; |
|
|
bool scanner_scan_xhdr; |
|
|
bool scanner_scan_xhdr; |
|
|
bool scanner_scan_log; |
|
|
bool scanner_scan_log; |
|
|
string scanner_scan_ip; |
|
|
|
|
|
|
|
|
std::string scanner_scan_ip; |
|
|
int scanner_result_code; |
|
|
int scanner_result_code; |
|
|
string scanner_result_xhdr; |
|
|
|
|
|
string scanner_result_log; |
|
|
|
|
|
|
|
|
std::string scanner_result_xhdr; |
|
|
|
|
|
std::string scanner_result_log; |
|
|
|
|
|
|
|
|
string gbudb_set_ip; |
|
|
|
|
|
string gbudb_set_type; |
|
|
|
|
|
|
|
|
std::string gbudb_set_ip; |
|
|
|
|
|
std::string gbudb_set_type; |
|
|
int gbudb_set_bad_count; |
|
|
int gbudb_set_bad_count; |
|
|
int gbudb_set_good_count; |
|
|
int gbudb_set_good_count; |
|
|
|
|
|
|
|
|
string gbudb_good_ip; |
|
|
|
|
|
string gbudb_bad_ip; |
|
|
|
|
|
string gbudb_test_ip; |
|
|
|
|
|
string gbudb_drop_ip; |
|
|
|
|
|
|
|
|
std::string gbudb_good_ip; |
|
|
|
|
|
std::string gbudb_bad_ip; |
|
|
|
|
|
std::string gbudb_test_ip; |
|
|
|
|
|
std::string gbudb_drop_ip; |
|
|
|
|
|
|
|
|
string gbudb_result_ip; |
|
|
|
|
|
string gbudb_result_type; |
|
|
|
|
|
|
|
|
std::string gbudb_result_ip; |
|
|
|
|
|
std::string gbudb_result_type; |
|
|
double gbudb_result_probability; |
|
|
double gbudb_result_probability; |
|
|
double gbudb_result_confidence; |
|
|
double gbudb_result_confidence; |
|
|
int gbudb_result_bad_count; |
|
|
int gbudb_result_bad_count; |
|
|
int gbudb_result_good_count; |
|
|
int gbudb_result_good_count; |
|
|
string gbudb_result_range; |
|
|
|
|
|
|
|
|
std::string gbudb_result_range; |
|
|
int gbudb_result_code; |
|
|
int gbudb_result_code; |
|
|
|
|
|
|
|
|
string report_request_status_class; |
|
|
|
|
|
string report_response; |
|
|
|
|
|
|
|
|
std::string report_request_status_class; |
|
|
|
|
|
std::string report_response; |
|
|
|
|
|
|
|
|
string xci_server_command; |
|
|
|
|
|
string xci_server_command_content; |
|
|
|
|
|
string xci_server_response; |
|
|
|
|
|
|
|
|
std::string xci_server_command; |
|
|
|
|
|
std::string xci_server_command_content; |
|
|
|
|
|
std::string xci_server_response; |
|
|
int xci_server_response_code; |
|
|
int xci_server_response_code; |
|
|
|
|
|
|
|
|
string xci_error_message; |
|
|
|
|
|
|
|
|
std::string xci_error_message; |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|