2 This file is part of GNUnet.
3 Copyright (C) 2013 Christian Grothoff (and other contributing authors)
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
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 * @file conversation/conversation.h
23 * @brief constants for network protocols
24 * @author Siomon Dieterle
25 * @author Andreas Fuchs
27 #ifndef CONVERSATION_H
28 #define CONVERSATION_H
33 #if 0 /* keep Emacsens' auto-indent happy */
39 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
43 * Message to transmit the audio (between client and helpers).
48 * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO
50 struct GNUNET_MessageHeader header;
52 /* followed by audio data */
58 * Client -> Service message to register a phone.
60 struct ClientPhoneRegisterMessage
63 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER
65 struct GNUNET_MessageHeader header;
68 * Phone line to register.
70 uint32_t line GNUNET_PACKED;
75 * Service -> Client message for phone is ringing.
77 struct ClientPhoneRingMessage
80 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING
82 struct GNUNET_MessageHeader header;
85 * CID, internal caller ID to identify which active call we are
88 uint32_t cid GNUNET_PACKED;
93 struct GNUNET_CRYPTO_EcdsaPublicKey caller_id;
99 * Service <-> Client message for phone was suspended.
101 struct ClientPhoneSuspendMessage
104 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND
106 struct GNUNET_MessageHeader header;
109 * CID, internal caller ID to identify which active call we are
112 uint32_t cid GNUNET_PACKED;
118 * Service <-> Client message for phone was resumed.
120 struct ClientPhoneResumeMessage
123 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME
125 struct GNUNET_MessageHeader header;
128 * CID, internal caller ID to identify which active call we are
131 uint32_t cid GNUNET_PACKED;
137 * Client -> Service pick up phone that is ringing.
139 struct ClientPhonePickupMessage
142 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP
144 struct GNUNET_MessageHeader header;
147 * CID, internal caller ID to identify which active call we are
150 uint32_t cid GNUNET_PACKED;
156 * Client <-> Service hang up phone that may or may not be ringing.
157 * Also sent in response to a (failed) `struct ClientCallMessage`.
159 struct ClientPhoneHangupMessage
162 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP
164 struct GNUNET_MessageHeader header;
167 * CID, internal caller ID to identify which active call we are
170 uint32_t cid GNUNET_PACKED;
176 * Message Client <->Service to transmit the audio.
178 struct ClientAudioMessage
181 * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO
183 struct GNUNET_MessageHeader header;
186 * CID, internal caller ID to identify which active call we are
189 uint32_t cid GNUNET_PACKED;
191 /* followed by audio data */
197 * Client -> Service message to call a phone.
199 struct ClientCallMessage
202 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL
204 struct GNUNET_MessageHeader header;
207 * Which phone line to call at the peer?
209 uint32_t line GNUNET_PACKED;
212 * Which peer is hosting the line?
214 struct GNUNET_PeerIdentity target;
217 * Identity of the caller.
219 struct GNUNET_CRYPTO_EcdsaPrivateKey caller_id;
224 * Service -> Client: other peer has picked up the phone, we are
227 struct ClientPhonePickedupMessage
230 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP
232 struct GNUNET_MessageHeader header;
238 * Cadet message for phone is ringing.
240 struct CadetPhoneRingMessage
243 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING
245 struct GNUNET_MessageHeader header;
248 * Desired target line.
250 uint32_t remote_line GNUNET_PACKED;
253 * Purpose for the signature.
255 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
258 * Who is calling us? (also who is signing).
260 struct GNUNET_CRYPTO_EcdsaPublicKey caller_id;
263 * Who are we calling?
265 struct GNUNET_PeerIdentity target;
268 * From where are we calling?
270 struct GNUNET_PeerIdentity source;
273 * When does the signature expire?
275 struct GNUNET_TIME_AbsoluteNBO expiration_time;
278 * Signature on the above.
280 struct GNUNET_CRYPTO_EcdsaSignature signature;
283 * Source line for audio data in the other direction.
285 uint32_t source_line GNUNET_PACKED;
291 * Cadet message for hanging up.
293 struct CadetPhoneHangupMessage
296 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP
298 struct GNUNET_MessageHeader header;
304 * Cadet message for picking up.
306 struct CadetPhonePickupMessage
309 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP
311 struct GNUNET_MessageHeader header;
317 * Cadet message for phone suspended.
319 struct CadetPhoneSuspendMessage
322 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND
324 struct GNUNET_MessageHeader header;
330 * Cadet message for phone resumed.
332 struct CadetPhoneResumeMessage
335 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME
337 struct GNUNET_MessageHeader header;
343 * Cadet message to transmit the audio.
345 struct CadetAudioMessage
348 * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO
350 struct GNUNET_MessageHeader header;
353 * Target line on the receiving end.
355 uint32_t remote_line GNUNET_PACKED;
358 * The source line sending this data
360 uint32_t source_line GNUNET_PACKED;
362 /* followed by audio data */
368 #if 0 /* keep Emacsens' auto-indent happy */
375 /* ifndef GNUNET_PROTOCOLS_CONVERSATION_H */
377 /* end of gnunet_protocols_conversation.h */