diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-08-11 18:04:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-08-11 18:04:19 +0000 |
commit | 9c37ec935877bc6196febec8f6b2f0ad036189b9 (patch) | |
tree | 93b0ab56d432abb92fb10d4b5d0e01f6c1411333 /src/conversation/conversation.h | |
parent | 7a5835e38561a55ea15d7caa9910bb6cdf0da79f (diff) | |
download | gnunet-9c37ec935877bc6196febec8f6b2f0ad036189b9.tar.gz gnunet-9c37ec935877bc6196febec8f6b2f0ad036189b9.zip |
-converting API to use new CADET ports
Diffstat (limited to 'src/conversation/conversation.h')
-rw-r--r-- | src/conversation/conversation.h | 92 |
1 files changed, 54 insertions, 38 deletions
diff --git a/src/conversation/conversation.h b/src/conversation/conversation.h index bbe587b50..1ca816f0e 100644 --- a/src/conversation/conversation.h +++ b/src/conversation/conversation.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2013 GNUnet e.V. | 3 | Copyright (C) 2013-2016 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -75,9 +75,14 @@ struct ClientPhoneRegisterMessage | |||
75 | struct GNUNET_MessageHeader header; | 75 | struct GNUNET_MessageHeader header; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * Phone line to register. | 78 | * Always zero. |
79 | */ | 79 | */ |
80 | uint32_t line GNUNET_PACKED; | 80 | uint32_t reserved GNUNET_PACKED; |
81 | |||
82 | /** | ||
83 | * Phone line / CADET port to register. | ||
84 | */ | ||
85 | struct GNUNET_HashCode line_port; | ||
81 | }; | 86 | }; |
82 | 87 | ||
83 | 88 | ||
@@ -92,8 +97,8 @@ struct ClientPhoneRingMessage | |||
92 | struct GNUNET_MessageHeader header; | 97 | struct GNUNET_MessageHeader header; |
93 | 98 | ||
94 | /** | 99 | /** |
95 | * CID, internal caller ID to identify which active call we are | 100 | * CID, internal caller ID number used in the future to identify |
96 | * talking about. | 101 | * which active call we are talking about. |
97 | */ | 102 | */ |
98 | uint32_t cid GNUNET_PACKED; | 103 | uint32_t cid GNUNET_PACKED; |
99 | 104 | ||
@@ -183,7 +188,7 @@ struct ClientPhoneHangupMessage | |||
183 | 188 | ||
184 | 189 | ||
185 | /** | 190 | /** |
186 | * Message Client <->Service to transmit the audio. | 191 | * Message Client <-> Service to transmit the audio. |
187 | */ | 192 | */ |
188 | struct ClientAudioMessage | 193 | struct ClientAudioMessage |
189 | { | 194 | { |
@@ -214,9 +219,9 @@ struct ClientCallMessage | |||
214 | struct GNUNET_MessageHeader header; | 219 | struct GNUNET_MessageHeader header; |
215 | 220 | ||
216 | /** | 221 | /** |
217 | * Which phone line to call at the peer? | 222 | * Always zero. |
218 | */ | 223 | */ |
219 | uint32_t line GNUNET_PACKED; | 224 | uint32_t reserved GNUNET_PACKED; |
220 | 225 | ||
221 | /** | 226 | /** |
222 | * Which peer is hosting the line? | 227 | * Which peer is hosting the line? |
@@ -224,6 +229,11 @@ struct ClientCallMessage | |||
224 | struct GNUNET_PeerIdentity target; | 229 | struct GNUNET_PeerIdentity target; |
225 | 230 | ||
226 | /** | 231 | /** |
232 | * Which phone line to call at the peer? | ||
233 | */ | ||
234 | struct GNUNET_HashCode line_port; | ||
235 | |||
236 | /** | ||
227 | * Identity of the caller. | 237 | * Identity of the caller. |
228 | */ | 238 | */ |
229 | struct GNUNET_CRYPTO_EcdsaPrivateKey caller_id; | 239 | struct GNUNET_CRYPTO_EcdsaPrivateKey caller_id; |
@@ -241,58 +251,74 @@ struct ClientPhonePickedupMessage | |||
241 | */ | 251 | */ |
242 | struct GNUNET_MessageHeader header; | 252 | struct GNUNET_MessageHeader header; |
243 | 253 | ||
254 | /** | ||
255 | * Call ID of the corresponding | ||
256 | * #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL | ||
257 | */ | ||
258 | uint32_t cid GNUNET_PACKED; | ||
259 | |||
244 | }; | 260 | }; |
245 | 261 | ||
246 | 262 | ||
247 | /** | 263 | /** |
248 | * Cadet message for phone is ringing. | 264 | * Information signed in a `struct CadetPhoneRingMessage` |
265 | * whereby the caller self-identifies to the receiver. | ||
249 | */ | 266 | */ |
250 | struct CadetPhoneRingMessage | 267 | struct CadetPhoneRingInfoPS |
251 | { | 268 | { |
252 | /** | 269 | /** |
253 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING | 270 | * Purpose for the signature, must be |
271 | * #GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING. | ||
254 | */ | 272 | */ |
255 | struct GNUNET_MessageHeader header; | 273 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; |
256 | 274 | ||
257 | /** | 275 | /** |
258 | * Desired target line. | 276 | * Which port did the call go to? |
259 | */ | 277 | */ |
260 | uint32_t remote_line GNUNET_PACKED; | 278 | struct GNUNET_HashCode line_port; |
261 | 279 | ||
262 | /** | 280 | /** |
263 | * Purpose for the signature. | 281 | * Which peer is the call for? |
264 | */ | 282 | */ |
265 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | 283 | struct GNUNET_PeerIdentity target_peer; |
266 | 284 | ||
267 | /** | 285 | /** |
268 | * Who is calling us? (also who is signing). | 286 | * When does the signature expire? |
269 | */ | 287 | */ |
270 | struct GNUNET_CRYPTO_EcdsaPublicKey caller_id; | 288 | struct GNUNET_TIME_AbsoluteNBO expiration_time; |
289 | }; | ||
290 | |||
271 | 291 | ||
292 | /** | ||
293 | * Cadet message to make a phone ring. Sent to the port | ||
294 | * of the respective phone. | ||
295 | */ | ||
296 | struct CadetPhoneRingMessage | ||
297 | { | ||
272 | /** | 298 | /** |
273 | * Who are we calling? | 299 | * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING |
274 | */ | 300 | */ |
275 | struct GNUNET_PeerIdentity target; | 301 | struct GNUNET_MessageHeader header; |
276 | 302 | ||
277 | /** | 303 | /** |
278 | * From where are we calling? | 304 | * Always zero. |
279 | */ | 305 | */ |
280 | struct GNUNET_PeerIdentity source; | 306 | uint32_t reserved GNUNET_PACKED; |
281 | 307 | ||
282 | /** | 308 | /** |
283 | * When does the signature expire? | 309 | * Who is calling us? (also who is signing). |
284 | */ | 310 | */ |
285 | struct GNUNET_TIME_AbsoluteNBO expiration_time; | 311 | struct GNUNET_CRYPTO_EcdsaPublicKey caller_id; |
286 | 312 | ||
287 | /** | 313 | /** |
288 | * Signature on the above. | 314 | * When does the signature expire? |
289 | */ | 315 | */ |
290 | struct GNUNET_CRYPTO_EcdsaSignature signature; | 316 | struct GNUNET_TIME_AbsoluteNBO expiration_time; |
291 | 317 | ||
292 | /** | 318 | /** |
293 | * Source line for audio data in the other direction. | 319 | * Signature over a `struct CadetPhoneRingInfoPS` |
294 | */ | 320 | */ |
295 | uint32_t source_line GNUNET_PACKED; | 321 | struct GNUNET_CRYPTO_EcdsaSignature signature; |
296 | 322 | ||
297 | }; | 323 | }; |
298 | 324 | ||
@@ -359,16 +385,6 @@ struct CadetAudioMessage | |||
359 | */ | 385 | */ |
360 | struct GNUNET_MessageHeader header; | 386 | struct GNUNET_MessageHeader header; |
361 | 387 | ||
362 | /** | ||
363 | * Target line on the receiving end. | ||
364 | */ | ||
365 | uint32_t remote_line GNUNET_PACKED; | ||
366 | |||
367 | /** | ||
368 | * The source line sending this data | ||
369 | */ | ||
370 | uint32_t source_line GNUNET_PACKED; | ||
371 | |||
372 | /* followed by audio data */ | 388 | /* followed by audio data */ |
373 | 389 | ||
374 | }; | 390 | }; |