GNUnet  0.10.x
fs.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2003--2012 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 
26 #ifndef FS_H
27 #define FS_H
28 
29 #include "gnunet_constants.h"
31 #include "gnunet_dht_service.h"
32 #include "gnunet_fs_service.h"
33 #include "gnunet_block_lib.h"
34 #include "block_fs.h"
35 
36 
40 #define DBLOCK_SIZE (32 * 1024)
41 
47 #define HASHING_BLOCKSIZE (1024 * 128)
48 
49 
58 
63 };
64 
65 
67 
68 
77  struct GNUNET_MessageHeader header;
78 
83  uint32_t purpose GNUNET_PACKED;
84 
88  struct GNUNET_TIME_AbsoluteNBO expiration_time;
89 
93  struct ContentHashKey chk;
94 
98  uint64_t file_length;
99 };
100 
101 
110  struct GNUNET_MessageHeader header;
111 
116  uint32_t purpose GNUNET_PACKED;
117 
121  struct GNUNET_TIME_AbsoluteNBO expiration_time;
122 
127 
132 };
133 
134 
152  struct GNUNET_MessageHeader header;
153 
158 
167 
174  uint64_t inode GNUNET_PACKED;
175 
179  struct GNUNET_HashCode file_id;
180 
181  /* this is followed by a 0-terminated
182  * filename of a file with the hash
183  * "file_id" as seen by the client */
184 };
185 
186 
196  struct GNUNET_MessageHeader header;
197 
202 
206  struct GNUNET_HashCode file_id;
207 
208  /* this is followed by a 0-terminated
209  * filename of a file with the hash
210  * "file_id" as seen by the client */
211 };
212 
213 
225  struct GNUNET_MessageHeader header;
226 
231 
235  struct GNUNET_HashCode file_id;
236 };
237 
238 
242 #define SEARCH_MESSAGE_OPTION_NONE 0
243 
247 #define SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY 1
248 
255 #define SEARCH_MESSAGE_OPTION_CONTINUED 2
256 
257 
266  struct GNUNET_MessageHeader header;
267 
278 
282  uint32_t type GNUNET_PACKED;
283 
288 
299  struct GNUNET_PeerIdentity target;
300 
305  struct GNUNET_HashCode query;
306 
307  /* this is followed by the hash codes of already-known
308  * results (which should hence be excluded from what
309  * the service returns); naturally, this only applies
310  * to queries that can have multiple results (UBLOCKS).
311  */
312 };
313 
314 
321 struct PutMessage {
325  struct GNUNET_MessageHeader header;
326 
330  uint32_t type GNUNET_PACKED;
331 
336 
337  /* this is followed by the actual encrypted content */
338 };
339 
350  struct GNUNET_MessageHeader header;
351 
355  uint32_t type GNUNET_PACKED;
356 
360  struct GNUNET_TIME_AbsoluteNBO expiration;
361 
367 
373 
378  uint32_t respect_offered;
379 
380  /* this is followed by the actual encrypted content */
381 };
383 
384 
385 #endif
386 
387 /* end of fs.h */
static char * expiration
Credential TTL.
static GNUNET_CronTime last_transmission
Response from FS service with a result for a previous FS search.
Definition: fs.h:321
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static char * device
Video device to capture from.
Definition: gnunet-qr.c:39
content hash key
Definition: fs.h:53
uint64_t file_length
Size of the shared file (to be signed).
Definition: fs.h:98
Message send by FS service in response to a request asking for a list of all indexed files...
Definition: fs.h:191
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
Message sent from a GNUnet (fs) publishing activity to the gnunet-fs-service to initiate indexing of ...
Definition: fs.h:148
static unsigned int anonymity_level
Anonymity level option to use for publishing.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
struct GNUNET_HashCode query
Hash of the encrypted content, used for querying.
Definition: fs.h:62
Message sent from a GNUnet (fs) unindexing activity to the gnunet-service-fs to indicate that a file ...
Definition: fs.h:221
A 512-bit hashcode.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
uint32_t respect_offered
How much respect did we offer (in total) before getting an answer (estimate).
Definition: fs.h:378
an ECC signature using EdDSA.
Message sent from the service with the signed LOC URI.
Definition: fs.h:105
Response from FS service with a result for a previous FS search.
Definition: fs.h:346
struct GNUNET_HashCode key
Hash of the original content, used for encryption.
Definition: fs.h:57
#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).
Message sent from a GNUnet (fs) publishing activity to sign a LOC URI.
Definition: fs.h:73
#define GNUNET_PACKED
gcc-ism to get packed structs.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Header for all communications.
static unsigned long long reserved
How much space have we currently reserved?
Message sent from a GNUnet (fs) search activity to the gnunet-service-fs to start a search...
Definition: fs.h:262
uint32_t num_transmissions
How often did we transmit this query before getting an answer (estimate).
Definition: fs.h:372