Merge remote-tracking branch 'tor-github/pr/1623'

This commit is contained in:
Nick Mathewson 2019-12-20 07:18:38 -05:00
commit 34f92a6e73
31 changed files with 45 additions and 45 deletions

View file

@ -65,7 +65,7 @@
* Define this so we get channel internal functions, since we're implementing
* part of a subclass (channel_tls_t).
*/
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#include "app/config/config.h"
#include "core/mainloop/connection.h"
#include "core/mainloop/mainloop.h"

View file

@ -52,10 +52,10 @@
* Define this so channel.h gives us things only channel_t subclasses
* should touch.
*/
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
/* This one's for stuff only channel.c and the test suite should see */
#define CHANNEL_PRIVATE_
#define CHANNEL_FILE_PRIVATE
#include "core/or/or.h"
#include "app/config/config.h"

View file

@ -563,13 +563,13 @@ void channel_free_all(void);
void channel_dumpstats(int severity);
void channel_listener_dumpstats(int severity);
#ifdef TOR_CHANNEL_INTERNAL_
#ifdef CHANNEL_OBJECT_PRIVATE
#ifdef CHANNEL_PRIVATE_
#ifdef CHANNEL_FILE_PRIVATE
STATIC void channel_add_to_digest_map(channel_t *chan);
#endif /* defined(CHANNEL_PRIVATE_) */
#endif /* defined(CHANNEL_FILE_PRIVATE) */
/* Channel operations for subclasses and internal use only */
@ -648,7 +648,7 @@ void channel_notify_flushed(channel_t *chan);
/* Handle stuff we need to do on open like notifying circuits */
void channel_do_open_actions(channel_t *chan);
#endif /* defined(TOR_CHANNEL_INTERNAL_) */
#endif /* defined(CHANNEL_OBJECT_PRIVATE) */
/* Helper functions to perform operations on channels */

View file

@ -9,9 +9,9 @@
* @brief Link-level padding code.
**/
/* TOR_CHANNEL_INTERNAL_ define needed for an O(1) implementation of
/* CHANNEL_OBJECT_PRIVATE define needed for an O(1) implementation of
* channelpadding_channel_to_channelinfo() */
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#include "core/or/or.h"
#include "core/or/channel.h"

View file

@ -34,7 +34,7 @@
* Define this so channel.h gives us things only channel_t subclasses
* should touch.
*/
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define CHANNELTLS_PRIVATE

View file

@ -22,7 +22,7 @@ struct curve25519_public_key_t;
#define TLS_CHAN_MAGIC 0x8a192427U
#ifdef TOR_CHANNEL_INTERNAL_
#ifdef CHANNEL_OBJECT_PRIVATE
struct channel_tls_t {
/* Base channel_t struct */
@ -31,7 +31,7 @@ struct channel_tls_t {
or_connection_t *conn;
};
#endif /* defined(TOR_CHANNEL_INTERNAL_) */
#endif /* defined(CHANNEL_OBJECT_PRIVATE) */
channel_t * channel_tls_connect(const tor_addr_t *addr, uint16_t port,
const char *id_digest,

View file

@ -27,7 +27,7 @@
* Define this so we get channel internal functions, since we're implementing
* part of a subclass (channel_tls_t).
*/
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define CONNECTION_OR_PRIVATE
#define ORCONN_EVENT_PRIVATE
#include "core/or/channel.h"

View file

@ -5,12 +5,12 @@
#include "app/config/config.h"
#include "lib/evloop/compat_libevent.h"
#define SCHEDULER_PRIVATE_
#define SCHEDULER_PRIVATE
#define SCHEDULER_KIST_PRIVATE
#include "core/or/scheduler.h"
#include "core/mainloop/mainloop.h"
#include "lib/buf/buffers.h"
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#include "core/or/channeltls.h"
#include "core/or/or_connection_st.h"

View file

@ -136,7 +136,7 @@ MOCK_DECL(void, scheduler_channel_has_waiting_cells, (channel_t *chan));
* These functions are only visible to the scheduling system, the current
* scheduler implementation, and tests.
*****************************************************************************/
#ifdef SCHEDULER_PRIVATE_
#ifdef SCHEDULER_PRIVATE
/*********************************
* Defined in scheduler.c
@ -212,7 +212,7 @@ extern int32_t sched_run_interval;
scheduler_t *get_vanilla_scheduler(void);
#endif /* defined(SCHEDULER_PRIVATE_) */
#endif /* defined(SCHEDULER_PRIVATE) */
#endif /* !defined(TOR_SCHEDULER_H) */

View file

@ -13,10 +13,10 @@
#include "app/config/config.h"
#include "core/mainloop/connection.h"
#include "feature/nodelist/networkstatus.h"
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#include "core/or/channel.h"
#include "core/or/channeltls.h"
#define SCHEDULER_PRIVATE_
#define SCHEDULER_PRIVATE
#include "core/or/scheduler.h"
#include "lib/math/fp.h"

View file

@ -8,9 +8,9 @@
#include "core/or/or.h"
#include "app/config/config.h"
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#include "core/or/channel.h"
#define SCHEDULER_PRIVATE_
#define SCHEDULER_PRIVATE
#include "core/or/scheduler.h"
/*****************************************************************************

View file

@ -9,7 +9,7 @@
* \brief Code to parse address policies.
**/
#define EXPOSE_ROUTERDESC_TOKEN_TABLE
#define ROUTERDESC_TOKEN_TABLE_PRIVATE
#include "core/or/or.h"

View file

@ -50,7 +50,7 @@
* </ul>
**/
#define EXPOSE_ROUTERDESC_TOKEN_TABLE
#define ROUTERDESC_TOKEN_TABLE_PRIVATE
#include "core/or/or.h"
#include "app/config/config.h"

View file

@ -40,7 +40,7 @@ int find_single_ipv6_orport(const smartlist_t *list,
void routerparse_init(void);
void routerparse_free_all(void);
#ifdef EXPOSE_ROUTERDESC_TOKEN_TABLE
#ifdef ROUTERDESC_TOKEN_TABLE_PRIVATE
extern const struct token_rule_t routerdesc_token_table[];
#endif

View file

@ -54,7 +54,7 @@
#include "lib/cc/ctassert.h"
#define EXPOSE_CLEAN_BACKTRACE
#define BACKTRACE_PRIVATE
#include "lib/err/backtrace.h"
#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \

View file

@ -29,11 +29,11 @@ const char *get_tor_backtrace_version(void);
#define log_backtrace(sev, dom, msg) \
log_backtrace_impl((sev), (dom), (msg), tor_log)
#ifdef EXPOSE_CLEAN_BACKTRACE
#ifdef BACKTRACE_PRIVATE
#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION)
void clean_backtrace(void **stack, size_t depth, const ucontext_t *ctx);
#endif
#endif /* defined(EXPOSE_CLEAN_BACKTRACE) */
#endif /* defined(BACKTRACE_PRIVATE) */
#endif /* !defined(TOR_BACKTRACE_H) */

View file

@ -82,7 +82,7 @@
#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION)
#define USE_BACKTRACE
#define EXPOSE_CLEAN_BACKTRACE
#define BACKTRACE_PRIVATE
#include "lib/err/backtrace.h"
#endif /* defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && ... */

View file

@ -1,8 +1,8 @@
/* Copyright (c) 2013-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_PRIVATE_
#define CHANNEL_OBJECT_PRIVATE
#define CHANNEL_FILE_PRIVATE
#include "core/or/or.h"
#include "core/or/channel.h"
/* For channel_note_destroy_not_pending */

View file

@ -1,7 +1,7 @@
/* Copyright (c) 2016-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define MAINLOOP_PRIVATE
#define NETWORKSTATUS_PRIVATE
#define TOR_TIMERS_PRIVATE

View file

@ -5,7 +5,7 @@
#include <math.h>
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#include "core/or/or.h"
#include "lib/net/address.h"
#include "lib/buf/buffers.h"

View file

@ -1,7 +1,7 @@
/* Copyright (c) 2013-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define CIRCUITBUILD_PRIVATE
#define CIRCUITLIST_PRIVATE
#define HS_CIRCUITMAP_PRIVATE

View file

@ -1,7 +1,7 @@
/* Copyright (c) 2013-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define CIRCUITMUX_PRIVATE
#define CIRCUITMUX_EWMA_PRIVATE
#define RELAY_PRIVATE

View file

@ -1,4 +1,4 @@
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define TOR_TIMERS_PRIVATE
#define CIRCUITPADDING_PRIVATE
#define CIRCUITPADDING_MACHINES_PRIVATE

View file

@ -4,7 +4,7 @@
#define CIRCUITBUILD_PRIVATE
#define CIRCUITSTATS_PRIVATE
#define CIRCUITLIST_PRIVATE
#define CHANNEL_PRIVATE_
#define CHANNEL_FILE_PRIVATE
#include "core/or/or.h"
#include "test/test.h"

View file

@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#define CONNECTION_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define CONTROL_PRIVATE
#define CONTROL_EVENTS_PRIVATE
#define OCIRC_EVENT_PRIVATE

View file

@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#define DOS_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define CIRCUITLIST_PRIVATE
#include "core/or/or.h"

View file

@ -10,7 +10,7 @@
#define DIRCACHE_PRIVATE
#define DIRCLIENT_PRIVATE
#define HS_CACHE_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#include "trunnel/ed25519_cert.h"
#include "feature/hs/hs_cache.h"

View file

@ -10,7 +10,7 @@
#define CRYPTO_PRIVATE
#define MAINLOOP_PRIVATE
#define HS_CLIENT_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define CIRCUITBUILD_PRIVATE
#define CIRCUITLIST_PRIVATE
#define CONNECTION_PRIVATE

View file

@ -19,7 +19,7 @@
#define MAINLOOP_PRIVATE
#define NETWORKSTATUS_PRIVATE
#define STATEFILE_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define HS_CLIENT_PRIVATE
#define CRYPT_PATH_PRIVATE

View file

@ -5,7 +5,7 @@
#define CHANNELTLS_PRIVATE
#define CONNECTION_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_OBJECT_PRIVATE
#define TORTLS_PRIVATE
#include "core/or/or.h"

View file

@ -6,8 +6,8 @@
#include <math.h>
#define SCHEDULER_KIST_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_PRIVATE_
#define CHANNEL_OBJECT_PRIVATE
#define CHANNEL_FILE_PRIVATE
#include "core/or/or.h"
#include "app/config/config.h"
#include "lib/evloop/compat_libevent.h"
@ -15,7 +15,7 @@
#include "core/or/channeltls.h"
#include "core/mainloop/connection.h"
#include "feature/nodelist/networkstatus.h"
#define SCHEDULER_PRIVATE_
#define SCHEDULER_PRIVATE
#include "core/or/scheduler.h"
/* Test suite stuff */