#include "common/address_set.h"
#include "common/address.h"
#include "common/compat.h"
-#include "lib/container/container.h"
+#include "lib/container/bitarray.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "common/util.h"
#include "siphash.h"
}
return matches == N_BITS_PER_ITEM;
}
-
#include "common/torlog.h"
#include "lib/err/backtrace.h"
#include "lib/container/container.h"
+#include "lib/malloc/util_malloc.h"
#ifdef __COVERITY__
int bug_macro_deadcode_dummy__ = 0;
#include "lib/container/smartlist.h"
#include "lib/container/map.h"
-#include "lib/container/bitarray.h"
-#include "lib/container/bloomfilt.h"
-#include "lib/container/order.h"
#endif /* !defined(TOR_CONTAINER_H) */
#ifndef TOR_CRYPTO_DIGEST_H
#define TOR_CRYPTO_DIGEST_H
-#include <stdio.h>
-
#include "lib/container/container.h"
#include "lib/cc/torint.h"
#include "lib/defs/digest_sizes.h"
+#include "lib/malloc/util_malloc.h"
/** Length of a sha1 message digest when encoded in base32 with trailing =
* signs removed. */
noinst_HEADERS += \
- digest_sizes.h
+ src/lib/defs/digest_sizes.h
-
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
#include "or/confparse.h"
#include "or/routerset.h"
+#include "lib/container/bitarray.h"
+
static uint64_t config_parse_memunit(const char *s, int *ok);
static int config_parse_msec_interval(const char *s, int *ok);
static int config_parse_interval(const char *s, int *ok);
}
return (int)r;
}
-
return (len >= strlen(ns_diff_version) &&
fast_memeq(document, ns_diff_version, strlen(ns_diff_version)));
}
-
int looks_like_a_consensus_diff(const char *document, size_t len);
#ifdef CONSDIFF_PRIVATE
+#include "lib/container/bitarray.h"
+
struct memarea_t;
/** Line type used for constructing consensus diffs. Each of these lines
#endif /* defined(CONSDIFF_PRIVATE) */
#endif /* !defined(TOR_CONSDIFF_H) */
-
#include "or/vote_routerstatus_st.h"
#include "or/vote_timing_st.h"
+#include "lib/container/order.h"
+
/**
* \file dirvote.c
* \brief Functions to compute directory consensus, and schedule voting.
#include "or/tor_version_st.h"
#include "or/vote_routerstatus_st.h"
+#include "lib/container/order.h"
+
/**
* \file dirserv.c
* \brief Directory server core implementation. Manages directory
dirserv_clear_measured_bw_cache();
}
-
#include "or/node_st.h"
#include "or/origin_circuit_st.h"
+#include "lib/container/bloomfilt.h"
+
/** A list of existing guard selection contexts. */
static smartlist_t *guard_contexts = NULL;
/** The currently enabled guard selection context. */
}
circuit_build_times_free_timeouts(get_circuit_build_times_mutable());
}
-
#include "or/geoip.h"
#include "or/routerlist.h"
+#include "lib/container/order.h"
+
static void init_geoip_countries(void);
/** An entry from the GeoIP IPv4 file: maps an IPv4 range to a country. */
memset(geoip_digest, 0, sizeof(geoip_digest));
memset(geoip6_digest, 0, sizeof(geoip6_digest));
}
-
#include "or/networkstatus_st.h"
#include "or/or_circuit_st.h"
+#include "lib/container/bloomfilt.h"
+#include "lib/container/order.h"
+
static void bw_arrays_init(void);
static void predicted_ports_alloc(void);
tor_assert_nonfatal(rephist_total_alloc == 0);
tor_assert_nonfatal_once(rephist_total_num == 0);
}
-
#include "or/routerlist_st.h"
#include "or/vote_routerstatus_st.h"
+#include "lib/container/bloomfilt.h"
+
// #define DEBUG_ROUTERLIST
/****************************************************************************/
nodelist_refresh_countries();
}
-
#include "or/vote_microdesc_hash_st.h"
#include "or/vote_routerstatus_st.h"
+#include "lib/container/bloomfilt.h"
+
#undef log
#include <math.h>
{
dump_desc_fifo_cleanup();
}
-
/* Copyright (c) 2001 Matej Pfajfar.
- * Copyright (c) 2001-2004, Roger Dingledine.
+n * Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
bitarray_free(routerset->countries);
tor_free(routerset);
}
-
int routerset_len(const routerset_t *set);
#ifdef ROUTERSET_PRIVATE
+#include "lib/container/bitarray.h"
+
STATIC char * routerset_get_countryname(const char *c);
STATIC int routerset_contains(const routerset_t *set, const tor_addr_t *addr,
uint16_t orport,
};
#endif /* defined(ROUTERSET_PRIVATE) */
#endif /* !defined(TOR_ROUTERSET_H) */
-
#include "or/cell_st.h"
#include "or/or_circuit_st.h"
+#include "lib/container/bloomfilt.h"
+
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
static uint64_t nanostart;
static inline uint64_t
return 0;
}
-
#include "or/or_circuit_st.h"
#include "or/origin_circuit_st.h"
+#include "lib/container/bitarray.h"
+
static channel_t *
new_fake_channel(void)
{
TT_FORK, NULL, NULL },
END_OF_TESTCASES
};
-
#include "or/fp_pair.h"
#include "test/test.h"
+#include "lib/container/bitarray.h"
+#include "lib/container/bloomfilt.h"
+#include "lib/container/order.h"
+
/** Helper: return a tristate based on comparing the strings in *<b>a</b> and
* *<b>b</b>. */
static int
CONTAINER(smartlist_strings_eq, 0),
END_OF_TESTCASES
};
-
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
+#include "lib/container/bloomfilt.h"
+
/* TODO:
* choose_random_entry() test with state set.
*
END_OF_TESTCASES
};
-