GNUnet  0.10.x
gnunet-service-set_protocol.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2013, 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_PROTOCOL_H
27 #define SET_PROTOCOL_H
28 
29 #include "platform.h"
30 #include "gnunet_common.h"
31 
32 
34 
40 
45 
50 
55 
56  /* rest: optional message */
57 };
58 
59 
66 struct IBFMessage {
71 
76  uint8_t order;
77 
81  uint8_t reserved1;
82 
86  uint16_t reserved2 GNUNET_PACKED;
87 
91  uint32_t offset GNUNET_PACKED;
92 
96  uint32_t salt GNUNET_PACKED;
97 
98  /* rest: buckets */
99 };
100 
101 
107 
111  uint32_t salt GNUNET_PACKED;
112 
117 
118  /* rest: inquiry IBF keys */
119 };
120 
121 
132 
136  uint32_t sender_element_count GNUNET_PACKED;
137 };
138 
139 
143 struct BFMessage {
148 
152  uint32_t sender_element_count GNUNET_PACKED;
153 
158  struct GNUNET_HashCode element_xor_hash;
159 
163  uint32_t sender_mutator GNUNET_PACKED;
164 
168  uint32_t bloomfilter_total_length GNUNET_PACKED;
169 
173  uint32_t bits_per_element GNUNET_PACKED;
174 
178 };
179 
180 
192 
196  uint32_t final_element_count GNUNET_PACKED;
197 
201  struct GNUNET_HashCode element_xor_hash;
202 };
203 
204 
213 
214  uint64_t set_size;
215 };
216 
218 
219 #endif
uint8_t reserved1
Padding, must be 0.
uint32_t element_count
For Intersection: my element count.
Message containing buckets of an invertible bloom filter.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
uint8_t order
Order of the whole ibf, where num_buckets = 2^order.
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST.
struct GNUNET_HashCode app_idX
Application-specific identifier of the request.
A 512-bit hashcode.
Bloom filter messages exchanged for set intersection calculation.
Strata estimator together with the peer&#39;s overall set size.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
During intersection, the first (and possibly second) message send it the number of elements in the se...
#define GNUNET_PACKED
gcc-ism to get packed structs.
uint32_t operation
Operation to request, values from enum GNUNET_SET_OperationType
Header for all communications.
Last message, send to confirm the final set.
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?