diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-01-11 20:17:04 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-03-25 16:35:33 -0400 |
commit | e4d3098d4d23686320013b80b6305fbd52863f76 (patch) | |
tree | 96c23b73d84025ec42e676b4087c6b7aaa5dd63e /src/lib/dispatch/dispatch_cfg_st.h | |
parent | a62ac1719887f0756ceb516ce3b12cd2aee18191 (diff) | |
download | tor-e4d3098d4d23686320013b80b6305fbd52863f76.tar.gz tor-e4d3098d4d23686320013b80b6305fbd52863f76.zip |
Low-level dispatch module for publish-subscribe mechanism
This module implements a way to send messages from one module to
another, with associated data types. It does not yet do anything to
ensure that messages are correct, that types match, or that other
forms of consistency are preserved.
Diffstat (limited to 'src/lib/dispatch/dispatch_cfg_st.h')
-rw-r--r-- | src/lib/dispatch/dispatch_cfg_st.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/dispatch/dispatch_cfg_st.h b/src/lib/dispatch/dispatch_cfg_st.h new file mode 100644 index 0000000000..d004fe5934 --- /dev/null +++ b/src/lib/dispatch/dispatch_cfg_st.h @@ -0,0 +1,25 @@ +/* Copyright (c) 2001, Matej Pfajfar. + * 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 */ + +#ifndef TOR_DISPATCH_CFG_ST_H +#define TOR_DISPATCH_CFG_ST_H + +struct smartlist_t; + +/* Information needed to create a dispatcher, but in a less efficient, more + * mutable format. */ +struct dispatch_cfg_t { + /** A list of msg_type_id_t (cast to void*), indexed by msg_t. */ + struct smartlist_t *type_by_msg; + /** A list of channel_id_t (cast to void*), indexed by msg_t. */ + struct smartlist_t *chan_by_msg; + /** A list of dispatch_rcv_t, indexed by msg_type_id_t. */ + struct smartlist_t *fns_by_type; + /** A list of dispatch_typefns_t, indexed by msg_t. */ + struct smartlist_t *recv_by_msg; +}; + +#endif |