From b54a5e704ff4d3585bdd8459b83d4c522d070fba Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 20 Sep 2018 08:09:35 -0400 Subject: 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. --- src/feature/dirauth/guardfraction.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/feature/dirauth/guardfraction.h (limited to 'src/feature/dirauth/guardfraction.h') diff --git a/src/feature/dirauth/guardfraction.h b/src/feature/dirauth/guardfraction.h new file mode 100644 index 0000000000..38a0781dbb --- /dev/null +++ b/src/feature/dirauth/guardfraction.h @@ -0,0 +1,24 @@ +/* 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 guardfraction.h + * \brief Header file for guardfraction.c + **/ + +#ifndef TOR_GUARDFRACTION_H +#define TOR_GUARDFRACTION_H + +#ifdef GUARDFRACTION_PRIVATE +STATIC int +dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str, + smartlist_t *vote_routerstatuses); +#endif /* defined(DIRSERV_PRIVATE) */ + +int dirserv_read_guardfraction_file(const char *fname, + smartlist_t *vote_routerstatuses); + +#endif -- cgit v1.2.3-54-g00ecf