Extract ns_detached_signatures_st into its own header.

This commit is contained in:
Nick Mathewson 2018-06-15 13:49:30 -04:00
parent 50369f8981
commit 62315dab84
7 changed files with 28 additions and 11 deletions

View File

@ -33,6 +33,7 @@
#include "networkstatus_st.h"
#include "networkstatus_voter_info_st.h"
#include "node_st.h"
#include "ns_detached_signatures_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
#include "vote_timing_st.h"

View File

@ -253,6 +253,7 @@ ORHEADERS = \
src/or/networkstatus_voter_info_st.h \
src/or/nodelist.h \
src/or/node_st.h \
src/or/ns_detached_signatures_st.h \
src/or/ntmain.h \
src/or/onion.h \
src/or/onion_fast.h \

View File

@ -79,6 +79,7 @@
#include "document_signature_st.h"
#include "networkstatus_st.h"
#include "networkstatus_voter_info_st.h"
#include "ns_detached_signatures_st.h"
#include "node_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"

View File

@ -0,0 +1,22 @@
/* 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 NS_DETACHED_SIGNATURES_ST_H
#define NS_DETACHED_SIGNATURES_ST_H
/** A set of signatures for a networkstatus consensus. Unless otherwise
* noted, all fields are as for networkstatus_t. */
struct ns_detached_signatures_t {
time_t valid_after;
time_t fresh_until;
time_t valid_until;
strmap_t *digests; /**< Map from flavor name to digestset_t */
strmap_t *signatures; /**< Map from flavor name to list of
* document_signature_t */
};
#endif

View File

@ -1883,17 +1883,7 @@ typedef enum {
#define N_CONSENSUS_FLAVORS ((int)(FLAV_MICRODESC)+1)
typedef struct networkstatus_t networkstatus_t;
/** A set of signatures for a networkstatus consensus. Unless otherwise
* noted, all fields are as for networkstatus_t. */
typedef struct ns_detached_signatures_t {
time_t valid_after;
time_t fresh_until;
time_t valid_until;
strmap_t *digests; /**< Map from flavor name to digestset_t */
strmap_t *signatures; /**< Map from flavor name to list of
* document_signature_t */
} ns_detached_signatures_t;
typedef struct ns_detached_signatures_t ns_detached_signatures_t;
/** Allowable types of desc_store_t. */
typedef enum store_type_t {

View File

@ -84,6 +84,7 @@
#include "document_signature_st.h"
#include "networkstatus_st.h"
#include "networkstatus_voter_info_st.h"
#include "ns_detached_signatures_st.h"
#include "rend_authorized_client_st.h"
#include "rend_intro_point_st.h"
#include "rend_service_descriptor_st.h"

View File

@ -48,6 +48,7 @@
#include "document_signature_st.h"
#include "networkstatus_st.h"
#include "networkstatus_voter_info_st.h"
#include "ns_detached_signatures_st.h"
#include "port_cfg_st.h"
#include "tor_version_st.h"
#include "vote_microdesc_hash_st.h"