Merge branch 'maint-0.4.8'
[tor.git] / src / feature / control / control_getinfo.h
blob17f6352865fc2bb27fc52f542520c5bd6f5cf4aa
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-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
7 /**
8 * \file control.h
9 * \brief Header file for control.c.
10 **/
12 #ifndef TOR_CONTROL_GETINFO_H
13 #define TOR_CONTROL_GETINFO_H
15 struct control_cmd_syntax_t;
16 struct control_cmd_args_t;
17 extern const struct control_cmd_syntax_t getinfo_syntax;
19 int handle_control_getinfo(control_connection_t *conn,
20 const struct control_cmd_args_t *args);
22 #ifdef CONTROL_GETINFO_PRIVATE
23 STATIC int getinfo_helper_onions(
24 control_connection_t *control_conn,
25 const char *question,
26 char **answer,
27 const char **errmsg);
28 STATIC void getinfo_helper_downloads_networkstatus(
29 const char *flavor,
30 download_status_t **dl_to_emit,
31 const char **errmsg);
32 STATIC void getinfo_helper_downloads_cert(
33 const char *fp_sk_req,
34 download_status_t **dl_to_emit,
35 smartlist_t **digest_list,
36 const char **errmsg);
37 STATIC void getinfo_helper_downloads_desc(
38 const char *desc_req,
39 download_status_t **dl_to_emit,
40 smartlist_t **digest_list,
41 const char **errmsg);
42 STATIC void getinfo_helper_downloads_bridge(
43 const char *bridge_req,
44 download_status_t **dl_to_emit,
45 smartlist_t **digest_list,
46 const char **errmsg);
47 STATIC int getinfo_helper_downloads(
48 control_connection_t *control_conn,
49 const char *question, char **answer,
50 const char **errmsg);
51 STATIC int getinfo_helper_current_consensus(
52 consensus_flavor_t flavor,
53 char **answer,
54 const char **errmsg);
55 STATIC int getinfo_helper_dir(
56 control_connection_t *control_conn,
57 const char *question, char **answer,
58 const char **errmsg);
59 STATIC int getinfo_helper_current_time(
60 control_connection_t *control_conn,
61 const char *question, char **answer,
62 const char **errmsg);
63 STATIC int getinfo_helper_rephist(
64 control_connection_t *control_conn,
65 const char *question, char **answer,
66 const char **errmsg);
67 #endif /* defined(CONTROL_GETINFO_PRIVATE) */
69 #endif /* !defined(TOR_CONTROL_GETINFO_H) */