aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2014-02-03 21:25:53 +0000
committerFlorian Dold <florian.dold@gmail.com>2014-02-03 21:25:53 +0000
commit8a3563b5c242b60aa4b7d2b9a3c3607ef8dcbadb (patch)
treef4b85c248403ba6783db017930b2258f3e61e18a /src/include
parent694581b42a78419c1c8ffc31ee873484ff93d79b (diff)
downloadgnunet-8a3563b5c242b60aa4b7d2b9a3c3607ef8dcbadb.tar.gz
gnunet-8a3563b5c242b60aa4b7d2b9a3c3607ef8dcbadb.zip
- consensus and secretsharing have both start time and deadline
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_consensus_service.h8
-rw-r--r--src/include/gnunet_secretsharing_service.h5
2 files changed, 10 insertions, 3 deletions
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h
index 3b08b2dee..ef799773f 100644
--- a/src/include/gnunet_consensus_service.h
+++ b/src/include/gnunet_consensus_service.h
@@ -72,6 +72,9 @@ struct GNUNET_CONSENSUS_Handle;
72 * Inclusion of the local peer is optional. 72 * Inclusion of the local peer is optional.
73 * @param session_id session identifier 73 * @param session_id session identifier
74 * Allows a group of peers to have more than consensus session. 74 * Allows a group of peers to have more than consensus session.
75 * @param start start time of the consensus, conclude should be called before
76 * the start time.
77 * @param deadline time when the consensus should have concluded
75 * @param new_element_cb callback, called when a new element is added to the set by 78 * @param new_element_cb callback, called when a new element is added to the set by
76 * another peer. Also called when an error occurs. 79 * another peer. Also called when an error occurs.
77 * @param new_element_cls closure for new_element 80 * @param new_element_cls closure for new_element
@@ -82,6 +85,8 @@ GNUNET_CONSENSUS_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
82 unsigned int num_peers, 85 unsigned int num_peers,
83 const struct GNUNET_PeerIdentity *peers, 86 const struct GNUNET_PeerIdentity *peers,
84 const struct GNUNET_HashCode *session_id, 87 const struct GNUNET_HashCode *session_id,
88 struct GNUNET_TIME_Absolute start,
89 struct GNUNET_TIME_Absolute deadline,
85 GNUNET_CONSENSUS_ElementCallback new_element_cb, 90 GNUNET_CONSENSUS_ElementCallback new_element_cb,
86 void *new_element_cls); 91 void *new_element_cls);
87 92
@@ -135,14 +140,11 @@ typedef void (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls);
135 * try to conclude the consensus within a given time window. 140 * try to conclude the consensus within a given time window.
136 * 141 *
137 * @param consensus consensus session 142 * @param consensus consensus session
138 * @param deadline deadline after which the conculde callback
139 * whill be called
140 * @param conclude called when the conclusion was successful 143 * @param conclude called when the conclusion was successful
141 * @param conclude_cls closure for the conclude callback 144 * @param conclude_cls closure for the conclude callback
142 */ 145 */
143void 146void
144GNUNET_CONSENSUS_conclude (struct GNUNET_CONSENSUS_Handle *consensus, 147GNUNET_CONSENSUS_conclude (struct GNUNET_CONSENSUS_Handle *consensus,
145 struct GNUNET_TIME_Absolute deadline,
146 GNUNET_CONSENSUS_ConcludeCallback conclude, 148 GNUNET_CONSENSUS_ConcludeCallback conclude,
147 void *conclude_cls); 149 void *conclude_cls);
148 150
diff --git a/src/include/gnunet_secretsharing_service.h b/src/include/gnunet_secretsharing_service.h
index 1524c79fe..3673ca0fe 100644
--- a/src/include/gnunet_secretsharing_service.h
+++ b/src/include/gnunet_secretsharing_service.h
@@ -190,6 +190,8 @@ typedef void (*GNUNET_SECRETSHARING_DecryptCallback) (void *cls,
190 * @param num_peers number of peers in 'peers' 190 * @param num_peers number of peers in 'peers'
191 * @param peers array of peers that we will share secrets with, can optionally contain the local peer 191 * @param peers array of peers that we will share secrets with, can optionally contain the local peer
192 * @param session_id unique session id 192 * @param session_id unique session id
193 * @param start When should all peers be available for sharing the secret?
194 * Random number generation can take place before the start time.
193 * @param deadline point in time where the session must be established; taken as hint 195 * @param deadline point in time where the session must be established; taken as hint
194 * by underlying consensus sessions 196 * by underlying consensus sessions
195 * @param threshold minimum number of peers that must cooperate to decrypt a value 197 * @param threshold minimum number of peers that must cooperate to decrypt a value
@@ -201,6 +203,7 @@ GNUNET_SECRETSHARING_create_session (const struct GNUNET_CONFIGURATION_Handle *c
201 unsigned int num_peers, 203 unsigned int num_peers,
202 const struct GNUNET_PeerIdentity *peers, 204 const struct GNUNET_PeerIdentity *peers,
203 const struct GNUNET_HashCode *session_id, 205 const struct GNUNET_HashCode *session_id,
206 struct GNUNET_TIME_Absolute start,
204 struct GNUNET_TIME_Absolute deadline, 207 struct GNUNET_TIME_Absolute deadline,
205 unsigned int threshold, 208 unsigned int threshold,
206 GNUNET_SECRETSHARING_SecretReadyCallback cb, 209 GNUNET_SECRETSHARING_SecretReadyCallback cb,
@@ -247,6 +250,7 @@ GNUNET_SECRETSHARING_encrypt (const struct GNUNET_SECRETSHARING_PublicKey *publi
247 * @param share our secret share to use for decryption 250 * @param share our secret share to use for decryption
248 * @param ciphertext ciphertext to publish in order to decrypt it (if enough peers agree) 251 * @param ciphertext ciphertext to publish in order to decrypt it (if enough peers agree)
249 * @param decrypt_cb callback called once the decryption succeeded 252 * @param decrypt_cb callback called once the decryption succeeded
253 * @param start By when should the cooperation for decryption start?
250 * @param deadline By when should the decryption be finished? 254 * @param deadline By when should the decryption be finished?
251 * @param decrypt_cb_cls closure for @a decrypt_cb 255 * @param decrypt_cb_cls closure for @a decrypt_cb
252 * @return handle to cancel the operation 256 * @return handle to cancel the operation
@@ -255,6 +259,7 @@ struct GNUNET_SECRETSHARING_DecryptionHandle *
255GNUNET_SECRETSHARING_decrypt (const struct GNUNET_CONFIGURATION_Handle *cfg, 259GNUNET_SECRETSHARING_decrypt (const struct GNUNET_CONFIGURATION_Handle *cfg,
256 struct GNUNET_SECRETSHARING_Share *share, 260 struct GNUNET_SECRETSHARING_Share *share,
257 const struct GNUNET_SECRETSHARING_Ciphertext *ciphertext, 261 const struct GNUNET_SECRETSHARING_Ciphertext *ciphertext,
262 struct GNUNET_TIME_Absolute start,
258 struct GNUNET_TIME_Absolute deadline, 263 struct GNUNET_TIME_Absolute deadline,
259 GNUNET_SECRETSHARING_DecryptCallback decrypt_cb, 264 GNUNET_SECRETSHARING_DecryptCallback decrypt_cb,
260 void *decrypt_cb_cls); 265 void *decrypt_cb_cls);