control_getinfo.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. /**
  7. * \file control.h
  8. * \brief Header file for control.c.
  9. **/
  10. #ifndef TOR_CONTROL_GETINFO_H
  11. #define TOR_CONTROL_GETINFO_H
  12. struct control_cmd_syntax_t;
  13. struct control_cmd_args_t;
  14. extern const struct control_cmd_syntax_t getinfo_syntax;
  15. int handle_control_getinfo(control_connection_t *conn,
  16. const struct control_cmd_args_t *args);
  17. #ifdef CONTROL_GETINFO_PRIVATE
  18. STATIC int getinfo_helper_onions(
  19. control_connection_t *control_conn,
  20. const char *question,
  21. char **answer,
  22. const char **errmsg);
  23. STATIC void getinfo_helper_downloads_networkstatus(
  24. const char *flavor,
  25. download_status_t **dl_to_emit,
  26. const char **errmsg);
  27. STATIC void getinfo_helper_downloads_cert(
  28. const char *fp_sk_req,
  29. download_status_t **dl_to_emit,
  30. smartlist_t **digest_list,
  31. const char **errmsg);
  32. STATIC void getinfo_helper_downloads_desc(
  33. const char *desc_req,
  34. download_status_t **dl_to_emit,
  35. smartlist_t **digest_list,
  36. const char **errmsg);
  37. STATIC void getinfo_helper_downloads_bridge(
  38. const char *bridge_req,
  39. download_status_t **dl_to_emit,
  40. smartlist_t **digest_list,
  41. const char **errmsg);
  42. STATIC int getinfo_helper_downloads(
  43. control_connection_t *control_conn,
  44. const char *question, char **answer,
  45. const char **errmsg);
  46. STATIC int getinfo_helper_dir(
  47. control_connection_t *control_conn,
  48. const char *question, char **answer,
  49. const char **errmsg);
  50. STATIC int getinfo_helper_current_time(
  51. control_connection_t *control_conn,
  52. const char *question, char **answer,
  53. const char **errmsg);
  54. #endif /* defined(CONTROL_GETINFO_PRIVATE) */
  55. #endif /* !defined(TOR_CONTROL_GETINFO_H) */