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 */
9 * \brief Header file for control.c.
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
,
28 STATIC
void getinfo_helper_downloads_networkstatus(
30 download_status_t
**dl_to_emit
,
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
,
37 STATIC
void getinfo_helper_downloads_desc(
39 download_status_t
**dl_to_emit
,
40 smartlist_t
**digest_list
,
42 STATIC
void getinfo_helper_downloads_bridge(
43 const char *bridge_req
,
44 download_status_t
**dl_to_emit
,
45 smartlist_t
**digest_list
,
47 STATIC
int getinfo_helper_downloads(
48 control_connection_t
*control_conn
,
49 const char *question
, char **answer
,
51 STATIC
int getinfo_helper_current_consensus(
52 consensus_flavor_t flavor
,
55 STATIC
int getinfo_helper_dir(
56 control_connection_t
*control_conn
,
57 const char *question
, char **answer
,
59 STATIC
int getinfo_helper_current_time(
60 control_connection_t
*control_conn
,
61 const char *question
, char **answer
,
63 STATIC
int getinfo_helper_rephist(
64 control_connection_t
*control_conn
,
65 const char *question
, char **answer
,
67 #endif /* defined(CONTROL_GETINFO_PRIVATE) */
69 #endif /* !defined(TOR_CONTROL_GETINFO_H) */