GNUnet  0.19.3
conversation.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2013-2016 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
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  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
27 #ifndef CONVERSATION_H
28 #define CONVERSATION_H
29 
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #if 0 /* keep Emacsens' auto-indent happy */
36 }
37 #endif
38 #endif
39 
40 
41 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply ( \
42  GNUNET_TIME_UNIT_SECONDS, 60)
43 
44 
50 #define HIGH_BIT ((uint32_t) (1LL << 31))
51 
53 
54 
59 {
64 
65  /* followed by audio data */
66 };
67 
68 
73 {
78 
83 
88 };
89 
90 
95 {
100 
105  uint32_t cid GNUNET_PACKED;
106 
110  uint32_t key_len;
111 
115 };
116 
117 
122 {
127 
132  uint32_t cid GNUNET_PACKED;
133 };
134 
135 
140 {
145 
150  uint32_t cid GNUNET_PACKED;
151 };
152 
153 
158 {
163 
168  uint32_t cid GNUNET_PACKED;
169 };
170 
171 
177 {
182 
187  uint32_t cid GNUNET_PACKED;
188 };
189 
190 
195 {
200 
205  uint32_t cid GNUNET_PACKED;
206 
207  /* followed by audio data */
208 };
209 
210 
215 {
220 
225 
230 
234  struct GNUNET_HashCode line_port;
235 
239  uint32_t key_len;
240 
244 };
245 
246 
252 {
257 
262  uint32_t cid GNUNET_PACKED;
263 };
264 
265 
271 {
277 
281  struct GNUNET_HashCode line_port;
282 
287 
292 };
293 
294 
300 {
305 
310 
315 
319  uint32_t key_len;
320 
324  uint32_t sig_len;
325 
330 };
331 
332 
337 {
342 };
343 
344 
349 {
354 };
355 
356 
361 {
366 };
367 
368 
373 {
378 };
379 
380 
385 {
390 
391  /* followed by audio data */
392 };
393 
394 
396 
397 
398 #if 0 /* keep Emacsens' auto-indent happy */
399 {
400 #endif
401 #ifdef __cplusplus
402 }
403 #endif
404 
405 /* ifndef GNUNET_PROTOCOLS_CONVERSATION_H */
406 #endif
407 /* end of gnunet_protocols_conversation.h */
Identity service; implements identity management for GNUnet.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
Message to transmit the audio (between client and helpers).
Definition: conversation.h:59
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO.
Definition: conversation.h:63
Cadet message to transmit the audio.
Definition: conversation.h:385
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_AUDIO.
Definition: conversation.h:389
Cadet message for hanging up.
Definition: conversation.h:337
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_HANG_UP.
Definition: conversation.h:341
Cadet message for picking up.
Definition: conversation.h:349
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_PICK_UP.
Definition: conversation.h:353
Cadet message for phone resumed.
Definition: conversation.h:373
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RESUME.
Definition: conversation.h:377
Information signed in a struct CadetPhoneRingMessage whereby the caller self-identifies to the receiv...
Definition: conversation.h:271
struct GNUNET_PeerIdentity target_peer
Which peer is the call for?
Definition: conversation.h:286
struct GNUNET_TIME_AbsoluteNBO expiration_time
When does the signature expire?
Definition: conversation.h:291
struct GNUNET_CRYPTO_EccSignaturePurpose purpose
Purpose for the signature, must be GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING.
Definition: conversation.h:276
struct GNUNET_HashCode line_port
Which port did the call go to?
Definition: conversation.h:281
Cadet message to make a phone ring.
Definition: conversation.h:300
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_RING.
Definition: conversation.h:304
uint32_t key_len
The length of the key.
Definition: conversation.h:319
struct GNUNET_TIME_AbsoluteNBO expiration_time
When does the signature expire?
Definition: conversation.h:314
uint32_t reserved
Always zero.
Definition: conversation.h:309
uint32_t sig_len
The length of the signature.
Definition: conversation.h:324
Cadet message for phone suspended.
Definition: conversation.h:361
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CADET_PHONE_SUSPEND.
Definition: conversation.h:365
Message Client <-> Service to transmit the audio.
Definition: conversation.h:195
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO.
Definition: conversation.h:199
uint32_t cid
CID, internal caller ID to identify which active call we are sending data to.
Definition: conversation.h:205
Client -> Service message to call a phone.
Definition: conversation.h:215
struct GNUNET_HashCode line_port
Which phone line to call at the peer?
Definition: conversation.h:234
struct GNUNET_PeerIdentity target
Which peer is hosting the line?
Definition: conversation.h:229
uint32_t key_len
The identity key length.
Definition: conversation.h:239
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL.
Definition: conversation.h:219
uint32_t reserved
Always zero.
Definition: conversation.h:224
Client <-> Service hang up phone that may or may not be ringing.
Definition: conversation.h:177
uint32_t cid
CID, internal caller ID to identify which active call we are talking about.
Definition: conversation.h:187
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP.
Definition: conversation.h:181
Service -> Client: other peer has picked up the phone, we are now talking.
Definition: conversation.h:252
uint32_t cid
Call ID of the corresponding GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL.
Definition: conversation.h:262
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP.
Definition: conversation.h:256
Client -> Service pick up phone that is ringing.
Definition: conversation.h:158
uint32_t cid
CID, internal caller ID to identify which active call we are talking about.
Definition: conversation.h:168
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP.
Definition: conversation.h:162
Client -> Service message to register a phone.
Definition: conversation.h:73
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER.
Definition: conversation.h:77
struct GNUNET_HashCode line_port
Phone line / CADET port to register.
Definition: conversation.h:87
uint32_t reserved
Always zero.
Definition: conversation.h:82
Service <-> Client message for phone was resumed.
Definition: conversation.h:140
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME.
Definition: conversation.h:144
uint32_t cid
CID, internal caller ID to identify which active call we are talking about.
Definition: conversation.h:150
Service -> Client message for phone is ringing.
Definition: conversation.h:95
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING.
Definition: conversation.h:99
uint32_t cid
CID, internal caller ID number used in the future to identify which active call we are talking about.
Definition: conversation.h:105
uint32_t key_len
The identity key length.
Definition: conversation.h:110
Service <-> Client message for phone was suspended.
Definition: conversation.h:122
struct GNUNET_MessageHeader header
Type is: GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND.
Definition: conversation.h:126
uint32_t cid
CID, internal caller ID to identify which active call we are talking about.
Definition: conversation.h:132
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
A 512-bit hashcode.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Time for absolute time used by GNUnet, in microseconds and in network byte order.