GNUnet  0.11.x
set.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2012-2014 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  */
26 #ifndef SET_H
27 #define SET_H
28 
29 #include "platform.h"
30 #include "gnunet_common.h"
31 #include "gnunet_set_service.h"
32 
34 
41 {
46 
51 };
52 
53 
60 {
65 
70 
75 };
76 
77 
83 {
88 
92  uint32_t accept_reject_id GNUNET_PACKED;
93 
97  uint32_t request_id GNUNET_PACKED;
98 
103  uint32_t result_mode GNUNET_PACKED;
104 
109  uint8_t force_delta;
110 
115  uint8_t force_full;
116 
121  uint8_t byzantine;
122 
128 };
129 
130 
136 {
141 
145  uint32_t accept_reject_id GNUNET_PACKED;
146 };
147 
148 
153 {
158 
163  uint32_t accept_id GNUNET_PACKED;
164 
169 
170  /* rest: context message, that is, application-specific
171  message to convince listener to pick up */
172 };
173 
174 
181 {
186 
191  uint32_t result_mode GNUNET_PACKED;
192 
197 
201  struct GNUNET_HashCode app_id;
202 
207  uint32_t request_id GNUNET_PACKED;
208 
213  uint8_t force_delta;
214 
219  uint8_t force_full;
220 
225  uint8_t byzantine;
226 
232 
233  /* rest: context message, that is, application-specific
234  message to convince listener to pick up */
235 };
236 
237 
245 {
250 
254  uint64_t current_size;
255 
259  uint32_t request_id GNUNET_PACKED;
260 
265  uint16_t result_status GNUNET_PACKED;
266 
270  uint16_t element_type GNUNET_PACKED;
271 
272  /* rest: the actual element */
273 };
274 
275 
281 {
287 
291  uint16_t element_type GNUNET_PACKED;
292 
297 
298  /* rest: the actual element */
299 };
300 
301 
307 {
312 
316  uint32_t request_id GNUNET_PACKED;
317 };
318 
319 
325 {
330 
335  uint16_t iteration_id GNUNET_PACKED;
336 
341  uint16_t element_type GNUNET_PACKED;
342 
343  /* rest: element */
344 };
345 
346 
351 {
356 
360  uint32_t send_more;
361 };
362 
363 
368 {
373 
377  uint32_t cookie;
378 };
379 
380 
385 {
390 
394  uint32_t cookie;
395 };
396 
397 
399 
400 #endif
Message sent by the service to the client to indicate an element that is removed (set intersection) o...
Definition: set.h:244
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: set.h:115
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it&#39;s less efficient.
Definition: set.h:109
A request for an operation with another client.
Definition: set.h:152
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
Set element transmitted by service to client in response to a set iteration request.
Definition: set.h:324
static struct GNUNET_HashCode app_id
uint8_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: set.h:127
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: set.h:219
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
uint64_t current_size
Current set size.
Definition: set.h:254
Message sent by the client to the service to ask starting a new set to perform operations with...
Definition: set.h:40
Message sent by the client to the service to start listening for incoming requests to perform a certa...
Definition: set.h:59
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it&#39;s less efficient.
Definition: set.h:213
uint32_t operation
Operation type, values of enum GNUNET_SET_OperationType
Definition: set.h:50
A 512-bit hashcode.
Client connects to a lazily copied set.
Definition: set.h:384
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: set.h:225
uint8_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: set.h:231
Sent to the service by the client in order to cancel a set operation.
Definition: set.h:306
Message sent by client to service to initiate a set operation as a client (not as listener)...
Definition: set.h:180
Client acknowledges receiving element in iteration.
Definition: set.h:350
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_CREATE.
Definition: set.h:45
static struct GNUNET_PeerIdentity * target_peer
ID of the targeted peer.
uint32_t cookie
Temporary name for the copied set.
Definition: set.h:394
#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).
#define GNUNET_PACKED
gcc-ism to get packed structs.
Server responds to a lazy copy request.
Definition: set.h:367
Message sent by client to the service to add or remove an element to/from the set.
Definition: set.h:280
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: set.h:121
uint32_t cookie
Temporary name for the copied set.
Definition: set.h:377
Header for all communications.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
static unsigned long long reserved
How much space have we currently reserved?
Message sent by a listening client to the service to reject performing the operation with the other p...
Definition: set.h:135
Message sent by a listening client to the service to accept performing the operation with the other p...
Definition: set.h:82
uint32_t send_more
Non-zero if the service should continue sending elements.
Definition: set.h:360