GNUnet  0.11.x
setu.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2012-2014, 2020 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 
47 };
48 
49 
56 {
60  struct GNUNET_MessageHeader header;
61 
66 
71 };
72 
73 
79 {
83  struct GNUNET_MessageHeader header;
84 
88  uint32_t accept_reject_id GNUNET_PACKED;
89 
93  uint32_t request_id GNUNET_PACKED;
94 
99  uint8_t force_delta;
100 
105  uint8_t force_full;
106 
111  uint8_t byzantine;
112 
117  uint8_t symmetric;
118 
124 };
125 
126 
132 {
136  struct GNUNET_MessageHeader header;
137 
141  uint32_t accept_reject_id GNUNET_PACKED;
142 };
143 
144 
149 {
153  struct GNUNET_MessageHeader header;
154 
159  uint32_t accept_id GNUNET_PACKED;
160 
165 
166  /* rest: context message, that is, application-specific
167  message to convince listener to pick up */
168 };
169 
170 
177 {
181  struct GNUNET_MessageHeader header;
182 
187  uint32_t request_id GNUNET_PACKED;
188 
193 
197  struct GNUNET_HashCode app_id;
198 
203  uint8_t force_delta;
204 
209  uint8_t force_full;
210 
215  uint8_t byzantine;
216 
220  uint8_t symmetric;
221 
227 
228  /* rest: context message, that is, application-specific
229  message to convince listener to pick up */
230 };
231 
232 
240 {
244  struct GNUNET_MessageHeader header;
245 
249  uint64_t current_size;
250 
254  uint32_t request_id GNUNET_PACKED;
255 
260  uint16_t result_status GNUNET_PACKED;
261 
265  uint16_t element_type GNUNET_PACKED;
266 
267  /* rest: the actual element */
268 };
269 
270 
276 {
280  struct GNUNET_MessageHeader header;
281 
285  uint16_t element_type GNUNET_PACKED;
286 
291 
292  /* rest: the actual element */
293 };
294 
295 
300 {
304  struct GNUNET_MessageHeader header;
305 
309  uint32_t request_id GNUNET_PACKED;
310 };
311 
312 
314 
315 #endif
Message sent by the client to the service to start listening for incoming requests to perform a certa...
Definition: setu.h:55
uint8_t symmetric
Also return set elements we are sending to the remote peer.
Definition: setu.h:220
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SETU_CREATE.
Definition: setu.h:45
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
static struct GNUNET_HashCode app_id
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: setu.h:111
Message sent by the client to the service to ask starting a new set to perform operations with...
Definition: setu.h:40
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: setu.h:209
uint8_t symmetric
GNUNET_YES to also send back set elements we are sending to the remote peer.
Definition: setu.h:117
Message sent by client to service to initiate a set operation as a client (not as listener)...
Definition: setu.h:176
uint32_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: setu.h:226
A 512-bit hashcode.
Message sent by a listening client to the service to accept performing the operation with the other p...
Definition: setu.h:78
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it&#39;s less efficient.
Definition: setu.h:203
uint8_t byzantine
GNUNET_YES to fail operations where Byzantine faults are suspected
Definition: setu.h:215
uint64_t current_size
Current set size.
Definition: setu.h:249
Message sent by client to the service to add an element to the set.
Definition: setu.h:275
A request for an operation with another client.
Definition: setu.h:148
static struct GNUNET_PeerIdentity * target_peer
ID of the targeted peer.
#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).
uint8_t force_full
Always send full sets, even if delta operations would be more efficient.
Definition: setu.h:105
#define GNUNET_PACKED
gcc-ism to get packed structs.
Message sent by the service to the client to indicate an element that is removed (set intersection) o...
Definition: setu.h:239
Sent to the service by the client in order to cancel a set operation.
Definition: setu.h:299
Header for all communications.
uint8_t force_delta
Always use delta operation instead of sending full sets, even it it&#39;s less efficient.
Definition: setu.h:99
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?
uint32_t byzantine_lower_bound
Lower bound for the set size, used only when byzantine mode is enabled.
Definition: setu.h:123
Message sent by a listening client to the service to reject performing the operation with the other p...
Definition: setu.h:131