GNUnet  0.10.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 
78 
84 {
89 
93  uint32_t accept_reject_id GNUNET_PACKED;
94 
98  uint32_t request_id GNUNET_PACKED;
99 
104  uint32_t result_mode GNUNET_PACKED;
105 
110  uint8_t force_delta;
111 
116  uint8_t force_full;
117 
122  uint8_t byzantine;
123 
129 };
130 
131 
137 {
142 
146  uint32_t accept_reject_id GNUNET_PACKED;
147 
148 };
149 
150 
155 {
160 
165  uint32_t accept_id GNUNET_PACKED;
166 
171 
172  /* rest: context message, that is, application-specific
173  message to convince listener to pick up */
174 };
175 
176 
183 {
188 
193  uint32_t result_mode GNUNET_PACKED;
194 
199 
203  struct GNUNET_HashCode app_id;
204 
209  uint32_t request_id GNUNET_PACKED;
210 
215  uint8_t force_delta;
216 
221  uint8_t force_full;
222 
227  uint8_t byzantine;
228 
234 
235  /* rest: context message, that is, application-specific
236  message to convince listener to pick up */
237 };
238 
239 
247 {
252 
256  uint64_t current_size;
257 
261  uint32_t request_id GNUNET_PACKED;
262 
267  uint16_t result_status GNUNET_PACKED;
268 
272  uint16_t element_type GNUNET_PACKED;
273 
274  /* rest: the actual element */
275 };
276 
277 
283 {
289 
293  uint16_t element_type GNUNET_PACKED;
294 
299 
300  /* rest: the actual element */
301 };
302 
303 
309 {
314 
318  uint32_t request_id GNUNET_PACKED;
319 };
320 
321 
327 {
332 
337  uint16_t iteration_id GNUNET_PACKED;
338 
343  uint16_t element_type GNUNET_PACKED;
344 
345  /* rest: element */
346 };
347 
348 
353 {
358 
362  uint32_t send_more;
363 };
364 
365 
370 {
375 
379  uint32_t cookie;
380 };
381 
382 
387 {
392 
396  uint32_t cookie;
397 };
398 
399 
401 
402 #endif
Message sent by the service to the client to indicate an element that is removed (set intersection) o...
Definition: set.h:246
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: set.h:116
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it&#39;s less efficient.
Definition: set.h:110
A request for an operation with another client.
Definition: set.h:154
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:326
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:128
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: set.h:221
#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:256
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:215
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:386
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: set.h:227
uint8_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: set.h:233
Sent to the service by the client in order to cancel a set operation.
Definition: set.h:308
Message sent by client to service to initiate a set operation as a client (not as listener)...
Definition: set.h:182
Client acknowledges receiving element in iteration.
Definition: set.h:352
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:396
#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:369
Message sent by client to the service to add or remove an element to/from the set.
Definition: set.h:282
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: set.h:122
uint32_t cookie
Temporary name for the copied set.
Definition: set.h:379
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:136
Message sent by a listening client to the service to accept performing the operation with the other p...
Definition: set.h:83
uint32_t send_more
Non-zero if the service should continue sending elements.
Definition: set.h:362