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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 "configuration.hpp"
  16. class snf_xci { // SNF XCI message interpreter.
  17. private:
  18. ConfigurationElement Reader; // Our reader.
  19. void SetupReader(); // Configure the reader.
  20. ConfiguratorSetTrueOnComplete SNFWasParsed; // Configurator sets the ReadWasGood
  21. bool ReadWasGood; // flag at the end of the snf element.
  22. void reset(); // Reset/initialize for the next read.
  23. public:
  24. snf_xci();
  25. snf_xci(const char* bfr, int len);
  26. snf_xci(string& input);
  27. bool read(const char* bfr, int len);
  28. bool read(string& input);
  29. //// And now the interpreted results ////
  30. bool good();
  31. bool bad();
  32. string scanner_scan_file;
  33. bool scanner_scan_xhdr;
  34. bool scanner_scan_log;
  35. string scanner_scan_ip;
  36. int scanner_result_code;
  37. string scanner_result_xhdr;
  38. string scanner_result_log;
  39. string gbudb_set_ip;
  40. string gbudb_set_type;
  41. int gbudb_set_bad_count;
  42. int gbudb_set_good_count;
  43. string gbudb_good_ip;
  44. string gbudb_bad_ip;
  45. string gbudb_test_ip;
  46. string gbudb_drop_ip;
  47. string gbudb_result_ip;
  48. string gbudb_result_type;
  49. double gbudb_result_probability;
  50. double gbudb_result_confidence;
  51. int gbudb_result_bad_count;
  52. int gbudb_result_good_count;
  53. string gbudb_result_range;
  54. int gbudb_result_code;
  55. string report_request_status_class;
  56. string report_response;
  57. string xci_server_command;
  58. string xci_server_command_content;
  59. string xci_server_response;
  60. int xci_server_response_code;
  61. string xci_error_message;
  62. };
  63. #endif