GNUnet  0.11.x
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 {
77  struct GNUNET_MessageHeader header;
78 
83 
87  struct GNUNET_HashCode line_port;
88 };
89 
90 
95 {
99  struct GNUNET_MessageHeader header;
100 
105  uint32_t cid GNUNET_PACKED;
106 
110  struct GNUNET_IDENTITY_PublicKey caller_id;
111 };
112 
113 
118 {
122  struct GNUNET_MessageHeader header;
123 
128  uint32_t cid GNUNET_PACKED;
129 };
130 
131 
136 {
140  struct GNUNET_MessageHeader header;
141 
146  uint32_t cid GNUNET_PACKED;
147 };
148 
149 
154 {
158  struct GNUNET_MessageHeader header;
159 
164  uint32_t cid GNUNET_PACKED;
165 };
166 
167 
173 {
177  struct GNUNET_MessageHeader header;
178 
183  uint32_t cid GNUNET_PACKED;
184 };
185 
186 
191 {
195  struct GNUNET_MessageHeader header;
196 
201  uint32_t cid GNUNET_PACKED;
202 
203  /* followed by audio data */
204 };
205 
206 
211 {
215  struct GNUNET_MessageHeader header;
216 
221 
225  struct GNUNET_PeerIdentity target;
226 
230  struct GNUNET_HashCode line_port;
231 
235  struct GNUNET_IDENTITY_PrivateKey caller_id;
236 };
237 
238 
244 {
248  struct GNUNET_MessageHeader header;
249 
254  uint32_t cid GNUNET_PACKED;
255 };
256 
257 
263 {
269 
273  struct GNUNET_HashCode line_port;
274 
279 
283  struct GNUNET_TIME_AbsoluteNBO expiration_time;
284 };
285 
286 
292 {
296  struct GNUNET_MessageHeader header;
297 
302 
306  struct GNUNET_IDENTITY_PublicKey caller_id;
307 
311  struct GNUNET_TIME_AbsoluteNBO expiration_time;
312 
316  struct GNUNET_IDENTITY_Signature signature;
317 };
318 
319 
324 {
328  struct GNUNET_MessageHeader header;
329 };
330 
331 
336 {
340  struct GNUNET_MessageHeader header;
341 };
342 
343 
348 {
352  struct GNUNET_MessageHeader header;
353 };
354 
355 
360 {
364  struct GNUNET_MessageHeader header;
365 };
366 
367 
372 {
376  struct GNUNET_MessageHeader header;
377 
378  /* followed by audio data */
379 };
380 
381 
383 
384 
385 #if 0 /* keep Emacsens' auto-indent happy */
386 {
387 #endif
388 #ifdef __cplusplus
389 }
390 #endif
391 
392 /* ifndef GNUNET_PROTOCOLS_CONVERSATION_H */
393 #endif
394 /* end of gnunet_protocols_conversation.h */
Client -> Service message to call a phone.
Definition: conversation.h:210
Cadet message to make a phone ring.
Definition: conversation.h:291
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO.
Definition: conversation.h:63
uint32_t purpose
What does this signature vouch for? This must contain a GNUNET_SIGNATURE_PURPOSE_XXX constant (from g...
Information signed in a struct CadetPhoneRingMessage whereby the caller self-identifies to the receiv...
Definition: conversation.h:262
A private key for an identity as per LSD0001.
Client -> Service message to register a phone.
Definition: conversation.h:72
Client -> Service pick up phone that is ringing.
Definition: conversation.h:153
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
header of what an ECC signature signs this must be followed by "size - 8" bytes of the actual signed ...
Client <-> Service hang up phone that may or may not be ringing.
Definition: conversation.h:172
Message to transmit the audio (between client and helpers).
Definition: conversation.h:58
An identity signature as per LSD0001.
A 512-bit hashcode.
Cadet message for phone suspended.
Definition: conversation.h:347
Service <-> Client message for phone was resumed.
Definition: conversation.h:135
static struct GNUNET_PeerIdentity * target_peer
ID of the targeted peer.
Service -> Client: other peer has picked up the phone, we are now talking.
Definition: conversation.h:243
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
The identity of the host (wraps the signing key of the peer).
An identity key as per LSD0001.
#define GNUNET_PACKED
gcc-ism to get packed structs.
Service -> Client message for phone is ringing.
Definition: conversation.h:94
Cadet message for phone resumed.
Definition: conversation.h:359
Message Client <-> Service to transmit the audio.
Definition: conversation.h:190
Header for all communications.
Cadet message for hanging up.
Definition: conversation.h:323
static unsigned long long reserved
How much space have we currently reserved?
Service <-> Client message for phone was suspended.
Definition: conversation.h:117
Cadet message for picking up.
Definition: conversation.h:335
Cadet message to transmit the audio.
Definition: conversation.h:371