Stop trying to generate test scripts via autoconf substitution.
[tor.git] / src / or / dircollate.h
blobcd1e8ac96d89ad1cc93bbce6dbc82a30f3feb5b7
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-2014, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
7 /**
8 * \file dirvote.h
9 * \brief Header file for dirvote.c.
10 **/
12 #ifndef TOR_DIRCOLLATE_H
13 #define TOR_DIRCOLLATE_H
15 #include "testsupport.h"
16 #include "or.h"
18 typedef struct dircollator_s dircollator_t;
20 dircollator_t *dircollator_new(int n_votes, int n_authorities);
21 void dircollator_free(dircollator_t *obj);
22 void dircollator_add_vote(dircollator_t *dc, networkstatus_t *v);
24 void dircollator_collate(dircollator_t *dc, int consensus_method);
26 int dircollator_n_routers(dircollator_t *dc);
27 vote_routerstatus_t **dircollator_get_votes_for_router(dircollator_t *dc,
28 int idx);
30 #ifdef DIRCOLLATE_PRIVATE
31 struct ddmap_entry_s;
32 typedef HT_HEAD(double_digest_map, ddmap_entry_s) double_digest_map_t;
33 struct dircollator_s {
34 /**DOCDOC */
35 int is_collated;
36 int n_votes;
37 int n_authorities;
39 int next_vote_num;
40 digestmap_t *by_rsa_sha1;
41 struct double_digest_map by_both_ids;
43 digestmap_t *by_collated_rsa_sha1;
45 smartlist_t *all_rsa_sha1_lst;
47 #endif
49 #endif