]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Extract networkstatus_vote_info_t into its own header.
authorNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2018 17:31:47 +0000 (13:31 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 15 Jun 2018 17:31:47 +0000 (13:31 -0400)
src/or/consdiffmgr.c
src/or/dirauth/dirvote.c
src/or/include.am
src/or/networkstatus.c
src/or/networkstatus_voter_info_st.h [new file with mode: 0644]
src/or/or.h
src/or/routerlist.c
src/or/routerparse.c
src/test/test_dir.c
src/test/test_dir_common.c

index 323f4f9ca038508b8d7037ca5eb498dd3dc4a3e6..b90660e6c78570d0f4a3736a227359828b80fc2f 100644 (file)
@@ -23,6 +23,8 @@
 #include "routerparse.h"
 #include "workqueue.h"
 
+#include "networkstatus_voter_info_st.h"
+
 /**
  * Labels to apply to items in the conscache object.
  *
index 12ab5f328983c098ec079730eaa3275811c28d68..5dee8a879772e3d8d217c54a4361726ee6690673 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "dir_server_st.h"
 #include "document_signature_st.h"
+#include "networkstatus_voter_info_st.h"
 #include "node_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"
index 611b1adbce182fe6454c7e4fea428276e1fb6f14..6ced3e1558e0112a36eb9164134845191955a8b2 100644 (file)
@@ -248,6 +248,7 @@ ORHEADERS = \
        src/or/main.h                                   \
        src/or/microdesc.h                              \
        src/or/networkstatus.h                          \
+       src/or/networkstatus_voter_info_st.h            \
        src/or/nodelist.h                               \
        src/or/node_st.h                                \
        src/or/ntmain.h                                 \
index 1bea0d774d2e1de2051e8b54f7e87b4cc4880d50..11021a7ead1827501bad35c67a3eb447244ac114 100644 (file)
@@ -77,6 +77,7 @@
 #include "dir_connection_st.h"
 #include "dir_server_st.h"
 #include "document_signature_st.h"
+#include "networkstatus_voter_info_st.h"
 #include "node_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"
diff --git a/src/or/networkstatus_voter_info_st.h b/src/or/networkstatus_voter_info_st.h
new file mode 100644 (file)
index 0000000..32ea597
--- /dev/null
@@ -0,0 +1,31 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef NETWORKSTATUS_VOTER_INFO_ST_H
+#define NETWORKSTATUS_VOTER_INFO_ST_H
+
+/** Information about a single voter in a vote or a consensus. */
+typedef struct networkstatus_voter_info_t {
+  /** Declared SHA-1 digest of this voter's identity key */
+  char identity_digest[DIGEST_LEN];
+  char *nickname; /**< Nickname of this voter */
+  /** Digest of this voter's "legacy" identity key, if any.  In vote only; for
+   * consensuses, we treat legacy keys as additional signers. */
+  char legacy_id_digest[DIGEST_LEN];
+  char *address; /**< Address of this voter, in string format. */
+  uint32_t addr; /**< Address of this voter, in IPv4, in host order. */
+  uint16_t dir_port; /**< Directory port of this voter */
+  uint16_t or_port; /**< OR port of this voter */
+  char *contact; /**< Contact information for this voter. */
+  char vote_digest[DIGEST_LEN]; /**< Digest of this voter's vote, as signed. */
+
+  /* Nothing from here on is signed. */
+  /** The signature of the document and the signature's status. */
+  smartlist_t *sigs;
+} networkstatus_voter_info_t;
+
+#endif
+
index ab1ae5742b89c946907d41eb4dc1db49469bd3e4..1069e30d0a6feafdb4ffca174719bd410552901f 100644 (file)
@@ -1861,26 +1861,7 @@ typedef struct node_t node_t;
 typedef struct vote_microdesc_hash_t vote_microdesc_hash_t;
 typedef struct vote_routerstatus_t vote_routerstatus_t;
 typedef struct document_signature_t document_signature_t;
-
-/** Information about a single voter in a vote or a consensus. */
-typedef struct networkstatus_voter_info_t {
-  /** Declared SHA-1 digest of this voter's identity key */
-  char identity_digest[DIGEST_LEN];
-  char *nickname; /**< Nickname of this voter */
-  /** Digest of this voter's "legacy" identity key, if any.  In vote only; for
-   * consensuses, we treat legacy keys as additional signers. */
-  char legacy_id_digest[DIGEST_LEN];
-  char *address; /**< Address of this voter, in string format. */
-  uint32_t addr; /**< Address of this voter, in IPv4, in host order. */
-  uint16_t dir_port; /**< Directory port of this voter */
-  uint16_t or_port; /**< OR port of this voter */
-  char *contact; /**< Contact information for this voter. */
-  char vote_digest[DIGEST_LEN]; /**< Digest of this voter's vote, as signed. */
-
-  /* Nothing from here on is signed. */
-  /** The signature of the document and the signature's status. */
-  smartlist_t *sigs;
-} networkstatus_voter_info_t;
+typedef struct networkstatus_voter_info_t networkstatus_voter_info_t;
 
 typedef struct networkstatus_sr_info_t {
   /* Indicate if the dirauth partitipates in the SR protocol with its vote.
index 68def1c85e21fb100f61f56dd5fb2defcb4c8392..5a8d19f6f463f087f4859a9cd5269393ad9a9e41 100644 (file)
 #include "dir_connection_st.h"
 #include "dir_server_st.h"
 #include "document_signature_st.h"
+#include "networkstatus_voter_info_st.h"
 #include "node_st.h"
 #include "vote_routerstatus_st.h"
 
index 2ae005569ce52e019e5fb5a8f3769349cbf88d78..73721bf2360083049c546527880fc4bd5544f941 100644 (file)
@@ -82,6 +82,7 @@
 #include "dirauth/dirvote.h"
 
 #include "document_signature_st.h"
+#include "networkstatus_voter_info_st.h"
 #include "rend_authorized_client_st.h"
 #include "rend_intro_point_st.h"
 #include "rend_service_descriptor_st.h"
index c3d00a81f90a9b3ff420b7a0174e5bf9635c9e31..f5a3b6f65c2ea4e049c95f441eaab6749a1962f8 100644 (file)
@@ -46,6 +46,7 @@
 #include "voting_schedule.h"
 
 #include "document_signature_st.h"
+#include "networkstatus_voter_info_st.h"
 #include "port_cfg_st.h"
 #include "tor_version_st.h"
 #include "vote_microdesc_hash_st.h"
index 4b36025b54fbdbccd6fe4467dfe18e47f026a31a..fca132c9f7f4910345ed49c88d711c34b9d2e1ba 100644 (file)
@@ -14,6 +14,7 @@
 #include "test_dir_common.h"
 #include "voting_schedule.h"
 
+#include "networkstatus_voter_info_st.h"
 #include "vote_microdesc_hash_st.h"
 #include "vote_routerstatus_st.h"