1 /* Copyright (c) 2001, Matej Pfajfar.
2 * Copyright (c) 2001-2004, Roger Dingledine.
3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4 * Copyright (c) 2007-2021, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
8 * @file dispatch_cfg_st.h
9 * @brief Declarations for dispatch-configuration types.
12 #ifndef TOR_DISPATCH_CFG_ST_H
13 #define TOR_DISPATCH_CFG_ST_H
17 /** Information needed to create a dispatcher, but in a less efficient, more
20 * Nearly everybody should use the \refdir{lib/pubsub} module to configure
21 * dispatchers, instead of using this. */
22 struct dispatch_cfg_t
{
23 /** A list of msg_type_id_t (cast to void*), indexed by msg_t. */
24 struct smartlist_t
*type_by_msg
;
25 /** A list of channel_id_t (cast to void*), indexed by msg_t. */
26 struct smartlist_t
*chan_by_msg
;
27 /** A list of dispatch_typefns_t, indexed by msg_type_id_t. */
28 struct smartlist_t
*fns_by_type
;
29 /** A list of dispatch_rcv_t, indexed by msg_t. */
30 struct smartlist_t
*recv_by_msg
;
33 #endif /* !defined(TOR_DISPATCH_CFG_ST_H) */