]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove needless includes from or.h
authorNick Mathewson <nickm@torproject.org>
Sun, 1 Jul 2018 15:32:11 +0000 (11:32 -0400)
committerNick Mathewson <nickm@torproject.org>
Sun, 1 Jul 2018 19:20:37 +0000 (15:20 -0400)
or.h should really include only the minimum of stuff from or/*,
common/*, and lib/*.

95 files changed:
src/lib/compress/compress.h
src/lib/crypt_ops/crypto_dh.h
src/or/addressmap.c
src/or/cell_queue_st.h
src/or/channel.h
src/or/channeltls.c
src/or/circuit_st.h
src/or/circuitlist.c
src/or/circuitstats.c
src/or/config.c
src/or/config.h
src/or/confparse.c
src/or/confparse.h
src/or/connection.c
src/or/connection_edge.c
src/or/connection_or.c
src/or/conscache.c
src/or/conscache.h
src/or/consdiffmgr.c
src/or/consdiffmgr.h
src/or/control.c
src/or/control.h
src/or/crypt_path_st.h
src/or/dir_connection_st.h
src/or/dirauth/dirvote.c
src/or/dirauth/shared_random_state.c
src/or/dirauth/shared_random_state.h
src/or/directory.c
src/or/directory.h
src/or/dirserv.c
src/or/dns.c
src/or/dnsserv.c
src/or/entrynodes.c
src/or/hibernate.c
src/or/hs_circuit.c
src/or/hs_circuitmap.c
src/or/hs_circuitmap.h
src/or/hs_client.c
src/or/hs_config.c
src/or/hs_service.c
src/or/main.c
src/or/main.h
src/or/ntmain.c
src/or/onion.c
src/or/onion_fast.c
src/or/onion_tap.c
src/or/onion_tap.h
src/or/or.h
src/or/or_connection_st.h
src/or/or_handshake_certs_st.h
src/or/periodic.c
src/or/policies.c
src/or/policies.h
src/or/reasons.c
src/or/relay_crypto.c
src/or/relay_crypto_st.h
src/or/rend_intro_point_st.h
src/or/rendclient.c
src/or/rendcommon.c
src/or/rendservice.c
src/or/rendservice.h
src/or/replaycache.h
src/or/router.c
src/or/routerkeys.c
src/or/scheduler.c
src/or/statefile.c
src/or/statefile.h
src/or/status.c
src/or/torcert.c
src/or/torcert.h
src/test/bench.c
src/test/fuzz/fuzzing_common.c
src/test/test.c
src/test/test_buffers.c
src/test/test_cell_formats.c
src/test/test_channelpadding.c
src/test/test_config.c
src/test/test_conscache.c
src/test/test_consdiffmgr.c
src/test/test_crypto.c
src/test/test_dir.c
src/test/test_entryconn.c
src/test/test_entrynodes.c
src/test/test_helpers.c
src/test/test_hs_client.c
src/test/test_hs_service.c
src/test/test_link_handshake.c
src/test/test_options.c
src/test/test_policy.c
src/test/test_pt.c
src/test/test_routerlist.c
src/test/test_status.c
src/test/test_storagedir.c
src/test/test_util.c
src/test/testing_common.c

index ae98e1aaefef2fa3054927fd4b388d12f6d250f0..4466e27c4d5b01309c42f778f26105214e41ba65 100644 (file)
@@ -18,7 +18,7 @@
  * GZIP_METHOD is guaranteed to be supported by the compress/uncompress
  * functions here. Call tor_compress_supports_method() to check if a given
  * compression schema is supported by Tor. */
-typedef enum {
+typedef enum compress_method_t {
   NO_METHOD=0, // This method must be first.
   GZIP_METHOD=1,
   ZLIB_METHOD=2,
@@ -32,7 +32,7 @@ typedef enum {
  * BEST_COMPRESSION saves the most bandwidth; LOW_COMPRESSION saves the most
  * memory.
  **/
-typedef enum {
+typedef enum compression_level_t {
   BEST_COMPRESSION, HIGH_COMPRESSION, MEDIUM_COMPRESSION, LOW_COMPRESSION
 } compression_level_t;
 
index 73a7bcb52171cd8fb2f1b5ea22cf9126e9f66850..88e8a919a80669b98dc1f8a5d71997bfa6a44c47 100644 (file)
@@ -14,6 +14,7 @@
 #define TOR_CRYPTO_DH_H
 
 #include "orconfig.h"
+#include "lib/cc/torint.h"
 #include "lib/defs/dh_sizes.h"
 
 typedef struct crypto_dh_t crypto_dh_t;
index a0df5c986525784fedeadeabb65a2bcbc6fb50a2..f622be4d093619c545763358c092d96ce7f2502e 100644 (file)
 
 #define ADDRESSMAP_PRIVATE
 
+#include "lib/crypt_ops/crypto_rand.h"
+
 #include "or/or.h"
 #include "or/addressmap.h"
 #include "or/circuituse.h"
 #include "or/config.h"
 #include "or/connection_edge.h"
 #include "or/control.h"
-#include "lib/crypt_ops/crypto_rand.h"
 #include "or/dns.h"
 #include "or/nodelist.h"
 #include "or/routerset.h"
@@ -1153,4 +1154,3 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires,
      iter = strmap_iter_next(addressmap,iter);
    }
 }
-
index 4ad98dafbf8bdbed4716a9da8181f77237404a5d..40110019bcfe3162412ab5e1785e2f072ec8b9c2 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef PACKED_CELL_ST_H
 #define PACKED_CELL_ST_H
 
+#include "tor_queue.h"
+
 /** A cell as packed for writing to the network. */
 struct packed_cell_t {
   /** Next cell queued on this circuit. */
@@ -25,4 +27,3 @@ struct cell_queue_t {
 };
 
 #endif
-
index 44b752e2c5b79c8be3d57a22f3ae61c382a3eb53..6a7b0e7b815757c9fc74421a12bfa8b1de79035d 100644 (file)
@@ -14,6 +14,8 @@
 #include "common/timers.h"
 #include "common/handles.h"
 
+#include "tor_queue.h"
+
 /* Channel handler function pointer typedefs */
 typedef void (*channel_listener_fn_ptr)(channel_listener_t *, channel_t *);
 typedef void (*channel_cell_handler_fn_ptr)(channel_t *, cell_t *);
@@ -637,4 +639,3 @@ HANDLE_DECL(channel, channel_s,)
   FREE_AND_NULL(channel_handle_t, channel_handle_free_, (h))
 
 #endif /* !defined(TOR_CHANNEL_H) */
-
index 5258935aeec69c7abf6a75fdf3786e4e6727cb21..b2cab0f550d69c014ff4be3a9e37e6e000e2b4ce 100644 (file)
@@ -69,6 +69,8 @@
 #include "or/routerinfo_st.h"
 #include "or/var_cell_st.h"
 
+#include "lib/tls/tortls.h"
+
 /** How many CELL_PADDING cells have we received, ever? */
 uint64_t stats_n_padding_cells_processed = 0;
 /** How many CELL_VERSIONS cells have we received, ever? */
@@ -2454,4 +2456,3 @@ channel_tls_process_authenticate_cell(var_cell_t *cell, channel_tls_t *chan)
 
 #undef ERR
 }
-
index 0ace64f3ee6dc293cd191f80072ecfa76ebaf75c..e53e5bf3e08bcd5ed4a818d280852cc175b8605a 100644 (file)
@@ -11,6 +11,8 @@
 
 #include "or/cell_queue_st.h"
 
+struct hs_token_t;
+
 /**
  * A circuit is a path over the onion routing
  * network. Applications can connect to one end of the circuit, and can
@@ -162,11 +164,10 @@ struct circuit_t {
 
   /** If set, points to an HS token that this circuit might be carrying.
    *  Used by the HS circuitmap.  */
-  hs_token_t *hs_token;
+  struct hs_token_t *hs_token;
   /** Hashtable node: used to look up the circuit by its HS token using the HS
       circuitmap. */
   HT_ENTRY(circuit_t) hs_circuitmap_node;
 };
 
 #endif
-
index a696533ae4ca768668bb226a02a47d573b90264d..441855271eed8fc2f8896c36b76efc30772a0661 100644 (file)
@@ -67,6 +67,7 @@
 #include "or/control.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "or/directory.h"
 #include "or/entrynodes.h"
 #include "or/main.h"
@@ -86,6 +87,7 @@
 #include "or/routerlist.h"
 #include "or/routerset.h"
 #include "or/channelpadding.h"
+#include "lib/compress/compress.h"
 #include "lib/compress/compress_lzma.h"
 #include "lib/compress/compress_zlib.h"
 #include "lib/compress/compress_zstd.h"
@@ -2737,4 +2739,3 @@ assert_circuit_ok,(const circuit_t *c))
     tor_assert(!or_circ || !or_circ->rend_splice);
   }
 }
-
index c2abb2d14b7a5cb0c79bffdbbfed18079bdb0d2e..c090a1e7ac164ede3361b441c281fc2cc39cb85b 100644 (file)
@@ -42,6 +42,7 @@
 #include "or/circuituse.h"
 #include "lib/math/fp.h"
 #include "lib/time/tvdiff.h"
+#include "lib/encoding/confline.h"
 
 #include "or/crypt_path_st.h"
 #include "or/origin_circuit_st.h"
index e3a4faa311600dd1c131519bd0c84c2cc6eb0814..4fb4489fcadd81412cd23580d9dbdca64be48a52 100644 (file)
@@ -71,6 +71,7 @@
 #include "or/circuitstats.h"
 #include "lib/compress/compress.h"
 #include "or/config.h"
+#include "lib/encoding/confline.h"
 #include "or/connection.h"
 #include "or/connection_edge.h"
 #include "or/connection_or.h"
index d2faf6c5123f4438b9db8650613cb371e33b0cd8..762779acfaecc7c9e7a1e38e64234ad071af67eb 100644 (file)
@@ -42,7 +42,7 @@ void init_protocol_warning_severity_level(void);
 int get_protocol_warning_severity_level(void);
 const char *get_version(void);
 const char *get_short_version(void);
-setopt_err_t options_trial_assign(config_line_t *list, unsigned flags,
+setopt_err_t options_trial_assign(struct config_line_t *list, unsigned flags,
                                   char **msg);
 
 uint32_t get_last_resolved_addr(void);
@@ -62,7 +62,7 @@ setopt_err_t options_init_from_string(const char *cf_defaults, const char *cf,
                             int command, const char *command_arg, char **msg);
 int option_is_recognized(const char *key);
 const char *option_get_canonical_name(const char *key);
-config_line_t *option_get_assignment(const or_options_t *options,
+struct config_line_t *option_get_assignment(const or_options_t *options,
                                      const char *key);
 int options_save_current(void);
 const char *get_torrc_fname(int defaults_fname);
@@ -180,8 +180,8 @@ int init_cookie_authentication(const char *fname, const char *header,
 or_options_t *options_new(void);
 
 int config_parse_commandline(int argc, char **argv, int ignore_errors,
-                             config_line_t **result,
-                             config_line_t **cmdline_result);
+                             struct config_line_t **result,
+                             struct config_line_t **cmdline_result);
 
 void config_register_addressmaps(const or_options_t *options);
 /* XXXX move to connection_edge.h */
@@ -260,7 +260,7 @@ STATIC int parse_dir_fallback_line(const char *line, int validate_only);
 STATIC int have_enough_mem_for_dircache(const or_options_t *options,
                                         size_t total_mem, char **msg);
 STATIC int parse_port_config(smartlist_t *out,
-                  const config_line_t *ports,
+                  const struct config_line_t *ports,
                   const char *portname,
                   int listener_type,
                   const char *defaultaddr,
index b38e06c6a23e81a282433000b801ef2ca7cd4670..60ab32ef82f895e418055ce97f6a2e26a212627c 100644 (file)
@@ -26,6 +26,7 @@
 #include "or/routerset.h"
 
 #include "lib/container/bitarray.h"
+#include "lib/encoding/confline.h"
 
 static uint64_t config_parse_memunit(const char *s, int *ok);
 static int config_parse_msec_interval(const char *s, int *ok);
index be9785ac1816f17d0314f5ba142508b56449136d..cbd2ea88e2db6175e577f730ba15314649769b31 100644 (file)
@@ -65,9 +65,9 @@ typedef union {
   time_t *ISOTIME;
   smartlist_t **CSV;
   int *CSV_INTERVAL;
-  config_line_t **LINELIST;
-  config_line_t **LINELIST_S;
-  config_line_t **LINELIST_V;
+  struct config_line_t **LINELIST;
+  struct config_line_t **LINELIST_S;
+  struct config_line_t **LINELIST_V;
   routerset_t **ROUTERSET;
 } confparse_dummy_values_t;
 #endif /* defined(TOR_UNIT_TESTS) */
@@ -185,7 +185,7 @@ void config_free_(const config_format_t *fmt, void *options);
     (options) = NULL;                                 \
   } while (0)
 
-config_line_t *config_get_assigned_option(const config_format_t *fmt,
+struct config_line_t *config_get_assigned_option(const config_format_t *fmt,
                                           const void *options, const char *key,
                                           int escape_val);
 int config_is_same(const config_format_t *fmt,
@@ -197,7 +197,7 @@ char *config_dump(const config_format_t *fmt, const void *default_options,
                   const void *options, int minimal,
                   int comment_defaults);
 int config_assign(const config_format_t *fmt, void *options,
-                  config_line_t *list,
+                  struct config_line_t *list,
                   unsigned flags, char **msg);
 config_var_t *config_find_option_mutable(config_format_t *fmt,
                                          const char *key);
@@ -219,4 +219,3 @@ void warn_deprecated_option(const char *what, const char *why);
 #define CFG_EQ_ROUTERSET(a,b,opt) routerset_equal((a)->opt, (b)->opt)
 
 #endif /* !defined(TOR_CONFPARSE_H) */
-
index e3e9c313ae54136b6da2d22b0f09ec411f693971..e42288579b9ed777fdf62baad5577c97508d0f2d 100644 (file)
 #include "or/routerparse.h"
 #include "lib/sandbox/sandbox.h"
 #include "lib/net/buffers_net.h"
+#include "lib/tls/tortls.h"
+#include "common/compat_libevent.h"
+#include "lib/compress/compress.h"
 
 #ifdef HAVE_PWD_H
 #include <pwd.h>
index e8185a5faa02f51e15a608f6de58b0df3dc01726..c3c934417f44c176773e44f9737cc284e273a830 100644 (file)
 #include "or/or_circuit_st.h"
 #include "or/origin_circuit_st.h"
 #include "or/socks_request_st.h"
+#include "common/compat_libevent.h"
 
 #ifdef HAVE_LINUX_TYPES_H
 #include <linux/types.h>
@@ -4221,4 +4222,3 @@ connection_edge_free_all(void)
   pending_entry_connections = NULL;
   mainloop_event_free(attach_pending_entry_connections_ev);
 }
-
index 9692e5d676b471b3b2f4ce182bef048c200f8671..71b3c8a0b870033ed31b44d969b30932688cc426 100644 (file)
@@ -69,6 +69,8 @@
 #include "or/routerinfo_st.h"
 #include "or/var_cell_st.h"
 
+#include "lib/tls/tortls.h"
+
 static int connection_tls_finish_handshake(or_connection_t *conn);
 static int connection_or_launch_v3_or_handshake(or_connection_t *conn);
 static int connection_or_process_cells_from_inbuf(or_connection_t *conn);
@@ -2990,4 +2992,3 @@ connection_or_send_authenticate_cell,(or_connection_t *conn, int authtype))
 
   return 0;
 }
-
index bc3a09509d3e91b2db5f2364fb12cb8efb3adfdc..bc5928ff239a69cba2876aceb306e578c3c31ade 100644 (file)
@@ -7,6 +7,7 @@
 #include "or/conscache.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/fs/storagedir.h"
+#include "lib/encoding/confline.h"
 
 #define CCE_MAGIC 0x17162253
 
@@ -624,4 +625,3 @@ consensus_cache_entry_is_mapped(consensus_cache_entry_t *ent)
   }
 }
 #endif /* defined(TOR_UNIT_TESTS) */
-
index 20af6402c5a98c394e2963c8bbd66c1d2c4ec8b9..c46b8242358ef211b24e2eab84930d21526084e1 100644 (file)
@@ -27,9 +27,9 @@ void consensus_cache_delete_pending(consensus_cache_t *cache,
                                     int force);
 int consensus_cache_get_n_filenames_available(consensus_cache_t *cache);
 consensus_cache_entry_t *consensus_cache_add(consensus_cache_t *cache,
-                                             const config_line_t *labels,
-                                             const uint8_t *data,
-                                             size_t datalen);
+                                           const struct config_line_t *labels,
+                                           const uint8_t *data,
+                                           size_t datalen);
 
 consensus_cache_entry_t *consensus_cache_find_first(
                                              consensus_cache_t *cache,
@@ -46,7 +46,7 @@ void consensus_cache_filter_list(smartlist_t *lst,
 
 const char *consensus_cache_entry_get_value(const consensus_cache_entry_t *ent,
                                             const char *key);
-const config_line_t *consensus_cache_entry_get_labels(
+const struct config_line_t *consensus_cache_entry_get_labels(
                                           const consensus_cache_entry_t *ent);
 
 void consensus_cache_entry_incref(consensus_cache_entry_t *ent);
@@ -64,4 +64,3 @@ int consensus_cache_entry_is_mapped(consensus_cache_entry_t *ent);
 #endif
 
 #endif /* !defined(TOR_CONSCACHE_H) */
-
index 7732cd10931da01f246bfabc40e7f1e067b93f50..c75b59c1f59fa876dfc21d676ab4fbbfd2ade3c4 100644 (file)
 #include "or/cpuworker.h"
 #include "or/networkstatus.h"
 #include "or/routerparse.h"
+#include "common/compat_libevent.h"
 #include "common/workqueue.h"
+#include "lib/compress/compress.h"
+#include "lib/encoding/confline.h"
 
 #include "or/networkstatus_st.h"
 #include "or/networkstatus_voter_info_st.h"
@@ -1940,4 +1943,3 @@ consensus_cache_entry_get_valid_after(const consensus_cache_entry_t *ent,
   else
     return 0;
 }
-
index d793a7ef1d3a36d8c6e2d63a89d4bc1759ac3097..66c3d65002016c51d385118d1bad4e702f51eb30 100644 (file)
@@ -4,6 +4,8 @@
 #ifndef TOR_CONSDIFFMGR_H
 #define TOR_CONSDIFFMGR_H
 
+enum compress_method_t;
+
 /**
  * Possible outcomes from trying to look up a given consensus diff.
  */
@@ -25,7 +27,7 @@ int consdiffmgr_add_consensus(const char *consensus,
 consdiff_status_t consdiffmgr_find_consensus(
                            struct consensus_cache_entry_t **entry_out,
                            consensus_flavor_t flavor,
-                           compress_method_t method);
+                           enum compress_method_t method);
 
 consdiff_status_t consdiffmgr_find_diff_from(
                            struct consensus_cache_entry_t **entry_out,
@@ -33,7 +35,7 @@ consdiff_status_t consdiffmgr_find_diff_from(
                            int digest_type,
                            const uint8_t *digest,
                            size_t digestlen,
-                           compress_method_t method);
+                           enum compress_method_t method);
 
 int consensus_cache_entry_get_voter_id_digests(
                                   const struct consensus_cache_entry_t *ent,
@@ -71,4 +73,3 @@ STATIC int uncompress_or_copy(char **out, size_t *outlen,
 #endif /* defined(CONSDIFFMGR_PRIVATE) */
 
 #endif /* !defined(TOR_CONSDIFFMGR_H) */
-
index af052f756c4c88041cafe9a2166d9d8358342408..35e8cacd83ff41f4af9a392e4ce21b747f3ad133 100644 (file)
@@ -80,6 +80,7 @@
 #include "or/routerlist.h"
 #include "or/routerparse.h"
 #include "or/shared_random_client.h"
+#include "lib/encoding/confline.h"
 
 #include "or/cached_dir_st.h"
 #include "or/control_connection_st.h"
 
 #include "lib/crypt_ops/crypto_s2k.h"
 #include "common/procmon.h"
+#include "common/compat_libevent.h"
 
 /** Yield true iff <b>s</b> is the state of a control_connection_t that has
  * finished authentication and is accepting commands. */
@@ -7791,4 +7793,3 @@ control_testing_set_global_event_mask(uint64_t mask)
   global_event_mask = mask;
 }
 #endif /* defined(TOR_UNIT_TESTS) */
-
index 200a88bf62b01c41226bf84310db1a15afcebcd4..5d00727c0a23a2f5d347896460d49a82b235479e 100644 (file)
@@ -99,7 +99,7 @@ int control_event_signal(uintptr_t signal);
 
 int init_control_cookie_authentication(int enabled);
 char *get_controller_cookie_file_name(void);
-smartlist_t *decode_hashed_passwords(config_line_t *passwords);
+smartlist_t *decode_hashed_passwords(struct config_line_t *passwords);
 void disable_control_logging(void);
 void enable_control_logging(void);
 
@@ -325,4 +325,3 @@ STATIC int getinfo_helper_current_time(
 #endif /* defined(CONTROL_PRIVATE) */
 
 #endif /* !defined(TOR_CONTROL_H) */
-
index 88b4085acb9331da43a234f9258d17c4bdd7dc2b..7d38c737522653a1247bdb7e9486e08006bd1114 100644 (file)
@@ -8,6 +8,7 @@
 #define CRYPT_PATH_ST_H
 
 #include "or/relay_crypto_st.h"
+struct crypto_dh_t;
 
 /** Holds accounting information for a single step in the layered encryption
  * performed by a circuit.  Used only at the client edge of a circuit. */
@@ -23,7 +24,7 @@ struct crypt_path_t {
   onion_handshake_state_t handshake_state;
   /** Diffie-hellman handshake state for performing an introduction
    * operations */
-  crypto_dh_t *rend_dh_handshake_state;
+  struct crypto_dh_t *rend_dh_handshake_state;
 
   /** Negotiated key material shared with the OR at this step. */
   char rend_circ_nonce[DIGEST_LEN];/* KH in tor-spec.txt */
@@ -53,4 +54,3 @@ struct crypt_path_t {
 };
 
 #endif
-
index f68266ca2e9d60446354985b6c5d59f109565ea8..1282f82d64aff24fe6bba460c1425a4ce89a2848 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "or/connection_st.h"
 
+struct tor_compress_state_t;
+
 /** Subtype of connection_t for an "directory connection" -- that is, an HTTP
  * connection to retrieve or serve directory material. */
 struct dir_connection_t {
@@ -31,7 +33,7 @@ struct dir_connection_t {
    * it from back to front. */
   smartlist_t *spool;
   /** The compression object doing on-the-fly compression for spooled data. */
-  tor_compress_state_t *compress_state;
+  struct tor_compress_state_t *compress_state;
 
   /** What rendezvous service are we querying for? */
   rend_data_t *rend_data;
@@ -63,4 +65,3 @@ struct dir_connection_t {
 };
 
 #endif
-
index 85a0d3e707e240c704a021377bf68fe6200fe3d9..66137d1a9b1abd1e125d2b617b323da5eae9a685 100644 (file)
@@ -44,6 +44,7 @@
 #include "or/vote_timing_st.h"
 
 #include "lib/container/order.h"
+#include "lib/encoding/confline.h"
 
 /**
  * \file dirvote.c
index c30a02442533eb604801dab5302d6d8c961b5f2d..85c02887daec5f9ecd5f340a6fb7bef1ad641ba9 100644 (file)
@@ -21,6 +21,7 @@
 #include "or/shared_random_client.h"
 #include "or/dirauth/shared_random_state.h"
 #include "or/voting_schedule.h"
+#include "lib/encoding/confline.h"
 
 /* Default filename of the shared random state on disk. */
 static const char default_fname[] = "sr-state";
@@ -1321,4 +1322,3 @@ get_sr_state(void)
 }
 
 #endif /* defined(TOR_UNIT_TESTS) */
-
index a8ac0134cca837f09f52641a3e67eb808223d0ec..f99874872b466ca0c76fae448729a20d454bcad3 100644 (file)
@@ -85,11 +85,11 @@ typedef struct sr_disk_state_t {
   /* State valid until? */
   time_t ValidUntil;
   /* All commits seen that are valid. */
-  config_line_t *Commit;
+  struct config_line_t *Commit;
   /* Previous and current shared random value. */
-  config_line_t *SharedRandValues;
+  struct config_line_t *SharedRandValues;
   /* Extra Lines for configuration we might not know. */
-  config_line_t *ExtraLines;
+  struct config_line_t *ExtraLines;
 } sr_disk_state_t;
 
 /* API */
@@ -144,4 +144,3 @@ STATIC sr_state_t *get_sr_state(void);
 #endif /* defined(TOR_UNIT_TESTS) */
 
 #endif /* !defined(TOR_SHARED_RANDOM_STATE_H) */
-
index 6b8885e121d6a898361edd92c8bc2b997dff2586..60f2a3285eded10fce37f1db50d7295254355b49 100644 (file)
@@ -17,6 +17,7 @@
 #include "or/consdiff.h"
 #include "or/consdiffmgr.h"
 #include "or/control.h"
+#include "lib/compress/compress.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "or/directory.h"
@@ -42,6 +43,7 @@
 #include "or/routerlist.h"
 #include "or/routerparse.h"
 #include "or/routerset.h"
+#include "lib/encoding/confline.h"
 
 #if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
 #if !defined(OpenBSD)
@@ -5952,4 +5954,3 @@ dir_split_resource_into_spoolable(const char *resource,
   smartlist_free(fingerprints);
   return r;
 }
-
index 5cf8892ace8241c73b30013f519e14f0c1120111..6ed9e9b170edf5d6741361819fc63d59e588fcb8 100644 (file)
@@ -13,6 +13,7 @@
 #define TOR_DIRECTORY_H
 
 #include "or/hs_ident.h"
+enum compress_method_t;
 
 dir_connection_t *TO_DIR_CONN(connection_t *c);
 int directories_have_accepted_server_descriptor(void);
@@ -90,7 +91,7 @@ void directory_request_add_header(directory_request_t *req,
 MOCK_DECL(void, directory_initiate_request, (directory_request_t *request));
 
 int parse_http_response(const char *headers, int *code, time_t *date,
-                        compress_method_t *compression, char **response);
+                        enum compress_method_t *compression, char **response);
 int parse_http_command(const char *headers,
                        char **command_out, char **url_out);
 char *http_get_header(const char *headers, const char *which);
@@ -189,7 +190,7 @@ struct directory_request_t {
   /** Hidden-service-specific information v2. */
   const rend_data_t *rend_query;
   /** Extra headers to append to the request */
-  config_line_t *additional_headers;
+  struct config_line_t *additional_headers;
   /** Hidden-service-specific information for v3+. */
   const hs_ident_dir_conn_t *hs_ident;
   /** Used internally to directory.c: gets informed when the attempt to
@@ -203,8 +204,10 @@ STATIC int handle_get_hs_descriptor_v3(dir_connection_t *conn,
                                        const struct get_handler_args_t *args);
 STATIC int directory_handle_command(dir_connection_t *conn);
 STATIC char *accept_encoding_header(void);
-STATIC int allowed_anonymous_connection_compression_method(compress_method_t);
-STATIC void warn_disallowed_anonymous_compression_method(compress_method_t);
+STATIC int allowed_anonymous_connection_compression_method(
+                                               enum compress_method_t);
+STATIC void warn_disallowed_anonymous_compression_method(
+                                               enum compress_method_t);
 
 STATIC int handle_response_fetch_hsdesc_v3(dir_connection_t *conn,
                                           const response_handler_args_t *args);
@@ -239,7 +242,8 @@ STATIC int handle_post_hs_descriptor(const char *url, const char *body);
 STATIC char* authdir_type_to_string(dirinfo_type_t auth);
 STATIC const char * dir_conn_purpose_to_string(int purpose);
 STATIC int should_use_directory_guards(const or_options_t *options);
-STATIC compression_level_t choose_compression_level(ssize_t n_bytes);
+enum compression_level_t;
+STATIC enum compression_level_t choose_compression_level(ssize_t n_bytes);
 STATIC int find_dl_min_delay(const download_status_t *dls,
                              const or_options_t *options);
 
@@ -268,4 +272,3 @@ STATIC unsigned parse_accept_encoding_header(const char *h);
 #endif /* defined(TOR_UNIT_TESTS) || defined(DIRECTORY_PRIVATE) */
 
 #endif /* !defined(TOR_DIRECTORY_H) */
-
index 62d4e732237c369e19cb128bb994fc4c45789a77..9ad453356b4ca87e28eb9522a1e2568e7810070d 100644 (file)
@@ -46,7 +46,9 @@
 #include "or/tor_version_st.h"
 #include "or/vote_routerstatus_st.h"
 
+#include "lib/compress/compress.h"
 #include "lib/container/order.h"
+#include "lib/encoding/confline.h"
 
 /**
  * \file dirserv.c
index ddb50d1964813b0c024c4638e2ed89b7312693b0..08a55170e5edbd9e4464b2cde601a3e19c81ac5f 100644 (file)
@@ -64,6 +64,7 @@
 #include "or/router.h"
 #include "ht.h"
 #include "lib/sandbox/sandbox.h"
+#include "common/compat_libevent.h"
 
 #include "or/edge_connection_st.h"
 #include "or/or_circuit_st.h"
@@ -2136,4 +2137,3 @@ dns_insert_cache_entry(cached_resolve_t *new_entry)
 {
   HT_INSERT(cache_map, &cache_root, new_entry);
 }
-
index ce1746fe270b38753ff7e565654683a2c837ad89..d2ef4a496e2b4472d84fdb951ccb0f36fd44770a 100644 (file)
@@ -34,6 +34,7 @@
 #include "or/entry_connection_st.h"
 #include "or/listener_connection_st.h"
 #include "or/socks_request_st.h"
+#include "common/compat_libevent.h"
 
 #include <event2/dns.h>
 #include <event2/dns_compat.h>
@@ -412,4 +413,3 @@ dnsserv_close_listener(connection_t *conn)
     listener_conn->dns_server_port = NULL;
   }
 }
-
index 1919336223efd38486105683b218fe4494472882..2ed2bc904d6fa496bdd9f5e4dc5796c09703b066 100644 (file)
 #include "or/transports.h"
 #include "or/statefile.h"
 #include "lib/math/fp.h"
+#include "lib/encoding/confline.h"
 
 #include "or/node_st.h"
 #include "or/origin_circuit_st.h"
index 12264f758fa862b6a03d5998ada60cb84deeac20..2c43e0f997a28c5823378b18d7258a167be3c925 100644 (file)
@@ -41,6 +41,7 @@ hibernating, phase 2:
 #include "or/main.h"
 #include "or/router.h"
 #include "or/statefile.h"
+#include "common/compat_libevent.h"
 
 #include "or/or_connection_st.h"
 
@@ -1227,4 +1228,3 @@ hibernate_set_state_for_testing_(hibernate_state_t newstate)
   hibernate_state = newstate;
 }
 #endif /* defined(TOR_UNIT_TESTS) */
-
index 853669846ee2c6548b4ac0fb203c69aecedcc603..044ff2bbca4fa81f1a126b20d4969cf74b02cad1 100644 (file)
@@ -23,6 +23,7 @@
 #include "or/router.h"
 
 #include "or/hs_cell.h"
+#include "or/hs_circuitmap.h"
 #include "or/hs_ident.h"
 #include "or/hs_ntor.h"
 #include "or/hs_service.h"
index 21db652492b53695d5572cb2cfd41e7e295ad50b..c4bf9fab43fa06126a8dabda6006117d735673af 100644 (file)
@@ -583,4 +583,3 @@ hs_circuitmap_free_all(void)
     tor_free(the_hs_circuitmap);
   }
 }
-
index 2118a6414ac7da03232dcbaacdaed6d177962823..c39a37c0526392a278e8cd425b5c39dc16f58d13 100644 (file)
@@ -11,7 +11,7 @@
 
 typedef HT_HEAD(hs_circuitmap_ht, circuit_t) hs_circuitmap_ht;
 
-typedef struct hs_token_s hs_token_t;
+typedef struct hs_token_t hs_token_t;
 struct or_circuit_t;
 struct origin_circuit_t;
 
@@ -90,7 +90,7 @@ typedef enum {
 
 /** Represents a token used in the HS protocol. Each such token maps to a
  *  specific introduction or rendezvous circuit. */
-struct hs_token_s {
+struct hs_token_t {
   /* Type of HS token. */
   hs_token_type_t type;
 
@@ -110,4 +110,3 @@ hs_circuitmap_ht *get_hs_circuitmap(void);
 #endif /* TOR_UNIT_TESTS */
 
 #endif /* !defined(TOR_HS_CIRCUITMAP_H) */
-
index 8fddd51a47906cbd358f0285d18f3838e474462e..0b60c8dcfb3a99c769669d2595a3f4d4fc646309 100644 (file)
@@ -22,6 +22,7 @@
 #include "or/hs_cache.h"
 #include "or/hs_cell.h"
 #include "or/hs_circuit.h"
+#include "or/hs_circuitmap.h"
 #include "or/hs_client.h"
 #include "or/hs_control.h"
 #include "or/hs_descriptor.h"
@@ -1619,4 +1620,3 @@ hs_client_dir_info_changed(void)
    * AP_CONN_STATE_RENDDESC_WAIT state in order to fetch the descriptor. */
   retry_all_socks_conn_waiting_for_desc();
 }
-
index c8ce5b43fa9bd4886e4c5f93894131029dc97529..603cd6e74e95e41393703ec2d3c4a65812fdb838 100644 (file)
@@ -29,6 +29,7 @@
 #include "or/hs_config.h"
 #include "or/hs_service.h"
 #include "or/rendservice.h"
+#include "lib/encoding/confline.h"
 
 /* Using the given list of services, stage them into our global state. Every
  * service version are handled. This function can remove entries in the given
@@ -587,4 +588,3 @@ hs_config_service_all(const or_options_t *options, int validate_only)
   /* Tor main should call the free all function on error. */
   return ret;
 }
-
index b5649e2636f724a6d1e06d36f55660673b873294..994a5687bc4d89b589fded25f9df65f9cfe4e3b5 100644 (file)
@@ -47,6 +47,8 @@
 #include "or/origin_circuit_st.h"
 #include "or/routerstatus_st.h"
 
+#include "lib/encoding/confline.h"
+
 /* Trunnel */
 #include "trunnel/ed25519_cert.h"
 #include "trunnel/hs/cell_common.h"
@@ -3631,4 +3633,3 @@ get_first_service(void)
 }
 
 #endif /* defined(TOR_UNIT_TESTS) */
-
index 81a8cfbee9887dce13bd1ae97827dea05d1dedd8..6a5bf9ae01fcac45fbdb19ae5ccd5c48951083ef 100644 (file)
 #include "lib/sandbox/sandbox.h"
 #include "lib/fs/lockfile.h"
 #include "lib/net/buffers_net.h"
+#include "lib/tls/tortls.h"
+#include "common/compat_libevent.h"
+#include "lib/encoding/confline.h"
 
 #include <event2/event.h>
 
index 214a9b3b0a7db58e6ad744b00d55918df279f174..90146f4bd428378136c64a38a70f22160c9dbeb9 100644 (file)
@@ -96,10 +96,12 @@ uint64_t get_main_loop_idle_count(void);
 void periodic_events_on_new_options(const or_options_t *options);
 void reschedule_per_second_timer(void);
 
+struct token_bucket_rw_t;
+
 extern time_t time_of_process_start;
 extern int quiet_level;
-extern token_bucket_rw_t global_bucket;
-extern token_bucket_rw_t global_relayed_bucket;
+extern struct token_bucket_rw_t global_bucket;
+extern struct token_bucket_rw_t global_relayed_bucket;
 
 #ifdef MAIN_PRIVATE
 STATIC void init_connection_lists(void);
@@ -118,4 +120,3 @@ extern periodic_event_item_t periodic_events[];
 #endif /* defined(MAIN_PRIVATE) */
 
 #endif /* !defined(TOR_MAIN_H) */
-
index e23a41fb83635047d5e2a05d472a76b9280362c0..99e77a285eb7a6f075cf68bd891d64398a9a39b3 100644 (file)
@@ -25,6 +25,7 @@
 #include "or/ntmain.h"
 #include "lib/log/win32err.h"
 #include "lib/fs/winlib.h"
+#include "common/compat_libevent.h"
 
 #include <windows.h>
 #define GENSRV_SERVICENAME  "tor"
index 2b30870e5dab6af1ae8b508cf090ccb701f4ef60..80d8e1a8b183023368151a26a8d5da7dd158c464 100644 (file)
@@ -68,6 +68,7 @@
 #include "or/config.h"
 #include "or/cpuworker.h"
 #include "lib/crypt_ops/crypto_util.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "or/networkstatus.h"
 #include "or/onion.h"
 #include "or/onion_fast.h"
@@ -1343,4 +1344,3 @@ extended_cell_format(uint8_t *command_out, uint16_t *len_out,
 
   return 0;
 }
-
index 7d555c26e78f2f39d184dace92e2c4fcd56517db..6e834ccf9569fbb72d63531edbc975675c4c2331 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "or/or.h"
 #include "or/onion_fast.h"
+#include "lib/crypt_ops/crypto_hkdf.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 
@@ -141,4 +142,3 @@ fast_client_handshake(const fast_handshake_state_t *handshake_state,
   tor_free(out);
   return r;
 }
-
index 0f9f638fa2f49ad293b5e1a8c7ea56c6e7356723..05bcce2e876ced6264577c777b8acd12a9b99e14 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "or/or.h"
 #include "or/config.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "or/onion_tap.h"
@@ -243,4 +244,3 @@ onion_skin_TAP_client_handshake(crypto_dh_t *handshake_state,
   tor_free(key_material);
   return -1;
 }
-
index 5b1eacce702256dfc6ef1707bcb8b639ce5f27f9..9a3df684d6709d1a24c8eeea927397c11abe41a0 100644 (file)
                                  DH1024_KEY_LEN)
 #define TAP_ONIONSKIN_REPLY_LEN (DH1024_KEY_LEN+DIGEST_LEN)
 
-int onion_skin_TAP_create(crypto_pk_t *router_key,
-                      crypto_dh_t **handshake_state_out,
+struct crypto_dh_t;
+struct crypto_pk_t;
+
+int onion_skin_TAP_create(struct crypto_pk_t *router_key,
+                      struct crypto_dh_t **handshake_state_out,
                       char *onion_skin_out);
 
 int onion_skin_TAP_server_handshake(const char *onion_skin,
-                                crypto_pk_t *private_key,
-                                crypto_pk_t *prev_private_key,
+                                struct crypto_pk_t *private_key,
+                                struct crypto_pk_t *prev_private_key,
                                 char *handshake_reply_out,
                                 char *key_out,
                                 size_t key_out_len);
 
-int onion_skin_TAP_client_handshake(crypto_dh_t *handshake_state,
+int onion_skin_TAP_client_handshake(struct crypto_dh_t *handshake_state,
                                 const char *handshake_reply,
                                 char *key_out,
                                 size_t key_out_len,
                                 const char **msg_out);
 
 #endif /* !defined(TOR_ONION_TAP_H) */
-
index 3d3972fb8f143c60a51973781ff6547c7aa38217..2f3dba2b0cf909f6acd0b86414a09e786f8cf97f 100644 (file)
 #include <windows.h>
 #endif /* defined(_WIN32) */
 
+#include "common/util.h"
+
+#include "lib/container/map.h"
+#include "lib/container/smartlist.h"
 #include "lib/crypt_ops/crypto.h"
 #include "lib/crypt_ops/crypto_format.h"
-#include "lib/crypt_ops/crypto_dh.h"
-#include "lib/crypt_ops/crypto_hkdf.h"
-#include "lib/tls/tortls.h"
-#include "lib/log/torlog.h"
-#include "lib/container/smartlist.h"
-#include "lib/container/map.h"
-#include "lib/compress/compress.h"
+#include "lib/defs/dh_sizes.h"
+#include "lib/encoding/binascii.h"
 #include "lib/net/address.h"
-#include "common/compat_libevent.h"
+
 #include "ht.h"
-#include "lib/encoding/confline.h"
-#include "or/replaycache.h"
-#include "lib/crypt_ops/crypto_curve25519.h"
-#include "lib/crypt_ops/crypto_ed25519.h"
-#include "tor_queue.h"
-#include "common/token_bucket.h"
-#include "lib/encoding/binascii.h"
-#include "or/hs_circuitmap.h"
-#include "common/util.h"
 
 // These, more than other includes, are for keeping the other struct
 // definitions working. We should remove them when we minimize our includes.
@@ -1523,6 +1513,7 @@ typedef enum {
 
 struct fast_handshake_state_t;
 struct ntor_handshake_state_t;
+struct crypto_dh_t;
 #define ONION_HANDSHAKE_TYPE_TAP  0x0000
 #define ONION_HANDSHAKE_TYPE_FAST 0x0001
 #define ONION_HANDSHAKE_TYPE_NTOR 0x0002
@@ -1531,7 +1522,7 @@ typedef struct {
   uint16_t tag;
   union {
     struct fast_handshake_state_t *fast;
-    crypto_dh_t *tap;
+    struct crypto_dh_t *tap;
     struct ntor_handshake_state_t *ntor;
   } u;
 } onion_handshake_state_t;
@@ -1694,6 +1685,8 @@ typedef enum {OUTBOUND_ADDR_EXIT, OUTBOUND_ADDR_OR,
               OUTBOUND_ADDR_EXIT_AND_OR,
               OUTBOUND_ADDR_MAX} outbound_addr_t;
 
+struct config_line_t;
+
 /** Configuration options for a Tor process. */
 typedef struct {
   uint32_t magic_;
@@ -1707,7 +1700,7 @@ typedef struct {
   } command;
   char *command_arg; /**< Argument for command-line option. */
 
-  config_line_t *Logs; /**< New-style list of configuration lines
+  struct config_line_t *Logs; /**< New-style list of configuration lines
                         * for logs */
   int LogTimeGranularity; /**< Log resolution in milliseconds. */
 
@@ -1761,7 +1754,7 @@ typedef struct {
   int DisableAllSwap; /**< Boolean: Attempt to call mlockall() on our
                        * process for all current and future memory. */
 
-  config_line_t *ExitPolicy; /**< Lists of exit policy components. */
+  struct config_line_t *ExitPolicy; /**< Lists of exit policy components. */
   int ExitPolicyRejectPrivate; /**< Should we not exit to reserved private
                                 * addresses, and our own published addresses?
                                 */
@@ -1770,36 +1763,37 @@ typedef struct {
                                         * Includes OutboundBindAddresses and
                                         * configured ports. */
   int ReducedExitPolicy; /**<Should we use the Reduced Exit Policy? */
-  config_line_t *SocksPolicy; /**< Lists of socks policy components */
-  config_line_t *DirPolicy; /**< Lists of dir policy components */
+  struct config_line_t *SocksPolicy; /**< Lists of socks policy components */
+  struct config_line_t *DirPolicy; /**< Lists of dir policy components */
   /** Local address to bind outbound sockets */
-  config_line_t *OutboundBindAddress;
+  struct config_line_t *OutboundBindAddress;
   /** Local address to bind outbound relay sockets */
-  config_line_t *OutboundBindAddressOR;
+  struct config_line_t *OutboundBindAddressOR;
   /** Local address to bind outbound exit sockets */
-  config_line_t *OutboundBindAddressExit;
+  struct config_line_t *OutboundBindAddressExit;
   /** Addresses derived from the various OutboundBindAddress lines.
    * [][0] is IPv4, [][1] is IPv6
    */
   tor_addr_t OutboundBindAddresses[OUTBOUND_ADDR_MAX][2];
   /** Directory server only: which versions of
    * Tor should we tell users to run? */
-  config_line_t *RecommendedVersions;
-  config_line_t *RecommendedClientVersions;
-  config_line_t *RecommendedServerVersions;
-  config_line_t *RecommendedPackages;
+  struct config_line_t *RecommendedVersions;
+  struct config_line_t *RecommendedClientVersions;
+  struct config_line_t *RecommendedServerVersions;
+  struct config_line_t *RecommendedPackages;
   /** Whether dirservers allow router descriptors with private IPs. */
   int DirAllowPrivateAddresses;
   /** Whether routers accept EXTEND cells to routers with private IPs. */
   int ExtendAllowPrivateAddresses;
   char *User; /**< Name of user to run Tor as. */
-  config_line_t *ORPort_lines; /**< Ports to listen on for OR connections. */
+   /** Ports to listen on for OR connections. */
+  struct config_line_t *ORPort_lines;
   /** Ports to listen on for extended OR connections. */
-  config_line_t *ExtORPort_lines;
+  struct config_line_t *ExtORPort_lines;
   /** Ports to listen on for SOCKS connections. */
-  config_line_t *SocksPort_lines;
+  struct config_line_t *SocksPort_lines;
   /** Ports to listen on for transparent pf/netfilter connections. */
-  config_line_t *TransPort_lines;
+  struct config_line_t *TransPort_lines;
   char *TransProxyType; /**< What kind of transparent proxy
                          * implementation are we using? */
   /** Parsed value of TransProxyType. */
@@ -1809,20 +1803,21 @@ typedef struct {
     TPT_IPFW,
     TPT_TPROXY,
   } TransProxyType_parsed;
-  config_line_t *NATDPort_lines; /**< Ports to listen on for transparent natd
-                            * connections. */
+  /** Ports to listen on for transparent natd connections. */
+  struct config_line_t *NATDPort_lines;
   /** Ports to listen on for HTTP Tunnel connections. */
-  config_line_t *HTTPTunnelPort_lines;
-  config_line_t *ControlPort_lines; /**< Ports to listen on for control
+  struct config_line_t *HTTPTunnelPort_lines;
+  struct config_line_t *ControlPort_lines; /**< Ports to listen on for control
                                * connections. */
-  config_line_t *ControlSocket; /**< List of Unix Domain Sockets to listen on
-                                 * for control connections. */
+  /** List of Unix Domain Sockets to listen on for control connections. */
+  struct config_line_t *ControlSocket;
 
   int ControlSocketsGroupWritable; /**< Boolean: Are control sockets g+rw? */
   int UnixSocksGroupWritable; /**< Boolean: Are SOCKS Unix sockets g+rw? */
   /** Ports to listen on for directory connections. */
-  config_line_t *DirPort_lines;
-  config_line_t *DNSPort_lines; /**< Ports to listen on for DNS requests. */
+  struct config_line_t *DirPort_lines;
+  /** Ports to listen on for DNS requests. */
+  struct config_line_t *DNSPort_lines;
 
   /* MaxMemInQueues value as input by the user. We clean this up to be
    * MaxMemInQueues. */
@@ -1878,19 +1873,19 @@ typedef struct {
   char *BridgePassword_AuthDigest_;
 
   int UseBridges; /**< Boolean: should we start all circuits with a bridge? */
-  config_line_t *Bridges; /**< List of bootstrap bridge addresses. */
+  struct config_line_t *Bridges; /**< List of bootstrap bridge addresses. */
 
-  config_line_t *ClientTransportPlugin; /**< List of client
+  struct config_line_t *ClientTransportPlugin; /**< List of client
                                            transport plugins. */
 
-  config_line_t *ServerTransportPlugin; /**< List of client
+  struct config_line_t *ServerTransportPlugin; /**< List of client
                                            transport plugins. */
 
   /** List of TCP/IP addresses that transports should listen at. */
-  config_line_t *ServerTransportListenAddr;
+  struct config_line_t *ServerTransportListenAddr;
 
   /** List of options that must be passed to pluggable transports. */
-  config_line_t *ServerTransportOptions;
+  struct config_line_t *ServerTransportOptions;
 
   int BridgeRelay; /**< Boolean: are we acting as a bridge relay? We make
                     * this explicit so we can change how we behave in the
@@ -1975,9 +1970,10 @@ typedef struct {
   int FascistFirewall; /**< Whether to prefer ORs reachable on open ports. */
   smartlist_t *FirewallPorts; /**< Which ports our firewall allows
                                * (strings). */
-  config_line_t *ReachableAddresses; /**< IP:ports our firewall allows. */
-  config_line_t *ReachableORAddresses; /**< IP:ports for OR conns. */
-  config_line_t *ReachableDirAddresses; /**< IP:ports for Dir conns. */
+   /** IP:ports our firewall allows. */
+  struct config_line_t *ReachableAddresses;
+  struct config_line_t *ReachableORAddresses; /**< IP:ports for OR conns. */
+  struct config_line_t *ReachableDirAddresses; /**< IP:ports for Dir conns. */
 
   int ConstrainedSockets; /**< Shrink xmit and recv socket buffers. */
   uint64_t ConstrainedSockSize; /**< Size of constrained buffers. */
@@ -2004,7 +2000,7 @@ typedef struct {
   smartlist_t *TrackHostExits;
   int TrackHostExitsExpire; /**< Number of seconds until we expire an
                              * addressmap */
-  config_line_t *AddressMap; /**< List of address map directives. */
+  struct config_line_t *AddressMap; /**< List of address map directives. */
   int AutomapHostsOnResolve; /**< If true, when we get a resolve request for a
                               * hostname ending with one of the suffixes in
                               * <b>AutomapHostsSuffixes</b>, map it to a
@@ -2049,10 +2045,11 @@ typedef struct {
   uint64_t PerConnBWRate; /**< Long-term bw on a single TLS conn, if set. */
   uint64_t PerConnBWBurst; /**< Allowed burst on a single TLS conn, if set. */
   int NumCPUs; /**< How many CPUs should we try to use? */
-  config_line_t *RendConfigLines; /**< List of configuration lines
+  struct config_line_t *RendConfigLines; /**< List of configuration lines
                                           * for rendezvous services. */
-  config_line_t *HidServAuth; /**< List of configuration lines for client-side
-                               * authorizations for hidden services */
+  struct config_line_t *HidServAuth; /**< List of configuration lines for
+                               * client-side authorizations for hidden
+                               * services */
   char *ContactInfo; /**< Contact info to be published in the directory. */
 
   int HeartbeatPeriod; /**< Log heartbeat messages after this many seconds
@@ -2083,10 +2080,10 @@ typedef struct {
   /** List of configuration lines for replacement directory authorities.
    * If you just want to replace one class of authority at a time,
    * use the "Alternate*Authority" options below instead. */
-  config_line_t *DirAuthorities;
+  struct config_line_t *DirAuthorities;
 
   /** List of fallback directory servers */
-  config_line_t *FallbackDir;
+  struct config_line_t *FallbackDir;
   /** Whether to use the default hard-coded FallbackDirs */
   int UseDefaultFallbackDirs;
 
@@ -2096,21 +2093,22 @@ typedef struct {
 
   /** If set, use these main (currently v3) directory authorities and
    * not the default ones. */
-  config_line_t *AlternateDirAuthority;
+  struct config_line_t *AlternateDirAuthority;
 
   /** If set, use these bridge authorities and not the default one. */
-  config_line_t *AlternateBridgeAuthority;
+  struct config_line_t *AlternateBridgeAuthority;
 
-  config_line_t *MyFamily_lines; /**< Declared family for this OR. */
-  config_line_t *MyFamily; /**< Declared family for this OR, normalized */
-  config_line_t *NodeFamilies; /**< List of config lines for
+  struct config_line_t *MyFamily_lines; /**< Declared family for this OR. */
+  struct config_line_t *MyFamily; /**< Declared family for this OR,
+                                     normalized */
+  struct config_line_t *NodeFamilies; /**< List of config lines for
                                 * node families */
   smartlist_t *NodeFamilySets; /**< List of parsed NodeFamilies values. */
-  config_line_t *AuthDirBadExit; /**< Address policy for descriptors to
+  struct config_line_t *AuthDirBadExit; /**< Address policy for descriptors to
                                   * mark as bad exits. */
-  config_line_t *AuthDirReject; /**< Address policy for descriptors to
+  struct config_line_t *AuthDirReject; /**< Address policy for descriptors to
                                  * reject. */
-  config_line_t *AuthDirInvalid; /**< Address policy for descriptors to
+  struct config_line_t *AuthDirInvalid; /**< Address policy for descriptors to
                                   * never mark as valid. */
   /** @name AuthDir...CC
    *
@@ -2153,9 +2151,9 @@ typedef struct {
   enum { ACCT_MAX, ACCT_SUM, ACCT_IN, ACCT_OUT } AccountingRule;
 
   /** Base64-encoded hash of accepted passwords for the control system. */
-  config_line_t *HashedControlPassword;
+  struct config_line_t *HashedControlPassword;
   /** As HashedControlPassword, but not saved. */
-  config_line_t *HashedControlSessionPassword;
+  struct config_line_t *HashedControlSessionPassword;
 
   int CookieAuthentication; /**< Boolean: do we enable cookie-based auth for
                              * the control system? */
@@ -2767,15 +2765,15 @@ typedef struct {
   uint64_t AccountingExpectedUsage;
 
   /** A list of Entry Guard-related configuration lines. (pre-prop271) */
-  config_line_t *EntryGuards;
+  struct config_line_t *EntryGuards;
 
   /** A list of guard-related configuration lines. (post-prop271) */
-  config_line_t *Guard;
+  struct config_line_t *Guard;
 
-  config_line_t *TransportProxies;
+  struct config_line_t *TransportProxies;
 
   /** Cached revision counters for active hidden services on this host */
-  config_line_t *HidServRevCounter;
+  struct config_line_t *HidServRevCounter;
 
   /** These fields hold information on the history of bandwidth usage for
    * servers.  The "Ends" fields hold the time when we last updated the
@@ -2803,7 +2801,7 @@ typedef struct {
   smartlist_t *BWHistoryDirWriteMaxima;
 
   /** Build time histogram */
-  config_line_t * BuildtimeHistogram;
+  struct config_line_t * BuildtimeHistogram;
   int TotalBuildTimes;
   int CircuitBuildAbandonedCount;
 
@@ -2812,7 +2810,7 @@ typedef struct {
 
   /** Holds any unrecognized values we found in the state file, in the order
    * in which we found them. */
-  config_line_t *ExtraLines;
+  struct config_line_t *ExtraLines;
 
   /** When did we last rotate our onion key?  "0" for 'no idea'. */
   time_t LastRotatedOnionKey;
index eba2721c3766081876bbea8117277a13778dd9da..dbfe7528b0e8dbcbd459d6d34436a3b998491ccb 100644 (file)
@@ -8,6 +8,9 @@
 #define OR_CONNECTION_ST_H
 
 #include "or/connection_st.h"
+#include "common/token_bucket.h"
+
+struct tor_tls_t;
 
 /** Subtype of connection_t for an "OR connection" -- that is, one that speaks
  * cells over TLS. */
@@ -33,7 +36,7 @@ struct or_connection_t {
 
   char *nickname; /**< Nickname of OR on other side (if any). */
 
-  tor_tls_t *tls; /**< TLS connection state. */
+  struct tor_tls_t *tls; /**< TLS connection state. */
   int tls_error; /**< Last tor_tls error code. */
   /** When we last used this conn for any client traffic. If not
    * recent, we can rate limit it further. */
@@ -87,4 +90,3 @@ struct or_connection_t {
 };
 
 #endif
-
index f05dd92617f8e5dc67be8f0d742271e61c774c85..38e798b5e2db01b8da3e5cd21bd01ace3bcb0188 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef OR_HANDSHAKE_CERTS_ST
 #define OR_HANDSHAKE_CERTS_ST
 
+struct tor_x509_cert_t;
+
 /** Structure to hold all the certificates we've received on an OR connection
  */
 struct or_handshake_certs_t {
@@ -14,13 +16,13 @@ struct or_handshake_certs_t {
   int started_here;
   /** The cert for the 'auth' RSA key that's supposed to sign the AUTHENTICATE
    * cell. Signed with the RSA identity key. */
-  tor_x509_cert_t *auth_cert;
+  struct tor_x509_cert_t *auth_cert;
   /** The cert for the 'link' RSA key that was used to negotiate the TLS
    *  connection.  Signed with the RSA identity key. */
-  tor_x509_cert_t *link_cert;
+  struct tor_x509_cert_t *link_cert;
   /** A self-signed identity certificate: the RSA identity key signed
    * with itself.  */
-  tor_x509_cert_t *id_cert;
+  struct tor_x509_cert_t *id_cert;
   /** The Ed25519 signing key, signed with the Ed25519 identity key. */
   struct tor_cert_st *ed_id_sign;
   /** A digest of the X509 link certificate for the TLS connection, signed
@@ -36,4 +38,3 @@ struct or_handshake_certs_t {
 };
 
 #endif
-
index d379325f507ef3a9b37916e0fcb7c9b92c18e7de..0cbf359b2e31adf76f8e3da9f0530faeb41be6aa 100644 (file)
@@ -16,6 +16,7 @@
 #include "or/config.h"
 #include "or/main.h"
 #include "or/periodic.h"
+#include "common/compat_libevent.h"
 
 /** We disable any interval greater than this number of seconds, on the
  * grounds that it is probably an absolute time mistakenly passed in as a
@@ -169,4 +170,3 @@ periodic_event_disable(periodic_event_item_t *event)
   mainloop_event_cancel(event->ev);
   event->enabled = 0;
 }
-
index 0f52d6bf154bf653078a3116eb1419d3e724a96d..78bf369cb61b61d3da7b23b34323b5db4d7f943c 100644 (file)
@@ -29,6 +29,7 @@
 #include "or/routerparse.h"
 #include "or/geoip.h"
 #include "ht.h"
+#include "lib/encoding/confline.h"
 
 #include "or/dir_server_st.h"
 #include "or/microdesc_st.h"
@@ -3143,4 +3144,3 @@ policies_free_all(void)
   }
   HT_CLEAR(policy_map, &policy_root);
 }
-
index d4379c0e7a064763b1aa394ac205dbbbd6e0ce00..fa55f1cb12829c854e8be2a7344b7a4e9f19b285 100644 (file)
@@ -88,7 +88,7 @@ int policies_parse_exit_policy_from_options(
                                           uint32_t local_address,
                                           const tor_addr_t *ipv6_local_address,
                                           smartlist_t **result);
-int policies_parse_exit_policy(config_line_t *cfg, smartlist_t **dest,
+int policies_parse_exit_policy(struct config_line_t *cfg, smartlist_t **dest,
                                exit_policy_parser_cfg_t options,
                                const smartlist_t *configured_addresses);
 void policies_parse_exit_policy_reject_private(
@@ -151,4 +151,3 @@ STATIC const tor_addr_port_t * fascist_firewall_choose_address(
 #endif /* defined(POLICIES_PRIVATE) */
 
 #endif /* !defined(TOR_POLICIES_H) */
-
index b9b7a7db8b93dbdde0e39b5d6b2425b95430405f..13523476ccda9725b13212b984de4561a7c04f64 100644 (file)
@@ -17,6 +17,7 @@
 #include "or/or.h"
 #include "or/config.h"
 #include "or/reasons.h"
+#include "lib/tls/tortls.h"
 
 /***************************** Edge (stream) reasons **********************/
 
@@ -493,4 +494,3 @@ end_reason_to_http_connect_response_line(int endreason)
       return "HTTP/1.0 500 Internal Server Error (weird end reason)\r\n\r\n";
   }
 }
-
index 6682cd86f4f14bcc260752321572ebd0da242878..1fcfae0b3a3f7e5e8730ad1949193bd3e9201f0d 100644 (file)
@@ -7,6 +7,7 @@
 #include "or/or.h"
 #include "or/circuitlist.h"
 #include "or/config.h"
+#include "lib/crypt_ops/crypto.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "or/hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN
 #include "or/relay.h"
@@ -329,4 +330,3 @@ relay_crypto_assert_ok(const relay_crypto_t *crypto)
   tor_assert(crypto->f_digest);
   tor_assert(crypto->b_digest);
 }
-
index 4e23f4e40477762cf557e9c719cc976cb1f531b2..f186e182f09b4c3dd870badaac6b75ca603a6e6e 100644 (file)
@@ -7,21 +7,25 @@
 #ifndef RELAY_CRYPTO_ST_H
 #define RELAY_CRYPTO_ST_H
 
+#define crypto_cipher_t aes_cnt_cipher
+struct crypto_cipher_t;
+struct crypto_digest_t;
+
 struct relay_crypto_t {
   /* crypto environments */
   /** Encryption key and counter for cells heading towards the OR at this
    * step. */
-  crypto_cipher_t *f_crypto;
+  struct crypto_cipher_t *f_crypto;
   /** Encryption key and counter for cells heading back from the OR at this
    * step. */
-  crypto_cipher_t *b_crypto;
+  struct crypto_cipher_t *b_crypto;
 
   /** Digest state for cells heading towards the OR at this step. */
-  crypto_digest_t *f_digest; /* for integrity checking */
+  struct crypto_digest_t *f_digest; /* for integrity checking */
   /** Digest state for cells heading away from the OR at this step. */
-  crypto_digest_t *b_digest;
+  struct crypto_digest_t *b_digest;
 
 };
+#undef crypto_cipher_t
 
 #endif
-
index f707c7aaaf34186c4bfd1d3e46e67e0f7dc65af4..89fe5ef2b36960c89efeae22061a64de61e5a70e 100644 (file)
@@ -7,14 +7,17 @@
 #ifndef REND_INTRO_POINT_ST_H
 #define REND_INTRO_POINT_ST_H
 
+struct replaycache_t;
+struct crypto_pk_t;
+
 /** Introduction point information.  Used both in rend_service_t (on
  * the service side) and in rend_service_descriptor_t (on both the
  * client and service side). */
 struct rend_intro_point_t {
   extend_info_t *extend_info; /**< Extend info for connecting to this
                                * introduction point via a multi-hop path. */
-  crypto_pk_t *intro_key; /**< Introduction key that replaces the service
-                               * key, if this descriptor is V2. */
+  struct crypto_pk_t *intro_key; /**< Introduction key that replaces the
+                                  * service key, if this descriptor is V2. */
 
   /** (Client side only) Flag indicating that a timeout has occurred
    * after sending an INTRODUCE cell to this intro point.  After a
@@ -35,7 +38,7 @@ struct rend_intro_point_t {
   /** (Service side only) A replay cache recording the RSA-encrypted parts
    * of INTRODUCE2 cells this intro point's circuit has received.  This is
    * used to prevent replay attacks. */
-  replaycache_t *accepted_intro_rsa_parts;
+  struct replaycache_t *accepted_intro_rsa_parts;
 
   /** (Service side only) Count of INTRODUCE2 cells accepted from this
    * intro point.
@@ -71,4 +74,3 @@ struct rend_intro_point_t {
 };
 
 #endif
-
index b7145745630b109341e52db61f5992cf17ac0969..d4262f2f38c1fe49acad0f8ebd216891b079f6fb 100644 (file)
@@ -16,6 +16,7 @@
 #include "or/connection.h"
 #include "or/connection_edge.h"
 #include "or/control.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "or/directory.h"
@@ -32,6 +33,7 @@
 #include "or/router.h"
 #include "or/routerlist.h"
 #include "or/routerset.h"
+#include "lib/encoding/confline.h"
 
 #include "or/cpath_build_state_st.h"
 #include "or/crypt_path_st.h"
@@ -1253,4 +1255,3 @@ rend_client_non_anonymous_mode_enabled(const or_options_t *options)
   return 0;
 #endif /* defined(NON_ANONYMOUS_MODE_ENABLED) */
 }
-
index 1eadbd602c3fff94c5fdf55bb3528b0b4a1fa3e8..928dda012847194a170cd9cb09f2d2a18a0facfc 100644 (file)
@@ -27,6 +27,7 @@
 #include "or/rendmid.h"
 #include "or/rendservice.h"
 #include "or/rephist.h"
+#include "or/replaycache.h"
 #include "or/router.h"
 #include "or/routerlist.h"
 #include "or/routerparse.h"
@@ -1053,4 +1054,3 @@ rend_circuit_pk_digest_eq(const origin_circuit_t *ocirc,
  match:
   return 1;
 }
-
index f55b9b776cd854d77df6046b09ae9a4ff1a3c6e5..e5ddb11025f273b1d7697c3043637067c09fdf3e 100644 (file)
@@ -35,6 +35,7 @@
 #include "or/routerlist.h"
 #include "or/routerparse.h"
 #include "or/routerset.h"
+#include "lib/encoding/confline.h"
 
 #include "or/cpath_build_state_st.h"
 #include "or/crypt_path_st.h"
@@ -4437,4 +4438,3 @@ set_rend_rend_service_staging_list(smartlist_t *new_list)
 }
 
 #endif /* defined(TOR_UNIT_TESTS) */
-
index a9b3689d2b2877ddff8761a615189eb69bbb4a2d..0b119e61d985adaff0b8ba92678b83b91bd58b0b 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "or/or.h"
 #include "or/hs_service.h"
+#include "lib/crypt_ops/crypto_dh.h"
 
 typedef struct rend_intro_cell_s rend_intro_cell_t;
 
@@ -138,7 +139,7 @@ STATIC void rend_service_prune_list_impl_(void);
 #endif /* defined(RENDSERVICE_PRIVATE) */
 
 int rend_num_services(void);
-int rend_config_service(const config_line_t *line_,
+int rend_config_service(const struct config_line_t *line_,
                         const or_options_t *options,
                         hs_service_config_t *config);
 void rend_service_prune_list(void);
@@ -218,4 +219,3 @@ int rend_service_reveal_startup_time(const or_options_t *options);
 int rend_service_non_anonymous_mode_enabled(const or_options_t *options);
 
 #endif /* !defined(TOR_RENDSERVICE_H) */
-
index d8a9929120de0145234007b27add6ebfbfe3bd3a..3118a88a1ab7c9c7add23d4b4e6e0b41a2a4c7bf 100644 (file)
@@ -9,11 +9,11 @@
 #ifndef TOR_REPLAYCACHE_H
 #define TOR_REPLAYCACHE_H
 
-typedef struct replaycache_s replaycache_t;
+typedef struct replaycache_t replaycache_t;
 
 #ifdef REPLAYCACHE_PRIVATE
 
-struct replaycache_s {
+struct replaycache_t {
   /* Scrub interval */
   time_t scrub_interval;
   /* Last scrubbed */
@@ -65,4 +65,3 @@ int replaycache_add_test_and_elapsed(
 void replaycache_scrub_if_needed(replaycache_t *r);
 
 #endif /* !defined(TOR_REPLAYCACHE_H) */
-
index c7fed1f02109f47d83363a983f7ce8a28272fa31..091809a22f23713f3b9c82d38e002bb90f5fecf3 100644 (file)
@@ -51,6 +51,8 @@
 #include "or/routerinfo_st.h"
 
 #include "lib/osinfo/uname.h"
+#include "lib/tls/tortls.h"
+#include "lib/encoding/confline.h"
 
 /**
  * \file router.c
index b6d4d83d6ed4c4f291e49d2bcc75bcb6ec4cf181..d6e7c752cd860f053c65a0fe5b1821b0dba0f1d4 100644 (file)
 
 #include "or/or.h"
 #include "or/config.h"
-#include "lib/crypt_ops/crypto_util.h"
 #include "or/router.h"
-#include "lib/crypt_ops/crypto_pwbox.h"
 #include "or/routerkeys.h"
 #include "or/torcert.h"
+
+#include "lib/crypt_ops/crypto_pwbox.h"
+#include "lib/crypt_ops/crypto_util.h"
 #include "lib/term/getpass.h"
+#include "lib/tls/tortls.h"
 
 #define ENC_KEY_HEADER "Boxed Ed25519 key"
 #define ENC_KEY_TAG "master"
index 960972de862f945a16f1a99596631207535c2e6e..7c423064c7fae3a1be0fa8e0ccb536c8c3fe4cf1 100644 (file)
@@ -12,6 +12,7 @@
 #include "lib/container/buffers.h"
 #define TOR_CHANNEL_INTERNAL_
 #include "or/channeltls.h"
+#include "common/compat_libevent.h"
 
 #include "or/or_connection_st.h"
 
@@ -765,4 +766,3 @@ scheduler_touch_channel(channel_t *chan)
 }
 
 #endif /* defined(TOR_UNIT_TESTS) */
-
index 80c56b2d52d8a572833709a98e156af3fbddc4ba..090e29a189b9cd92ed1cfca72e1b0166baa06e9d 100644 (file)
@@ -42,6 +42,7 @@
 #include "or/router.h"
 #include "lib/sandbox/sandbox.h"
 #include "or/statefile.h"
+#include "lib/encoding/confline.h"
 
 /** A list of state-file "abbreviations," for compatibility. */
 static config_abbrev_t state_abbrevs_[] = {
@@ -708,4 +709,3 @@ or_state_free_all(void)
   or_state_free(global_state);
   global_state = NULL;
 }
-
index ed21dd14e7e0ae7daff2335995b35a619eaa559c..e996d5b6e63d97494099827f3c30e3beed7ec2d0 100644 (file)
@@ -20,11 +20,11 @@ void or_state_free_all(void);
 void or_state_mark_dirty(or_state_t *state, time_t when);
 
 #ifdef STATEFILE_PRIVATE
-STATIC config_line_t *get_transport_in_state_by_name(const char *transport);
+STATIC struct config_line_t *get_transport_in_state_by_name(
+                                                 const char *transport);
 STATIC void or_state_free_(or_state_t *state);
 #define or_state_free(st) FREE_AND_NULL(or_state_t, or_state_free_, (st))
 STATIC or_state_t *or_state_new(void);
 #endif
 
 #endif /* !defined(TOR_STATEFILE_H) */
-
index d0b3bc5536e6c156d5ab1b2103c9696acb61cf3b..2cb1dc7348fa8bb5fac5ca33c1108662d9c54b03 100644 (file)
@@ -31,6 +31,7 @@
 #include "or/dos.h"
 
 #include "or/routerinfo_st.h"
+#include "lib/tls/tortls.h"
 
 static void log_accounting(const time_t now, const or_options_t *options);
 #include "or/geoip.h"
@@ -247,4 +248,3 @@ log_accounting(const time_t now, const or_options_t *options)
   tor_free(acc_max);
   tor_free(remaining);
 }
-
index 785132c1748b83dfeb0635186e1629d7ac377075..27bdb34331480170741532657c133c656bdf6306 100644 (file)
@@ -33,6 +33,7 @@
 #include "lib/log/torlog.h"
 #include "common/util.h"
 #include "trunnel/link_handshake.h"
+#include "lib/tls/tortls.h"
 
 #include "or/or_handshake_certs_st.h"
 
@@ -723,4 +724,3 @@ tor_cert_encode_ed22519(const tor_cert_t *cert, char **cert_str_out)
   tor_free(ed_cert_b64);
   return ret;
 }
-
index ba5787934b4317b2b3c76d1a584613971aed4d7a..5fa97679dfd99adaa98dd32ee36589505d9fa69f 100644 (file)
@@ -49,6 +49,8 @@ typedef struct tor_cert_st {
   unsigned cert_valid : 1;
 } tor_cert_t;
 
+struct tor_tls_t;
+
 tor_cert_t *tor_cert_create(const ed25519_keypair_t *signing_key,
                             uint8_t cert_type,
                             const ed25519_public_key_t *signed_key,
@@ -90,15 +92,15 @@ void or_handshake_certs_free_(or_handshake_certs_t *certs);
   FREE_AND_NULL(or_handshake_certs_t, or_handshake_certs_free_, (certs))
 int or_handshake_certs_rsa_ok(int severity,
                               or_handshake_certs_t *certs,
-                              tor_tls_t *tls,
+                              struct tor_tls_t *tls,
                               time_t now);
 int or_handshake_certs_ed25519_ok(int severity,
                                   or_handshake_certs_t *certs,
-                                  tor_tls_t *tls,
+                                  struct tor_tls_t *tls,
                                   time_t now);
 void or_handshake_certs_check_both(int severity,
                               or_handshake_certs_t *certs,
-                              tor_tls_t *tls,
+                              struct tor_tls_t *tls,
                               time_t now,
                               const ed25519_public_key_t **ed_id_out,
                               const common_digests_t **rsa_id_out);
@@ -106,4 +108,3 @@ void or_handshake_certs_check_both(int severity,
 int tor_cert_encode_ed22519(const tor_cert_t *cert, char **cert_str_out);
 
 #endif /* !defined(TORCERT_H_INCLUDED) */
-
index f46eeef7fbefbe8482829fe65167f730888f75cf..427ebd81450de3baf3b310b144c4fb704c5b0d33 100644 (file)
 
 #include "or/config.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "or/onion_ntor.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "or/consdiff.h"
+#include "lib/compress/compress.h"
 
 #include "or/cell_st.h"
 #include "or/or_circuit_st.h"
index 9e736ea69d43064b08e017a99e1649793f66e1ca..c947ebfcebbab30020d9b0017da062229364291f 100644 (file)
@@ -6,6 +6,7 @@
 #include "lib/err/backtrace.h"
 #include "or/config.h"
 #include "test/fuzz/fuzzing.h"
+#include "lib/compress/compress.h"
 #include "lib/crypt_ops/crypto.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 
@@ -189,4 +190,3 @@ main(int argc, char **argv)
 }
 
 #endif
-
index d36c47a07d6f12d6a44f6ae11242943709c5b7f8..64332e2645dad6f81af34a0dbbb5f1399a998180 100644 (file)
@@ -9,6 +9,7 @@
  **/
 
 #include "orconfig.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_rand.h"
 
 #include <stdio.h>
index 66ee99722583ed8010b72b3177e9c4dfc57cc819..604f1422c11ce9d25c5b1411e665e7f987b277fc 100644 (file)
@@ -8,6 +8,8 @@
 #include "or/or.h"
 #include "lib/container/buffers.h"
 #include "lib/tls/buffers_tls.h"
+#include "lib/tls/tortls.h"
+#include "lib/compress/compress.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "or/proto_http.h"
 #include "or/proto_socks.h"
@@ -819,4 +821,3 @@ struct testcase_t buffer_tests[] = {
 
   END_OF_TESTCASES
 };
-
index 844fa4a16c6445031ff574bfe8f3871e2967481d..da5e5defd17856271064f2789228bd94a4916708 100644 (file)
@@ -1302,4 +1302,3 @@ struct testcase_t cell_format_tests[] = {
   TEST(is_destroy, 0),
   END_OF_TESTCASES
 };
-
index 4ae7e1636107075ce99e243a0ae28ae73914780f..ec29c1d30a90037d4dd28d2b9f2099efeae05f53 100644 (file)
@@ -19,6 +19,7 @@
 #include "or/main.h"
 #include "or/networkstatus.h"
 #include "test/log_test_helpers.h"
+#include "lib/tls/tortls.h"
 
 #include "or/cell_st.h"
 #include "or/networkstatus_st.h"
@@ -1168,4 +1169,3 @@ struct testcase_t channelpadding_tests[] = {
   TEST_CHANNELPADDING(channelpadding_timers, TT_FORK),
   END_OF_TESTCASES
 };
-
index 1138989826f79a0a7ab589371d295dd5c3e64071..d84cac4e917f1e7cbf652ca26190c7885c40a7b6 100644 (file)
@@ -51,6 +51,7 @@
 #include "lib/fs/conffile.h"
 #include "lib/meminfo/meminfo.h"
 #include "lib/net/gethostname.h"
+#include "lib/encoding/confline.h"
 
 static void
 test_config_addressmap(void *arg)
index e3a617fe3e3d947e8842bdd0534b030d6708b4ee..3d3a50297bb02175c2c476d06c4e99bd37735164 100644 (file)
@@ -4,6 +4,7 @@
 #include "or/or.h"
 #include "or/config.h"
 #include "or/conscache.h"
+#include "lib/encoding/confline.h"
 #include "test/test.h"
 
 #ifdef HAVE_UTIME_H
@@ -337,4 +338,3 @@ struct testcase_t conscache_tests[] = {
   ENT(filter),
   END_OF_TESTCASES
 };
-
index c09586afcc958fbfa7a118d7e071d21d54bfe264..a0dfe95d354e4a3ed93785f7a01a9665026885b0 100644 (file)
@@ -13,6 +13,8 @@
 #include "or/networkstatus.h"
 #include "or/routerparse.h"
 #include "common/workqueue.h"
+#include "lib/compress/compress.h"
+#include "lib/encoding/confline.h"
 
 #include "or/networkstatus_st.h"
 
@@ -896,4 +898,3 @@ struct testcase_t consdiffmgr_tests[] = {
 
   END_OF_TESTCASES
 };
-
index a85d036e36b07b4b5a448eee8ed0d5fd659c8871..eb4b36f08d53eeea97875678d6612bdacac3d0ee 100644 (file)
@@ -12,7 +12,9 @@
 #include "common/util.h"
 #include "siphash.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
+#include "lib/crypt_ops/crypto_hkdf.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "ed25519_vectors.inc"
 
index 498ecf942e262ce847cf0515557bc813aba09e37..5891f1c9e4142ce73c9f748c177354f03f3b1e5c 100644 (file)
@@ -45,6 +45,7 @@
 #include "or/relay.h"
 #include "test/log_test_helpers.h"
 #include "or/voting_schedule.h"
+#include "lib/compress/compress.h"
 
 #include "or/authority_cert_st.h"
 #include "or/document_signature_st.h"
index d6ac5e1d381737fa8f69496885ed75a83f7f7fdb..b23f12087e569b7d2fdd20c188aee3f2bf59d215 100644 (file)
@@ -22,6 +22,8 @@
 #include "or/entry_connection_st.h"
 #include "or/socks_request_st.h"
 
+#include "lib/encoding/confline.h"
+
 static void *
 entryconn_rewrite_setup(const struct testcase_t *tc)
 {
@@ -833,4 +835,3 @@ struct testcase_t entryconn_tests[] = {
 
   END_OF_TESTCASES
 };
-
index 4d37d0fe8846bd641c6d39151d18843cb18914b9..f0d649330d61a0f5934a3afee99d43fa289fd9a4 100644 (file)
@@ -44,6 +44,7 @@
 #include "test/log_test_helpers.h"
 
 #include "lib/container/bloomfilt.h"
+#include "lib/encoding/confline.h"
 
 /* TODO:
  * choose_random_entry() test with state set.
index ba279c790b4e5554859d777d38292234240b24b2..6d410af5262e23640ade9fd39caecefc94f22d89 100644 (file)
@@ -23,6 +23,7 @@
 #include "or/nodelist.h"
 #include "or/relay.h"
 #include "or/routerlist.h"
+#include "lib/encoding/confline.h"
 
 #include "or/cell_st.h"
 #include "or/connection_st.h"
@@ -282,4 +283,3 @@ helper_parse_options(const char *conf)
   }
   return opt;
 }
-
index 3a4d35431e3b214fe36323b8d245277dcb2be8db..b5cb9bb912020f74c5547b27748403960e1d6b23 100644 (file)
 
 #include "or/config.h"
 #include "lib/crypt_ops/crypto.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "or/channeltls.h"
 #include "or/main.h"
 #include "or/nodelist.h"
 #include "or/routerset.h"
 
 #include "or/hs_circuit.h"
+#include "or/hs_circuitmap.h"
 #include "or/hs_client.h"
 #include "or/hs_ident.h"
 #include "or/hs_cache.h"
@@ -609,4 +611,3 @@ struct testcase_t hs_client_tests[] = {
     TT_FORK, NULL, NULL },
   END_OF_TESTCASES
 };
-
index 684ac98f420a4c7c89f0f3a49b187031904afce2..3ea1e753009bff7976502bd0f86559dfa2513d25 100644 (file)
@@ -45,6 +45,7 @@
 #include "or/hs_intropoint.h"
 #include "or/hs_ntor.h"
 #include "or/hs_circuit.h"
+#include "or/hs_circuitmap.h"
 #include "or/hs_service.h"
 #include "or/hs_client.h"
 #include "or/main.h"
@@ -1634,4 +1635,3 @@ struct testcase_t hs_service_tests[] = {
 
   END_OF_TESTCASES
 };
-
index ffb6c47b1e9e0e22c25d8f77358d2afc7bca3243..515fdc50a734d2bc9e41357f6280dd3a10a033a4 100644 (file)
@@ -24,6 +24,8 @@
 #include "or/or_handshake_state_st.h"
 #include "or/var_cell_st.h"
 
+#include "lib/tls/tortls.h"
+
 #include "test/test.h"
 #include "test/log_test_helpers.h"
 
index ab8727c3dbe1e23ce52aecbe7c32b87f2b8195b4..76d95349cd28d70e53ea0d0e2a7b32b766896a96 100644 (file)
@@ -18,6 +18,7 @@
 #include "lib/sandbox/sandbox.h"
 #include "lib/memarea/memarea.h"
 #include "lib/osinfo/uname.h"
+#include "lib/encoding/confline.h"
 #include "or/policies.h"
 #include "test/test_helpers.h"
 
index 2c29bbb16ab01af12cb0c5ffaa32d1c411cccf2b..a723e82eb08eb8a752722b4c8f926725217496c3 100644 (file)
@@ -8,6 +8,7 @@
 #include "or/routerparse.h"
 #define POLICIES_PRIVATE
 #include "or/policies.h"
+#include "lib/encoding/confline.h"
 #include "test/test.h"
 
 #include "or/node_st.h"
@@ -2450,4 +2451,3 @@ struct testcase_t policy_tests[] = {
     test_policies_fascist_firewall_choose_address, 0, NULL, NULL },
   END_OF_TESTCASES
 };
-
index c2c4e1989760cb1fc631ea01b2ff9afb0aaf375a..08704050649e033eb2ec21c0e08e761707e66d3f 100644 (file)
@@ -19,6 +19,7 @@
 #include "or/statefile.h"
 #include "test/test.h"
 #include "lib/process/subprocess.h"
+#include "lib/encoding/confline.h"
 
 static void
 reset_mp(managed_proxy_t *mp)
index 5da42c133957a6e90f5517af258c0100a403391d..8fbe27cecd6cebff504bc8771665f1d43d90e779 100644 (file)
@@ -39,6 +39,8 @@
 #include "or/node_st.h"
 #include "or/routerstatus_st.h"
 
+#include "lib/encoding/confline.h"
+
 #include "test/test.h"
 #include "test/test_dir_common.h"
 #include "test/log_test_helpers.h"
@@ -782,4 +784,3 @@ struct testcase_t routerlist_tests[] = {
   { "warn_early_consensus", test_warn_early_consensus, 0, NULL, NULL },
   END_OF_TESTCASES
 };
-
index 09b9662b4cae894a0d085cb191115ffd28702302..071b3ba8a7df7b62211828c238e3295086309b35 100644 (file)
@@ -24,6 +24,7 @@
 #include "or/main.h"
 #include "or/nodelist.h"
 #include "or/statefile.h"
+#include "lib/tls/tortls.h"
 
 #include "or/origin_circuit_st.h"
 #include "or/routerinfo_st.h"
@@ -1097,4 +1098,3 @@ struct testcase_t status_tests[] = {
   TEST_CASE_ASPECT(log_heartbeat, tls_write_overhead),
   END_OF_TESTCASES
 };
-
index d07d35e0966721e59ca836c01b4135926da22143..efb6a0027ad7907668f5fa6ab3b00325cf9b6675 100644 (file)
@@ -4,6 +4,7 @@
 #include "or/or.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/fs/storagedir.h"
+#include "lib/encoding/confline.h"
 #include "test/test.h"
 
 #ifdef HAVE_UTIME_H
@@ -373,4 +374,3 @@ struct testcase_t storagedir_tests[] = {
   ENT(read_labeled),
   END_OF_TESTCASES
 };
-
index 7f37a2ab9c170fc6ee11cd1913d5d960d77d09e8..6d0162e6e181deb3ec21fdfb6f9bd59359891928 100644 (file)
@@ -22,6 +22,7 @@
 #include "lib/memarea/memarea.h"
 #include "lib/process/waitpid.h"
 #include "test/log_test_helpers.h"
+#include "lib/compress/compress.h"
 #include "lib/compress/compress_zstd.h"
 #include "lib/encoding/keyval.h"
 #include "lib/fdio/fdio.h"
@@ -35,6 +36,7 @@
 #include "lib/math/laplace.h"
 #include "lib/meminfo/meminfo.h"
 #include "lib/time/tvdiff.h"
+#include "lib/encoding/confline.h"
 
 #ifdef HAVE_PWD_H
 #include <pwd.h>
index 3baeb980318a2026950488aa48ed4dace3e74d80..879382ce2be4dbe021623bc31844c992d3e02ed9 100644 (file)
 #include "or/or.h"
 #include "or/control.h"
 #include "or/config.h"
+#include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "or/rephist.h"
 #include "lib/err/backtrace.h"
 #include "test/test.h"
 #include "or/channelpadding.h"
 #include "or/main.h"
+#include "lib/compress/compress.h"
+#include "common/compat_libevent.h"
 
 #include <stdio.h>
 #ifdef HAVE_FCNTL_H