diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-20 08:09:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-20 11:07:42 -0400 |
commit | b54a5e704ff4d3585bdd8459b83d4c522d070fba (patch) | |
tree | f0b6b54b67438528f5adecf2cc16cc6e435891af /src/feature/dirauth/process_descs.h | |
parent | 08e3b88f0774fedb41a6b1c170a710dd12a7cb90 (diff) | |
download | tor-b54a5e704ff4d3585bdd8459b83d4c522d070fba.tar.gz tor-b54a5e704ff4d3585bdd8459b83d4c522d070fba.zip |
Split most of dirserv.c into several new modules
In dirauth:
* bwauth.c reads and uses bandwidth files
* guardfraction.c reads and uses the guardfraction file
* reachability.c tests relay reachability
* recommend_pkg.c handles the recommended-packages lines.
* recv_descs.c handles fingerprint files and processing incoming
routerinfos that relays upload to us
* voteflag.c computes flag thresholds and sets those thresholds on
routerstatuses when computing votes
In control:
* fmt_serverstatus.c generates the ancient "v1 server status"
format that controllers expect.
In nodelist:
* routerstatus_fmt.c formats routerstatus entries for a consensus,
a vote, or for the controller.
Diffstat (limited to 'src/feature/dirauth/process_descs.h')
-rw-r--r-- | src/feature/dirauth/process_descs.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/feature/dirauth/process_descs.h b/src/feature/dirauth/process_descs.h new file mode 100644 index 0000000000..ad9d5c3d4c --- /dev/null +++ b/src/feature/dirauth/process_descs.h @@ -0,0 +1,38 @@ +/* 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 */ + +/** + * \file process_descs.h + * \brief Header file for process_descs.c. + **/ + +#ifndef TOR_RECV_UPLOADS_H +#define TOR_RECV_UPLOADS_H + +int dirserv_load_fingerprint_file(void); +void dirserv_free_fingerprint_list(void); +int dirserv_add_own_fingerprint(crypto_pk_t *pk); + +enum was_router_added_t dirserv_add_multiple_descriptors( + const char *desc, uint8_t purpose, + const char *source, + const char **msg); +enum was_router_added_t dirserv_add_descriptor(routerinfo_t *ri, + const char **msg, + const char *source); + +int authdir_wants_to_reject_router(routerinfo_t *ri, const char **msg, + int complain, + int *valid_out); +uint32_t dirserv_router_get_status(const routerinfo_t *router, + const char **msg, + int severity); +void dirserv_set_node_flags_from_authoritative_status(node_t *node, + uint32_t authstatus); + +int dirserv_would_reject_router(const routerstatus_t *rs); + +#endif |