Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // snf_xci.hpp
  2. // Copyright (C) 2006 - 2009 ARM Research Labs, LLC
  3. // See www.armresearch.com for the copyright terms.
  4. //
  5. // SNF XML Command Interface
  6. //
  7. // SNF clients communicate with the SNF server using one-line xml statements.
  8. // The server responds in kind. This module uses the configuration module to
  9. // interpret those communications. In practice, a line will be read from a
  10. // connected socket and then passed to an snf_xci object for interpretation.
  11. // The snf_xci object parses the xml and presents the results on it's surface
  12. // in easily used variables.
  13. #ifndef snf_xci_included
  14. #define snf_xci_included
  15. #include "CodeDweller/XMLReader.hpp"
  16. namespace SNFMulti {
  17. class snf_xci { // SNF XCI message interpreter.
  18. private:
  19. CodeDweller::ConfigurationElement Reader; // Our reader.
  20. void SetupReader(); // Configure the reader.
  21. CodeDweller::ConfiguratorSetTrueOnComplete SNFWasParsed; // Configurator sets the ReadWasGood
  22. bool ReadWasGood; // flag at the end of the snf element.
  23. void reset(); // Reset/initialize for the next read.
  24. public:
  25. snf_xci();
  26. snf_xci(const char* bfr, int len);
  27. snf_xci(std::string& input);
  28. bool read(const char* bfr, int len);
  29. bool read(std::string& input);
  30. //// And now the interpreted results ////
  31. bool good();
  32. bool bad();
  33. std::string scanner_scan_file;
  34. bool scanner_scan_xhdr;
  35. bool scanner_scan_log;
  36. std::string scanner_scan_ip;
  37. int scanner_result_code;
  38. std::string scanner_result_xhdr;
  39. std::string scanner_result_log;
  40. std::string gbudb_set_ip;
  41. std::string gbudb_set_type;
  42. int gbudb_set_bad_count;
  43. int gbudb_set_good_count;
  44. std::string gbudb_good_ip;
  45. std::string gbudb_bad_ip;
  46. std::string gbudb_test_ip;
  47. std::string gbudb_drop_ip;
  48. std::string gbudb_result_ip;
  49. std::string gbudb_result_type;
  50. double gbudb_result_probability;
  51. double gbudb_result_confidence;
  52. int gbudb_result_bad_count;
  53. int gbudb_result_good_count;
  54. std::string gbudb_result_range;
  55. int gbudb_result_code;
  56. std::string report_request_status_class;
  57. std::string report_response;
  58. std::string xci_server_command;
  59. std::string xci_server_command_content;
  60. std::string xci_server_response;
  61. int xci_server_response_code;
  62. std::string xci_error_message;
  63. };
  64. } // namespace SNFMulti
  65. #endif