summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-05 15:04:18 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-05 15:04:18 -0400
commit459382986102dd1bd84bca24a0fddfe04efefd76 (patch)
tree2c0de91fc434a812acf9ce3bfccb93cb2f306fa2 /src/or
parent0adcfbc7c8b579ebfe4c16c86700e8b466fc9a56 (diff)
downloadtor-459382986102dd1bd84bca24a0fddfe04efefd76.tar.gz
tor-459382986102dd1bd84bca24a0fddfe04efefd76.zip
Remove util.h
Inline its contents (which were all includes) into or.h, and some of its contents into other places that didn't include or.h at all.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c1
-rw-r--r--src/or/dirauth/shared_random.c1
-rw-r--r--src/or/ext_orport.c1
-rw-r--r--src/or/hs_cell.c1
-rw-r--r--src/or/keypin.c25
-rw-r--r--src/or/onion_ntor.c11
-rw-r--r--src/or/or.h38
-rw-r--r--src/or/shared_random_client.c1
-rw-r--r--src/or/torcert.c1
-rw-r--r--src/or/transports.c1
10 files changed, 63 insertions, 18 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 13002dd963..6dc2ad1d5b 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -99,7 +99,6 @@
#include "or/rephist.h"
#include "or/router.h"
#include "lib/sandbox/sandbox.h"
-#include "common/util.h"
#include "or/routerlist.h"
#include "or/routerset.h"
#include "or/scheduler.h"
diff --git a/src/or/dirauth/shared_random.c b/src/or/dirauth/shared_random.c
index 8b53c1e743..d122690129 100644
--- a/src/or/dirauth/shared_random.c
+++ b/src/or/dirauth/shared_random.c
@@ -99,7 +99,6 @@
#include "or/routerlist.h"
#include "or/shared_random_client.h"
#include "or/dirauth/shared_random_state.h"
-#include "common/util.h"
#include "or/voting_schedule.h"
#include "or/dirauth/dirvote.h"
diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c
index 701dc45288..7342a66e06 100644
--- a/src/or/ext_orport.c
+++ b/src/or/ext_orport.c
@@ -27,7 +27,6 @@
#include "or/ext_orport.h"
#include "or/main.h"
#include "or/proto_ext_or.h"
-#include "common/util.h"
#include "or/or_connection_st.h"
diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c
index b50c87dfa3..f8b76c5133 100644
--- a/src/or/hs_cell.c
+++ b/src/or/hs_cell.c
@@ -11,7 +11,6 @@
#include "lib/crypt_ops/crypto_util.h"
#include "or/rendservice.h"
#include "or/replaycache.h"
-#include "common/util.h"
#include "or/hs_cell.h"
#include "or/hs_ntor.h"
diff --git a/src/or/keypin.c b/src/or/keypin.c
index 34cf64f5c4..a2f3654b82 100644
--- a/src/or/keypin.c
+++ b/src/or/keypin.c
@@ -11,17 +11,28 @@
#define KEYPIN_PRIVATE
#include "orconfig.h"
+
+#include "lib/cc/torint.h"
#include "lib/crypt_ops/crypto_digest.h"
#include "lib/crypt_ops/crypto_format.h"
+#include "lib/crypt_ops/crypto_format.h"
+#include "lib/ctime/di_ops.h"
#include "lib/ctime/di_ops.h"
+#include "lib/encoding/binascii.h"
+#include "lib/encoding/time_fmt.h"
+#include "lib/fdio/fdio.h"
+#include "lib/fs/files.h"
+#include "lib/fs/mmap.h"
+#include "lib/log/torlog.h"
+#include "lib/log/util_bug.h"
+#include "lib/string/compat_ctype.h"
+#include "lib/string/printf.h"
+#include "lib/wallclock/approx_time.h"
+
#include "ht.h"
#include "or/keypin.h"
+
#include "siphash.h"
-#include "lib/cc/torint.h"
-#include "lib/log/torlog.h"
-#include "lib/fdio/fdio.h"
-#include "common/util.h"
-#include "lib/encoding/binascii.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -34,6 +45,10 @@
#include <io.h>
#endif
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+
/**
* @file keypin.c
* @brief Key-pinning for RSA and Ed25519 identity keys at directory
diff --git a/src/or/onion_ntor.c b/src/or/onion_ntor.c
index 34b1112020..59c923cb97 100644
--- a/src/or/onion_ntor.c
+++ b/src/or/onion_ntor.c
@@ -21,14 +21,17 @@
#include "orconfig.h"
#define ONION_NTOR_PRIVATE
+
#include "lib/crypt_ops/crypto.h"
-#include "lib/crypt_ops/crypto_hkdf.h"
#include "lib/crypt_ops/crypto_digest.h"
+#include "lib/crypt_ops/crypto_hkdf.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/onion_ntor.h"
-#include "lib/log/torlog.h"
#include "lib/ctime/di_ops.h"
-#include "common/util.h"
+#include "lib/log/torlog.h"
+#include "lib/log/util_bug.h"
+#include "or/onion_ntor.h"
+
+#include <string.h>
/** Free storage held in an ntor handshake state. */
void
diff --git a/src/or/or.h b/src/or/or.h
index b0340ed1a0..826e81e468 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -22,14 +22,48 @@
#include <time.h>
#endif
-#include "common/util.h"
-
+#include "lib/arch/bytes.h"
+#include "lib/cc/compat_compiler.h"
+#include "lib/cc/torint.h"
#include "lib/container/map.h"
#include "lib/container/smartlist.h"
#include "lib/crypt_ops/crypto.h"
+#include "lib/ctime/di_ops.h"
#include "lib/defs/dh_sizes.h"
#include "lib/encoding/binascii.h"
+#include "lib/encoding/cstring.h"
+#include "lib/encoding/time_fmt.h"
+#include "lib/err/torerr.h"
+#include "lib/fs/dir.h"
+#include "lib/fs/files.h"
+#include "lib/fs/mmap.h"
+#include "lib/fs/path.h"
+#include "lib/fs/userdb.h"
+#include "lib/intmath/addsub.h"
+#include "lib/intmath/bits.h"
+#include "lib/intmath/cmp.h"
+#include "lib/intmath/logic.h"
+#include "lib/intmath/muldiv.h"
+#include "lib/log/escape.h"
+#include "lib/log/ratelim.h"
+#include "lib/log/util_bug.h"
+#include "lib/malloc/util_malloc.h"
#include "lib/net/address.h"
+#include "lib/net/ipv4.h"
+#include "lib/net/ipv6.h"
+#include "lib/net/resolve.h"
+#include "lib/net/socket.h"
+#include "lib/string/compat_ctype.h"
+#include "lib/string/compat_string.h"
+#include "lib/string/parse_int.h"
+#include "lib/string/printf.h"
+#include "lib/string/scanf.h"
+#include "lib/string/util_string.h"
+#include "lib/testsupport/testsupport.h"
+#include "lib/thread/threads.h"
+#include "lib/time/compat_time.h"
+#include "lib/wallclock/approx_time.h"
+#include "lib/wallclock/timeval.h"
#include "ht.h"
diff --git a/src/or/shared_random_client.c b/src/or/shared_random_client.c
index 9a6c0f6644..42a5b42f60 100644
--- a/src/or/shared_random_client.c
+++ b/src/or/shared_random_client.c
@@ -14,7 +14,6 @@
#include "or/config.h"
#include "or/voting_schedule.h"
#include "or/networkstatus.h"
-#include "common/util.h"
#include "lib/encoding/binascii.h"
#include "or/networkstatus_st.h"
diff --git a/src/or/torcert.c b/src/or/torcert.c
index 269fa66cea..39c6605c65 100644
--- a/src/or/torcert.c
+++ b/src/or/torcert.c
@@ -31,7 +31,6 @@
#include "or/torcert.h"
#include "trunnel/ed25519_cert.h"
#include "lib/log/torlog.h"
-#include "common/util.h"
#include "trunnel/link_handshake.h"
#include "lib/tls/tortls.h"
diff --git a/src/or/transports.c b/src/or/transports.c
index ff51ff00eb..1d3cb7b951 100644
--- a/src/or/transports.c
+++ b/src/or/transports.c
@@ -96,7 +96,6 @@
#include "or/connection.h"
#include "or/circuitbuild.h"
#include "or/transports.h"
-#include "common/util.h"
#include "or/router.h"
#include "or/statefile.h"
#include "or/connection_or.h"