Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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. #pragma once
  14. #include "../CodeDweller/configuration.hpp"
  15. namespace cd = codedweller;
  16. class snf_xci { // SNF XCI message interpreter.
  17. private:
  18. cd::ConfigurationElement Reader; // Our reader.
  19. void SetupReader(); // Configure the reader.
  20. cd::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(std::string& input);
  27. bool read(const char* bfr, int len);
  28. bool read(std::string& input);
  29. //// And now the interpreted results ////
  30. bool good();
  31. bool bad();
  32. std::string scanner_scan_file;
  33. bool scanner_scan_xhdr;
  34. bool scanner_scan_log;
  35. std::string scanner_scan_ip;
  36. int scanner_result_code;
  37. std::string scanner_result_xhdr;
  38. std::string scanner_result_log;
  39. std::string gbudb_set_ip;
  40. std::string gbudb_set_type;
  41. int gbudb_set_bad_count;
  42. int gbudb_set_good_count;
  43. std::string gbudb_good_ip;
  44. std::string gbudb_bad_ip;
  45. std::string gbudb_test_ip;
  46. std::string gbudb_drop_ip;
  47. std::string gbudb_result_ip;
  48. std::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. std::string gbudb_result_range;
  54. int gbudb_result_code;
  55. std::string report_request_status_class;
  56. std::string report_response;
  57. std::string xci_server_command;
  58. std::string xci_server_command_content;
  59. std::string xci_server_response;
  60. int xci_server_response_code;
  61. std::string xci_error_message;
  62. };