aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/fs.h14
-rw-r--r--src/fs/fs_api.c18
-rw-r--r--src/fs/fs_api.h18
-rw-r--r--src/fs/fs_download.c16
-rw-r--r--src/fs/fs_namespace.c20
-rw-r--r--src/fs/fs_namespace_advertise.c4
-rw-r--r--src/fs/fs_publish.c2
-rw-r--r--src/fs/fs_publish_ksk.c4
-rw-r--r--src/fs/fs_search.c54
-rw-r--r--src/fs/fs_sharetree.c10
-rw-r--r--src/fs/fs_unindex.c4
-rw-r--r--src/fs/fs_uri.c14
-rw-r--r--src/fs/gnunet-fs.c2
-rw-r--r--src/fs/gnunet-pseudonym.c6
-rw-r--r--src/fs/gnunet-service-fs.c2
-rw-r--r--src/fs/gnunet-service-fs.h4
-rw-r--r--src/fs/gnunet-service-fs_cp.c24
-rw-r--r--src/fs/gnunet-service-fs_indexing.c22
-rw-r--r--src/fs/gnunet-service-fs_indexing.h2
-rw-r--r--src/fs/gnunet-service-fs_lc.c14
-rw-r--r--src/fs/gnunet-service-fs_pe.c4
-rw-r--r--src/fs/gnunet-service-fs_pr.c52
-rw-r--r--src/fs/gnunet-service-fs_pr.h14
-rw-r--r--src/fs/gnunet-service-fs_push.c4
-rw-r--r--src/fs/gnunet-service-fs_put.c2
-rw-r--r--src/fs/plugin_block_fs.c16
-rw-r--r--src/fs/test_fs_namespace.c4
27 files changed, 175 insertions, 175 deletions
diff --git a/src/fs/fs.h b/src/fs/fs.h
index 059b8920d..3aa9fcc1b 100644
--- a/src/fs/fs.h
+++ b/src/fs/fs.h
@@ -55,12 +55,12 @@ struct ContentHashKey
55 /** 55 /**
56 * Hash of the original content, used for encryption. 56 * Hash of the original content, used for encryption.
57 */ 57 */
58 GNUNET_HashCode key; 58 struct GNUNET_HashCode key;
59 59
60 /** 60 /**
61 * Hash of the encrypted content, used for querying. 61 * Hash of the encrypted content, used for querying.
62 */ 62 */
63 GNUNET_HashCode query; 63 struct GNUNET_HashCode query;
64}; 64};
65 65
66 66
@@ -112,7 +112,7 @@ struct IndexStartMessage
112 /** 112 /**
113 * Hash of the file that we would like to index. 113 * Hash of the file that we would like to index.
114 */ 114 */
115 GNUNET_HashCode file_id; 115 struct GNUNET_HashCode file_id;
116 116
117 /* this is followed by a 0-terminated 117 /* this is followed by a 0-terminated
118 * filename of a file with the hash 118 * filename of a file with the hash
@@ -141,7 +141,7 @@ struct IndexInfoMessage
141 /** 141 /**
142 * Hash of the indexed file. 142 * Hash of the indexed file.
143 */ 143 */
144 GNUNET_HashCode file_id; 144 struct GNUNET_HashCode file_id;
145 145
146 /* this is followed by a 0-terminated 146 /* this is followed by a 0-terminated
147 * filename of a file with the hash 147 * filename of a file with the hash
@@ -174,7 +174,7 @@ struct UnindexMessage
174 /** 174 /**
175 * Hash of the file that we will unindex. 175 * Hash of the file that we will unindex.
176 */ 176 */
177 GNUNET_HashCode file_id; 177 struct GNUNET_HashCode file_id;
178 178
179}; 179};
180 180
@@ -245,7 +245,7 @@ struct SearchMessage
245 * <p> 245 * <p>
246 * If the request is for a KBLOCK, "target" must be all zeros. 246 * If the request is for a KBLOCK, "target" must be all zeros.
247 */ 247 */
248 GNUNET_HashCode target; 248 struct GNUNET_HashCode target;
249 249
250 /** 250 /**
251 * Hash of the keyword (aka query) for KBLOCKs; Hash of 251 * Hash of the keyword (aka query) for KBLOCKs; Hash of
@@ -253,7 +253,7 @@ struct SearchMessage
253 * and hash of the identifier XORed with the target for 253 * and hash of the identifier XORed with the target for
254 * SBLOCKS (aka query). 254 * SBLOCKS (aka query).
255 */ 255 */
256 GNUNET_HashCode query; 256 struct GNUNET_HashCode query;
257 257
258 /* this is followed by the hash codes of already-known 258 /* this is followed by the hash codes of already-known
259 * results (which should hence be excluded from what 259 * results (which should hence be excluded from what
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index 4265d8d51..28c887ddd 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -819,7 +819,7 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h, const char *fn,
819 if ((GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.file.file_size)) || 819 if ((GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.file.file_size)) ||
820 (GNUNET_OK != 820 (GNUNET_OK !=
821 GNUNET_BIO_read (rh, "fileid", &ret->data.file.file_id, 821 GNUNET_BIO_read (rh, "fileid", &ret->data.file.file_id,
822 sizeof (GNUNET_HashCode)))) 822 sizeof (struct GNUNET_HashCode))))
823 { 823 {
824 GNUNET_break (0); 824 GNUNET_break (0);
825 goto cleanup; 825 goto cleanup;
@@ -841,7 +841,7 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h, const char *fn,
841 if ((GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.file.file_size)) || 841 if ((GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.file.file_size)) ||
842 (GNUNET_OK != 842 (GNUNET_OK !=
843 GNUNET_BIO_read (rh, "fileid", &ret->data.file.file_id, 843 GNUNET_BIO_read (rh, "fileid", &ret->data.file.file_id,
844 sizeof (GNUNET_HashCode)))) 844 sizeof (struct GNUNET_HashCode))))
845 { 845 {
846 GNUNET_break (0); 846 GNUNET_break (0);
847 goto cleanup; 847 goto cleanup;
@@ -1198,7 +1198,7 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
1198 if ((GNUNET_OK != GNUNET_BIO_write_int64 (wh, fi->data.file.file_size)) || 1198 if ((GNUNET_OK != GNUNET_BIO_write_int64 (wh, fi->data.file.file_size)) ||
1199 (GNUNET_OK != 1199 (GNUNET_OK !=
1200 GNUNET_BIO_write (wh, &fi->data.file.file_id, 1200 GNUNET_BIO_write (wh, &fi->data.file.file_id,
1201 sizeof (GNUNET_HashCode)))) 1201 sizeof (struct GNUNET_HashCode))))
1202 { 1202 {
1203 GNUNET_break (0); 1203 GNUNET_break (0);
1204 goto cleanup; 1204 goto cleanup;
@@ -1575,7 +1575,7 @@ GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc)
1575 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, (uint32_t) uc->ksk_offset)) || 1575 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, (uint32_t) uc->ksk_offset)) ||
1576 ((uc->state == UNINDEX_STATE_FS_NOTIFY) && 1576 ((uc->state == UNINDEX_STATE_FS_NOTIFY) &&
1577 (GNUNET_OK != 1577 (GNUNET_OK !=
1578 GNUNET_BIO_write (wh, &uc->file_id, sizeof (GNUNET_HashCode)))) || 1578 GNUNET_BIO_write (wh, &uc->file_id, sizeof (struct GNUNET_HashCode)))) ||
1579 ((uc->state == UNINDEX_STATE_ERROR) && 1579 ((uc->state == UNINDEX_STATE_ERROR) &&
1580 (GNUNET_OK != GNUNET_BIO_write_string (wh, uc->emsg)))) 1580 (GNUNET_OK != GNUNET_BIO_write_string (wh, uc->emsg))))
1581 { 1581 {
@@ -1875,7 +1875,7 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr)
1875 sr->update_search != 1875 sr->update_search !=
1876 NULL ? sr->update_search->serialization : NULL)) 1876 NULL ? sr->update_search->serialization : NULL))
1877 || (GNUNET_OK != GNUNET_BIO_write_meta_data (wh, sr->meta)) || 1877 || (GNUNET_OK != GNUNET_BIO_write_meta_data (wh, sr->meta)) ||
1878 (GNUNET_OK != GNUNET_BIO_write (wh, &sr->key, sizeof (GNUNET_HashCode))) 1878 (GNUNET_OK != GNUNET_BIO_write (wh, &sr->key, sizeof (struct GNUNET_HashCode)))
1879 || (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->mandatory_missing)) || 1879 || (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->mandatory_missing)) ||
1880 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->optional_support)) || 1880 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->optional_support)) ||
1881 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_success)) || 1881 (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_success)) ||
@@ -2045,7 +2045,7 @@ deserialize_unindex_file (void *cls, const char *filename)
2045 case UNINDEX_STATE_FS_NOTIFY: 2045 case UNINDEX_STATE_FS_NOTIFY:
2046 if (GNUNET_OK != 2046 if (GNUNET_OK !=
2047 GNUNET_BIO_read (rh, "unindex-hash", &uc->file_id, 2047 GNUNET_BIO_read (rh, "unindex-hash", &uc->file_id,
2048 sizeof (GNUNET_HashCode))) 2048 sizeof (struct GNUNET_HashCode)))
2049 { 2049 {
2050 GNUNET_break (0); 2050 GNUNET_break (0);
2051 goto cleanup; 2051 goto cleanup;
@@ -2211,7 +2211,7 @@ deserialize_search_result (void *cls, const char *filename)
2211 GNUNET_BIO_read_string (rh, "search-lnk", &update_srch, 16)) || 2211 GNUNET_BIO_read_string (rh, "search-lnk", &update_srch, 16)) ||
2212 (GNUNET_OK != GNUNET_BIO_read_meta_data (rh, "result-meta", &sr->meta)) || 2212 (GNUNET_OK != GNUNET_BIO_read_meta_data (rh, "result-meta", &sr->meta)) ||
2213 (GNUNET_OK != 2213 (GNUNET_OK !=
2214 GNUNET_BIO_read (rh, "result-key", &sr->key, sizeof (GNUNET_HashCode))) 2214 GNUNET_BIO_read (rh, "result-key", &sr->key, sizeof (struct GNUNET_HashCode)))
2215 || (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->mandatory_missing)) || 2215 || (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->mandatory_missing)) ||
2216 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->optional_support)) || 2216 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->optional_support)) ||
2217 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->availability_success)) || 2217 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->availability_success)) ||
@@ -2346,7 +2346,7 @@ signal_search_resume (struct GNUNET_FS_SearchContext *sc);
2346 * @return GNUNET_YES (we should continue to iterate) 2346 * @return GNUNET_YES (we should continue to iterate)
2347 */ 2347 */
2348static int 2348static int
2349signal_result_resume (void *cls, const GNUNET_HashCode * key, void *value) 2349signal_result_resume (void *cls, const struct GNUNET_HashCode * key, void *value)
2350{ 2350{
2351 struct GNUNET_FS_SearchContext *sc = cls; 2351 struct GNUNET_FS_SearchContext *sc = cls;
2352 struct GNUNET_FS_ProgressInfo pi; 2352 struct GNUNET_FS_ProgressInfo pi;
@@ -2398,7 +2398,7 @@ free_search_context (struct GNUNET_FS_SearchContext *sc);
2398 * @return GNUNET_YES (we should continue to iterate) 2398 * @return GNUNET_YES (we should continue to iterate)
2399 */ 2399 */
2400static int 2400static int
2401free_result (void *cls, const GNUNET_HashCode * key, void *value) 2401free_result (void *cls, const struct GNUNET_HashCode * key, void *value)
2402{ 2402{
2403 struct GNUNET_FS_SearchResult *sr = value; 2403 struct GNUNET_FS_SearchResult *sr = value;
2404 2404
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h
index e75b75f41..7c91b5d23 100644
--- a/src/fs/fs_api.h
+++ b/src/fs/fs_api.h
@@ -205,7 +205,7 @@ struct GNUNET_FS_Uri
205 /** 205 /**
206 * Hash of the public key for the namespace. 206 * Hash of the public key for the namespace.
207 */ 207 */
208 GNUNET_HashCode namespace; 208 struct GNUNET_HashCode namespace;
209 209
210 /** 210 /**
211 * Human-readable identifier chosen for this 211 * Human-readable identifier chosen for this
@@ -333,7 +333,7 @@ struct GNUNET_FS_FileInformation
333 * over the entire file (when the indexing process is started). 333 * over the entire file (when the indexing process is started).
334 * Otherwise this field is not used. 334 * Otherwise this field is not used.
335 */ 335 */
336 GNUNET_HashCode file_id; 336 struct GNUNET_HashCode file_id;
337 337
338 /** 338 /**
339 * Size of the file (in bytes). 339 * Size of the file (in bytes).
@@ -568,7 +568,7 @@ struct GNUNET_FS_SearchResult
568 /** 568 /**
569 * Key for the search result 569 * Key for the search result
570 */ 570 */
571 GNUNET_HashCode key; 571 struct GNUNET_HashCode key;
572 572
573 /** 573 /**
574 * ID of the task that will clean up the probe_ctx should it not 574 * ID of the task that will clean up the probe_ctx should it not
@@ -730,7 +730,7 @@ GNUNET_FS_publish_main_ (void *cls,
730 * @param file_id computed hash, NULL on error 730 * @param file_id computed hash, NULL on error
731 */ 731 */
732void 732void
733GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id); 733GNUNET_FS_unindex_process_hash_ (void *cls, const struct GNUNET_HashCode * file_id);
734 734
735 735
736/** 736/**
@@ -1384,12 +1384,12 @@ struct GNUNET_FS_UnindexContext
1384 /** 1384 /**
1385 * Current key for decrypting KBLocks from 'get_key' operation. 1385 * Current key for decrypting KBLocks from 'get_key' operation.
1386 */ 1386 */
1387 GNUNET_HashCode key; 1387 struct GNUNET_HashCode key;
1388 1388
1389 /** 1389 /**
1390 * Current query of 'get_key' operation. 1390 * Current query of 'get_key' operation.
1391 */ 1391 */
1392 GNUNET_HashCode query; 1392 struct GNUNET_HashCode query;
1393 1393
1394 /** 1394 /**
1395 * First content UID, 0 for none. 1395 * First content UID, 0 for none.
@@ -1424,7 +1424,7 @@ struct GNUNET_FS_UnindexContext
1424 /** 1424 /**
1425 * Hash of the file's contents (once computed). 1425 * Hash of the file's contents (once computed).
1426 */ 1426 */
1427 GNUNET_HashCode file_id; 1427 struct GNUNET_HashCode file_id;
1428 1428
1429 /** 1429 /**
1430 * Current operatinonal phase. 1430 * Current operatinonal phase.
@@ -1444,12 +1444,12 @@ struct SearchRequestEntry
1444 * Hash of the original keyword, also known as the 1444 * Hash of the original keyword, also known as the
1445 * key (for decrypting the KBlock). 1445 * key (for decrypting the KBlock).
1446 */ 1446 */
1447 GNUNET_HashCode key; 1447 struct GNUNET_HashCode key;
1448 1448
1449 /** 1449 /**
1450 * Hash of the public key, also known as the query. 1450 * Hash of the public key, also known as the query.
1451 */ 1451 */
1452 GNUNET_HashCode query; 1452 struct GNUNET_HashCode query;
1453 1453
1454 /** 1454 /**
1455 * Map that contains a "struct GNUNET_FS_SearchResult" for each result that 1455 * Map that contains a "struct GNUNET_FS_SearchResult" for each result that
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 61178766b..fbbbc2f23 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -153,7 +153,7 @@ struct ProcessResultClosure
153 /** 153 /**
154 * Hash of data. 154 * Hash of data.
155 */ 155 */
156 GNUNET_HashCode query; 156 struct GNUNET_HashCode query;
157 157
158 /** 158 /**
159 * Data found in P2P network. 159 * Data found in P2P network.
@@ -198,7 +198,7 @@ struct ProcessResultClosure
198 * @return GNUNET_YES (we should continue to iterate); unless serious error 198 * @return GNUNET_YES (we should continue to iterate); unless serious error
199 */ 199 */
200static int 200static int
201process_result_with_request (void *cls, const GNUNET_HashCode * key, 201process_result_with_request (void *cls, const struct GNUNET_HashCode * key,
202 void *value); 202 void *value);
203 203
204 204
@@ -225,7 +225,7 @@ encrypt_existing_match (struct GNUNET_FS_DownloadContext *dc,
225 char enc[len]; 225 char enc[len];
226 struct GNUNET_CRYPTO_AesSessionKey sk; 226 struct GNUNET_CRYPTO_AesSessionKey sk;
227 struct GNUNET_CRYPTO_AesInitializationVector iv; 227 struct GNUNET_CRYPTO_AesInitializationVector iv;
228 GNUNET_HashCode query; 228 struct GNUNET_HashCode query;
229 229
230 GNUNET_CRYPTO_hash_to_aes_key (&chk->key, &sk, &iv); 230 GNUNET_CRYPTO_hash_to_aes_key (&chk->key, &sk, &iv);
231 if (-1 == GNUNET_CRYPTO_aes_encrypt (block, len, &sk, &iv, enc)) 231 if (-1 == GNUNET_CRYPTO_aes_encrypt (block, len, &sk, &iv, enc))
@@ -234,7 +234,7 @@ encrypt_existing_match (struct GNUNET_FS_DownloadContext *dc,
234 return GNUNET_SYSERR; 234 return GNUNET_SYSERR;
235 } 235 }
236 GNUNET_CRYPTO_hash (enc, len, &query); 236 GNUNET_CRYPTO_hash (enc, len, &query);
237 if (0 != memcmp (&query, &chk->query, sizeof (GNUNET_HashCode))) 237 if (0 != memcmp (&query, &chk->query, sizeof (struct GNUNET_HashCode)))
238 { 238 {
239 GNUNET_break_op (0); 239 GNUNET_break_op (0);
240 return GNUNET_SYSERR; 240 return GNUNET_SYSERR;
@@ -624,7 +624,7 @@ try_top_down_reconstruction (struct GNUNET_FS_DownloadContext *dc,
624{ 624{
625 uint64_t off; 625 uint64_t off;
626 char block[DBLOCK_SIZE]; 626 char block[DBLOCK_SIZE];
627 GNUNET_HashCode key; 627 struct GNUNET_HashCode key;
628 uint64_t total; 628 uint64_t total;
629 size_t len; 629 size_t len;
630 unsigned int i; 630 unsigned int i;
@@ -653,7 +653,7 @@ try_top_down_reconstruction (struct GNUNET_FS_DownloadContext *dc,
653 return; /* failure */ 653 return; /* failure */
654 } 654 }
655 GNUNET_CRYPTO_hash (block, len, &key); 655 GNUNET_CRYPTO_hash (block, len, &key);
656 if (0 != memcmp (&key, &dr->chk.key, sizeof (GNUNET_HashCode))) 656 if (0 != memcmp (&key, &dr->chk.key, sizeof (struct GNUNET_HashCode)))
657 return; /* mismatch */ 657 return; /* mismatch */
658 if (GNUNET_OK != 658 if (GNUNET_OK !=
659 encrypt_existing_match (dc, &dr->chk, dr, block, len, GNUNET_NO)) 659 encrypt_existing_match (dc, &dr->chk, dr, block, len, GNUNET_NO))
@@ -926,7 +926,7 @@ GNUNET_FS_free_download_request_ (struct DownloadRequest *dr)
926 * @return GNUNET_YES (we should continue to iterate); unless serious error 926 * @return GNUNET_YES (we should continue to iterate); unless serious error
927 */ 927 */
928static int 928static int
929process_result_with_request (void *cls, const GNUNET_HashCode * key, 929process_result_with_request (void *cls, const struct GNUNET_HashCode * key,
930 void *value) 930 void *value)
931{ 931{
932 struct ProcessResultClosure *prc = cls; 932 struct ProcessResultClosure *prc = cls;
@@ -1376,7 +1376,7 @@ do_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1376 * @return GNUNET_OK 1376 * @return GNUNET_OK
1377 */ 1377 */
1378static int 1378static int
1379retry_entry (void *cls, const GNUNET_HashCode * key, void *entry) 1379retry_entry (void *cls, const struct GNUNET_HashCode * key, void *entry)
1380{ 1380{
1381 struct GNUNET_FS_DownloadContext *dc = cls; 1381 struct GNUNET_FS_DownloadContext *dc = cls;
1382 struct DownloadRequest *dr = entry; 1382 struct DownloadRequest *dr = entry;
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c
index bfd7594ef..4f58b7d5b 100644
--- a/src/fs/fs_namespace.c
+++ b/src/fs/fs_namespace.c
@@ -359,7 +359,7 @@ process_namespace (void *cls, const char *filename)
359 struct ProcessNamespaceContext *pnc = cls; 359 struct ProcessNamespaceContext *pnc = cls;
360 struct GNUNET_CRYPTO_RsaPrivateKey *key; 360 struct GNUNET_CRYPTO_RsaPrivateKey *key;
361 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pk; 361 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pk;
362 GNUNET_HashCode id; 362 struct GNUNET_HashCode id;
363 const char *name; 363 const char *name;
364 const char *t; 364 const char *t;
365 365
@@ -470,7 +470,7 @@ sb_put_cont (void *cls, int success,
470 const char *msg) 470 const char *msg)
471{ 471{
472 struct GNUNET_FS_PublishSksContext *psc = cls; 472 struct GNUNET_FS_PublishSksContext *psc = cls;
473 GNUNET_HashCode hc; 473 struct GNUNET_HashCode hc;
474 474
475 psc->dqe = NULL; 475 psc->dqe = NULL;
476 if (GNUNET_OK != success) 476 if (GNUNET_OK != success)
@@ -544,9 +544,9 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
544 struct SBlock *sb_enc; 544 struct SBlock *sb_enc;
545 char *dest; 545 char *dest;
546 struct GNUNET_CONTAINER_MetaData *mmeta; 546 struct GNUNET_CONTAINER_MetaData *mmeta;
547 GNUNET_HashCode key; /* hash of thisId = key */ 547 struct GNUNET_HashCode key; /* hash of thisId = key */
548 GNUNET_HashCode id; /* hash of hc = identifier */ 548 struct GNUNET_HashCode id; /* hash of hc = identifier */
549 GNUNET_HashCode query; /* id ^ nsid = DB query */ 549 struct GNUNET_HashCode query; /* id ^ nsid = DB query */
550 550
551 if (NULL == meta) 551 if (NULL == meta)
552 mmeta = GNUNET_CONTAINER_meta_data_create (); 552 mmeta = GNUNET_CONTAINER_meta_data_create ();
@@ -591,7 +591,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
591 size = sizeof (struct SBlock) + mdsize + slen + nidlen; 591 size = sizeof (struct SBlock) + mdsize + slen + nidlen;
592 sb_enc = GNUNET_malloc (size); 592 sb_enc = GNUNET_malloc (size);
593 GNUNET_CRYPTO_hash (identifier, idlen, &key); 593 GNUNET_CRYPTO_hash (identifier, idlen, &key);
594 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &id); 594 GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &id);
595 sks_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri)); 595 sks_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
596 sks_uri->type = sks; 596 sks_uri->type = sks;
597 GNUNET_CRYPTO_rsa_key_get_public (namespace->key, &sb_enc->subspace); 597 GNUNET_CRYPTO_rsa_key_get_public (namespace->key, &sb_enc->subspace);
@@ -711,7 +711,7 @@ struct ProcessUpdateClosure
711 * GNUNET_NO if not. 711 * GNUNET_NO if not.
712 */ 712 */
713static int 713static int
714process_update_node (void *cls, const GNUNET_HashCode * key, void *value) 714process_update_node (void *cls, const struct GNUNET_HashCode * key, void *value)
715{ 715{
716 struct ProcessUpdateClosure *pc = cls; 716 struct ProcessUpdateClosure *pc = cls;
717 struct NamespaceUpdateNode *nsn = value; 717 struct NamespaceUpdateNode *nsn = value;
@@ -774,11 +774,11 @@ struct FindTreeClosure
774 * GNUNET_NO if not. 774 * GNUNET_NO if not.
775 */ 775 */
776static int 776static int
777find_trees (void *cls, const GNUNET_HashCode * key, void *value) 777find_trees (void *cls, const struct GNUNET_HashCode * key, void *value)
778{ 778{
779 struct FindTreeClosure *fc = cls; 779 struct FindTreeClosure *fc = cls;
780 struct NamespaceUpdateNode *nsn = value; 780 struct NamespaceUpdateNode *nsn = value;
781 GNUNET_HashCode hc; 781 struct GNUNET_HashCode hc;
782 782
783 if (nsn->nug == fc->nug) 783 if (nsn->nug == fc->nug)
784 { 784 {
@@ -838,7 +838,7 @@ GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
838{ 838{
839 unsigned int i; 839 unsigned int i;
840 unsigned int nug; 840 unsigned int nug;
841 GNUNET_HashCode hc; 841 struct GNUNET_HashCode hc;
842 struct NamespaceUpdateNode *nsn; 842 struct NamespaceUpdateNode *nsn;
843 struct ProcessUpdateClosure pc; 843 struct ProcessUpdateClosure pc;
844 struct FindTreeClosure fc; 844 struct FindTreeClosure fc;
diff --git a/src/fs/fs_namespace_advertise.c b/src/fs/fs_namespace_advertise.c
index e0226ca35..c0e15541c 100644
--- a/src/fs/fs_namespace_advertise.c
+++ b/src/fs/fs_namespace_advertise.c
@@ -132,8 +132,8 @@ advertisement_cont (void *cls, int success,
132{ 132{
133 struct GNUNET_FS_AdvertisementContext *ac = cls; 133 struct GNUNET_FS_AdvertisementContext *ac = cls;
134 const char *keyword; 134 const char *keyword;
135 GNUNET_HashCode key; 135 struct GNUNET_HashCode key;
136 GNUNET_HashCode query; 136 struct GNUNET_HashCode query;
137 struct GNUNET_CRYPTO_AesSessionKey skey; 137 struct GNUNET_CRYPTO_AesSessionKey skey;
138 struct GNUNET_CRYPTO_AesInitializationVector iv; 138 struct GNUNET_CRYPTO_AesInitializationVector iv;
139 struct GNUNET_CRYPTO_RsaPrivateKey *pk; 139 struct GNUNET_CRYPTO_RsaPrivateKey *pk;
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index 31cd795b2..6f8a9d248 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -658,7 +658,7 @@ process_index_start_response (void *cls, const struct GNUNET_MessageHeader *msg)
658 * @param res resulting hash, NULL on error 658 * @param res resulting hash, NULL on error
659 */ 659 */
660static void 660static void
661hash_for_index_cb (void *cls, const GNUNET_HashCode * res) 661hash_for_index_cb (void *cls, const struct GNUNET_HashCode * res)
662{ 662{
663 struct GNUNET_FS_PublishContext *pc = cls; 663 struct GNUNET_FS_PublishContext *pc = cls;
664 struct GNUNET_FS_FileInformation *p; 664 struct GNUNET_FS_FileInformation *p;
diff --git a/src/fs/fs_publish_ksk.c b/src/fs/fs_publish_ksk.c
index 0b6d407ab..5511fb93d 100644
--- a/src/fs/fs_publish_ksk.c
+++ b/src/fs/fs_publish_ksk.c
@@ -172,8 +172,8 @@ publish_ksk_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
172{ 172{
173 struct GNUNET_FS_PublishKskContext *pkc = cls; 173 struct GNUNET_FS_PublishKskContext *pkc = cls;
174 const char *keyword; 174 const char *keyword;
175 GNUNET_HashCode key; 175 struct GNUNET_HashCode key;
176 GNUNET_HashCode query; 176 struct GNUNET_HashCode query;
177 struct GNUNET_CRYPTO_AesSessionKey skey; 177 struct GNUNET_CRYPTO_AesSessionKey skey;
178 struct GNUNET_CRYPTO_AesInitializationVector iv; 178 struct GNUNET_CRYPTO_AesInitializationVector iv;
179 struct GNUNET_CRYPTO_RsaPrivateKey *pk; 179 struct GNUNET_CRYPTO_RsaPrivateKey *pk;
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index adbb85dc0..542d8f2e9 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -74,7 +74,7 @@ GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
74 * GNUNET_OK otherwise 74 * GNUNET_OK otherwise
75 */ 75 */
76static int 76static int
77test_result_present (void *cls, const GNUNET_HashCode * key, void *value) 77test_result_present (void *cls, const struct GNUNET_HashCode * key, void *value)
78{ 78{
79 const struct GNUNET_FS_Uri *uri = cls; 79 const struct GNUNET_FS_Uri *uri = cls;
80 struct GNUNET_FS_SearchResult *sr = value; 80 struct GNUNET_FS_SearchResult *sr = value;
@@ -162,7 +162,7 @@ struct GetResultContext
162 * @return GNUNET_OK 162 * @return GNUNET_OK
163 */ 163 */
164static int 164static int
165get_result_present (void *cls, const GNUNET_HashCode * key, void *value) 165get_result_present (void *cls, const struct GNUNET_HashCode * key, void *value)
166{ 166{
167 struct GetResultContext *grc = cls; 167 struct GetResultContext *grc = cls;
168 struct GNUNET_FS_SearchResult *sr = value; 168 struct GNUNET_FS_SearchResult *sr = value;
@@ -388,7 +388,7 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc,
388 const struct GNUNET_FS_Uri *uri, 388 const struct GNUNET_FS_Uri *uri,
389 const struct GNUNET_CONTAINER_MetaData *meta) 389 const struct GNUNET_CONTAINER_MetaData *meta)
390{ 390{
391 GNUNET_HashCode key; 391 struct GNUNET_HashCode key;
392 struct GNUNET_FS_SearchResult *sr; 392 struct GNUNET_FS_SearchResult *sr;
393 struct GetResultContext grc; 393 struct GetResultContext grc;
394 int is_new; 394 int is_new;
@@ -477,7 +477,7 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, const char *id_update,
477 const struct GNUNET_CONTAINER_MetaData *meta) 477 const struct GNUNET_CONTAINER_MetaData *meta)
478{ 478{
479 struct GNUNET_FS_Uri uu; 479 struct GNUNET_FS_Uri uu;
480 GNUNET_HashCode key; 480 struct GNUNET_HashCode key;
481 struct GNUNET_FS_SearchResult *sr; 481 struct GNUNET_FS_SearchResult *sr;
482 482
483 /* check if new */ 483 /* check if new */
@@ -533,7 +533,7 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
533 size_t edata_size, 533 size_t edata_size,
534 char *data) 534 char *data)
535{ 535{
536 GNUNET_HashCode q; 536 struct GNUNET_HashCode q;
537 struct GNUNET_CRYPTO_AesSessionKey skey; 537 struct GNUNET_CRYPTO_AesSessionKey skey;
538 struct GNUNET_CRYPTO_AesInitializationVector iv; 538 struct GNUNET_CRYPTO_AesInitializationVector iv;
539 int i; 539 int i;
@@ -543,7 +543,7 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
543 &q); 543 &q);
544 /* find key */ 544 /* find key */
545 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) 545 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
546 if (0 == memcmp (&q, &sc->requests[i].query, sizeof (GNUNET_HashCode))) 546 if (0 == memcmp (&q, &sc->requests[i].query, sizeof (struct GNUNET_HashCode)))
547 break; 547 break;
548 if (i == sc->uri->data.ksk.keywordCount) 548 if (i == sc->uri->data.ksk.keywordCount)
549 { 549 {
@@ -708,7 +708,7 @@ process_sblock (struct GNUNET_FS_SearchContext *sc, const struct SBlock *sb,
708 const char *uris; 708 const char *uris;
709 size_t off; 709 size_t off;
710 char *emsg; 710 char *emsg;
711 GNUNET_HashCode key; 711 struct GNUNET_HashCode key;
712 char *identifier; 712 char *identifier;
713 713
714 /* decrypt */ 714 /* decrypt */
@@ -904,7 +904,7 @@ struct MessageBuilderContext
904 /** 904 /**
905 * Where to store the keys. 905 * Where to store the keys.
906 */ 906 */
907 GNUNET_HashCode *xoff; 907 struct GNUNET_HashCode *xoff;
908 908
909 /** 909 /**
910 * Search context we are iterating for. 910 * Search context we are iterating for.
@@ -928,7 +928,7 @@ struct MessageBuilderContext
928 * @return GNUNET_OK to continue iterating 928 * @return GNUNET_OK to continue iterating
929 */ 929 */
930static int 930static int
931build_result_set (void *cls, const GNUNET_HashCode * key, void *value) 931build_result_set (void *cls, const struct GNUNET_HashCode * key, void *value)
932{ 932{
933 struct MessageBuilderContext *mbc = cls; 933 struct MessageBuilderContext *mbc = cls;
934 struct GNUNET_FS_SearchResult *sr = value; 934 struct GNUNET_FS_SearchResult *sr = value;
@@ -960,7 +960,7 @@ build_result_set (void *cls, const GNUNET_HashCode * key, void *value)
960 * @return GNUNET_OK to continue iterating 960 * @return GNUNET_OK to continue iterating
961 */ 961 */
962static int 962static int
963find_result_set (void *cls, const GNUNET_HashCode * key, void *value) 963find_result_set (void *cls, const struct GNUNET_HashCode * key, void *value)
964{ 964{
965 struct MessageBuilderContext *mbc = cls; 965 struct MessageBuilderContext *mbc = cls;
966 struct GNUNET_FS_SearchResult *sr = value; 966 struct GNUNET_FS_SearchResult *sr = value;
@@ -990,8 +990,8 @@ transmit_search_request (void *cls, size_t size, void *buf)
990 size_t msize; 990 size_t msize;
991 struct SearchMessage *sm; 991 struct SearchMessage *sm;
992 const char *identifier; 992 const char *identifier;
993 GNUNET_HashCode key; 993 struct GNUNET_HashCode key;
994 GNUNET_HashCode idh; 994 struct GNUNET_HashCode idh;
995 unsigned int sqms; 995 unsigned int sqms;
996 uint32_t options; 996 uint32_t options;
997 997
@@ -1004,7 +1004,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
1004 mbc.skip_cnt = sc->search_request_map_offset; 1004 mbc.skip_cnt = sc->search_request_map_offset;
1005 sm = buf; 1005 sm = buf;
1006 sm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_START_SEARCH); 1006 sm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_START_SEARCH);
1007 mbc.xoff = (GNUNET_HashCode *) & sm[1]; 1007 mbc.xoff = (struct GNUNET_HashCode *) & sm[1];
1008 options = SEARCH_MESSAGE_OPTION_NONE; 1008 options = SEARCH_MESSAGE_OPTION_NONE;
1009 if (0 != (sc->options & GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY)) 1009 if (0 != (sc->options & GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY))
1010 options |= SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY; 1010 options |= SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY;
@@ -1017,7 +1017,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
1017 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, 1017 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
1018 &find_result_set, &mbc); 1018 &find_result_set, &mbc);
1019 sqms = mbc.put_cnt; 1019 sqms = mbc.put_cnt;
1020 mbc.put_cnt = (size - msize) / sizeof (GNUNET_HashCode); 1020 mbc.put_cnt = (size - msize) / sizeof (struct GNUNET_HashCode);
1021 mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt); 1021 mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
1022 if (sc->search_request_map_offset < sqms) 1022 if (sc->search_request_map_offset < sqms)
1023 GNUNET_assert (mbc.put_cnt > 0); 1023 GNUNET_assert (mbc.put_cnt > 0);
@@ -1025,9 +1025,9 @@ transmit_search_request (void *cls, size_t size, void *buf)
1025 sm->header.size = htons (msize); 1025 sm->header.size = htons (msize);
1026 sm->type = htonl (GNUNET_BLOCK_TYPE_ANY); 1026 sm->type = htonl (GNUNET_BLOCK_TYPE_ANY);
1027 sm->anonymity_level = htonl (sc->anonymity); 1027 sm->anonymity_level = htonl (sc->anonymity);
1028 memset (&sm->target, 0, sizeof (GNUNET_HashCode)); 1028 memset (&sm->target, 0, sizeof (struct GNUNET_HashCode));
1029 sm->query = sc->requests[sc->keyword_offset].query; 1029 sm->query = sc->requests[sc->keyword_offset].query;
1030 msize += sizeof (GNUNET_HashCode) * mbc.put_cnt; 1030 msize += sizeof (struct GNUNET_HashCode) * mbc.put_cnt;
1031 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, 1031 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
1032 &build_result_set, &mbc); 1032 &build_result_set, &mbc);
1033 sm->header.size = htons (msize); 1033 sm->header.size = htons (msize);
@@ -1058,15 +1058,15 @@ transmit_search_request (void *cls, size_t size, void *buf)
1058 sm->target = sc->uri->data.sks.namespace; 1058 sm->target = sc->uri->data.sks.namespace;
1059 identifier = sc->uri->data.sks.identifier; 1059 identifier = sc->uri->data.sks.identifier;
1060 GNUNET_CRYPTO_hash (identifier, strlen (identifier), &key); 1060 GNUNET_CRYPTO_hash (identifier, strlen (identifier), &key);
1061 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &idh); 1061 GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &idh);
1062 GNUNET_CRYPTO_hash_xor (&idh, &sm->target, &sm->query); 1062 GNUNET_CRYPTO_hash_xor (&idh, &sm->target, &sm->query);
1063 mbc.put_cnt = (size - msize) / sizeof (GNUNET_HashCode); 1063 mbc.put_cnt = (size - msize) / sizeof (struct GNUNET_HashCode);
1064 sqms = GNUNET_CONTAINER_multihashmap_size (sc->master_result_map); 1064 sqms = GNUNET_CONTAINER_multihashmap_size (sc->master_result_map);
1065 mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt); 1065 mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
1066 mbc.keyword_offset = 0; 1066 mbc.keyword_offset = 0;
1067 if (sc->search_request_map_offset < sqms) 1067 if (sc->search_request_map_offset < sqms)
1068 GNUNET_assert (mbc.put_cnt > 0); 1068 GNUNET_assert (mbc.put_cnt > 0);
1069 msize += sizeof (GNUNET_HashCode) * mbc.put_cnt; 1069 msize += sizeof (struct GNUNET_HashCode) * mbc.put_cnt;
1070 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, 1070 GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
1071 &build_result_set, &mbc); 1071 &build_result_set, &mbc);
1072 sm->header.size = htons (msize); 1072 sm->header.size = htons (msize);
@@ -1103,9 +1103,9 @@ schedule_transmit_search_request (struct GNUNET_FS_SearchContext *sc)
1103 sqms = 1103 sqms =
1104 GNUNET_CONTAINER_multihashmap_size (sc->master_result_map) - 1104 GNUNET_CONTAINER_multihashmap_size (sc->master_result_map) -
1105 sc->search_request_map_offset; 1105 sc->search_request_map_offset;
1106 fit = (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - size) / sizeof (GNUNET_HashCode); 1106 fit = (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - size) / sizeof (struct GNUNET_HashCode);
1107 fit = GNUNET_MIN (fit, sqms); 1107 fit = GNUNET_MIN (fit, sqms);
1108 size += sizeof (GNUNET_HashCode) * fit; 1108 size += sizeof (struct GNUNET_HashCode) * fit;
1109 GNUNET_CLIENT_notify_transmit_ready (sc->client, size, 1109 GNUNET_CLIENT_notify_transmit_ready (sc->client, size,
1110 GNUNET_CONSTANTS_SERVICE_TIMEOUT, 1110 GNUNET_CONSTANTS_SERVICE_TIMEOUT,
1111 GNUNET_NO, &transmit_search_request, sc); 1111 GNUNET_NO, &transmit_search_request, sc);
@@ -1220,7 +1220,7 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc)
1220{ 1220{
1221 unsigned int i; 1221 unsigned int i;
1222 const char *keyword; 1222 const char *keyword;
1223 GNUNET_HashCode hc; 1223 struct GNUNET_HashCode hc;
1224 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; 1224 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
1225 struct GNUNET_CRYPTO_RsaPrivateKey *pk; 1225 struct GNUNET_CRYPTO_RsaPrivateKey *pk;
1226 1226
@@ -1267,7 +1267,7 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc)
1267 * @return GNUNET_OK 1267 * @return GNUNET_OK
1268 */ 1268 */
1269static int 1269static int
1270search_result_freeze_probes (void *cls, const GNUNET_HashCode * key, 1270search_result_freeze_probes (void *cls, const struct GNUNET_HashCode * key,
1271 void *value) 1271 void *value)
1272{ 1272{
1273 struct GNUNET_FS_SearchResult *sr = value; 1273 struct GNUNET_FS_SearchResult *sr = value;
@@ -1297,7 +1297,7 @@ search_result_freeze_probes (void *cls, const GNUNET_HashCode * key,
1297 * @return GNUNET_OK 1297 * @return GNUNET_OK
1298 */ 1298 */
1299static int 1299static int
1300search_result_resume_probes (void *cls, const GNUNET_HashCode * key, 1300search_result_resume_probes (void *cls, const struct GNUNET_HashCode * key,
1301 void *value) 1301 void *value)
1302{ 1302{
1303 struct GNUNET_FS_SearchResult *sr = value; 1303 struct GNUNET_FS_SearchResult *sr = value;
@@ -1318,7 +1318,7 @@ search_result_resume_probes (void *cls, const GNUNET_HashCode * key,
1318 * @return GNUNET_OK 1318 * @return GNUNET_OK
1319 */ 1319 */
1320static int 1320static int
1321search_result_suspend (void *cls, const GNUNET_HashCode * key, void *value) 1321search_result_suspend (void *cls, const struct GNUNET_HashCode * key, void *value)
1322{ 1322{
1323 struct GNUNET_FS_SearchContext *sc = cls; 1323 struct GNUNET_FS_SearchContext *sc = cls;
1324 struct GNUNET_FS_SearchResult *sr = value; 1324 struct GNUNET_FS_SearchResult *sr = value;
@@ -1477,7 +1477,7 @@ GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc)
1477 * @return GNUNET_OK 1477 * @return GNUNET_OK
1478 */ 1478 */
1479static int 1479static int
1480search_result_stop (void *cls, const GNUNET_HashCode * key, void *value) 1480search_result_stop (void *cls, const struct GNUNET_HashCode * key, void *value)
1481{ 1481{
1482 struct GNUNET_FS_SearchContext *sc = cls; 1482 struct GNUNET_FS_SearchContext *sc = cls;
1483 struct GNUNET_FS_SearchResult *sr = value; 1483 struct GNUNET_FS_SearchResult *sr = value;
@@ -1530,7 +1530,7 @@ search_result_stop (void *cls, const GNUNET_HashCode * key, void *value)
1530 * @return GNUNET_OK 1530 * @return GNUNET_OK
1531 */ 1531 */
1532static int 1532static int
1533search_result_free (void *cls, const GNUNET_HashCode * key, void *value) 1533search_result_free (void *cls, const struct GNUNET_HashCode * key, void *value)
1534{ 1534{
1535 struct GNUNET_FS_SearchResult *sr = value; 1535 struct GNUNET_FS_SearchResult *sr = value;
1536 1536
diff --git a/src/fs/fs_sharetree.c b/src/fs/fs_sharetree.c
index c929428e1..f75571c46 100644
--- a/src/fs/fs_sharetree.c
+++ b/src/fs/fs_sharetree.c
@@ -162,7 +162,7 @@ add_to_keyword_counter (void *cls, const char *keyword, int is_mandatory)
162{ 162{
163 struct GNUNET_CONTAINER_MultiHashMap *mcm = cls; 163 struct GNUNET_CONTAINER_MultiHashMap *mcm = cls;
164 struct KeywordCounter *cnt; 164 struct KeywordCounter *cnt;
165 GNUNET_HashCode hc; 165 struct GNUNET_HashCode hc;
166 size_t klen; 166 size_t klen;
167 167
168 klen = strlen (keyword) + 1; 168 klen = strlen (keyword) + 1;
@@ -206,7 +206,7 @@ add_to_meta_counter (void *cls, const char *plugin_name,
206 const char *data_mime_type, const char *data, size_t data_len) 206 const char *data_mime_type, const char *data, size_t data_len)
207{ 207{
208 struct GNUNET_CONTAINER_MultiHashMap *map = cls; 208 struct GNUNET_CONTAINER_MultiHashMap *map = cls;
209 GNUNET_HashCode key; 209 struct GNUNET_HashCode key;
210 struct MetaCounter *cnt; 210 struct MetaCounter *cnt;
211 211
212 GNUNET_CRYPTO_hash (data, data_len, &key); 212 GNUNET_CRYPTO_hash (data, data_len, &key);
@@ -243,7 +243,7 @@ remove_high_frequency_keywords (void *cls, const char *keyword, int is_mandatory
243{ 243{
244 struct TrimContext *tc = cls; 244 struct TrimContext *tc = cls;
245 struct KeywordCounter *counter; 245 struct KeywordCounter *counter;
246 GNUNET_HashCode hc; 246 struct GNUNET_HashCode hc;
247 size_t klen; 247 size_t klen;
248 248
249 klen = strlen (keyword) + 1; 249 klen = strlen (keyword) + 1;
@@ -268,7 +268,7 @@ remove_high_frequency_keywords (void *cls, const char *keyword, int is_mandatory
268 * @return GNUNET_YES (always) 268 * @return GNUNET_YES (always)
269 */ 269 */
270static int 270static int
271migrate_and_drop_keywords (void *cls, const GNUNET_HashCode * key, void *value) 271migrate_and_drop_keywords (void *cls, const struct GNUNET_HashCode * key, void *value)
272{ 272{
273 struct TrimContext *tc = cls; 273 struct TrimContext *tc = cls;
274 struct KeywordCounter *counter = value; 274 struct KeywordCounter *counter = value;
@@ -299,7 +299,7 @@ migrate_and_drop_keywords (void *cls, const GNUNET_HashCode * key, void *value)
299 * @return GNUNET_YES (always) 299 * @return GNUNET_YES (always)
300 */ 300 */
301static int 301static int
302migrate_and_drop_metadata (void *cls, const GNUNET_HashCode * key, void *value) 302migrate_and_drop_metadata (void *cls, const struct GNUNET_HashCode * key, void *value)
303{ 303{
304 struct TrimContext *tc = cls; 304 struct TrimContext *tc = cls;
305 struct MetaCounter *counter = value; 305 struct MetaCounter *counter = value;
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index 691032183..71a1b9e0b 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -437,7 +437,7 @@ continue_after_remove (void *cls,
437 */ 437 */
438static void 438static void
439process_kblock_for_unindex (void *cls, 439process_kblock_for_unindex (void *cls,
440 const GNUNET_HashCode * key, 440 const struct GNUNET_HashCode * key,
441 size_t size, const void *data, 441 size_t size, const void *data,
442 enum GNUNET_BLOCK_Type type, 442 enum GNUNET_BLOCK_Type type,
443 uint32_t priority, 443 uint32_t priority,
@@ -649,7 +649,7 @@ GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc)
649 * @param file_id computed hash, NULL on error 649 * @param file_id computed hash, NULL on error
650 */ 650 */
651void 651void
652GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id) 652GNUNET_FS_unindex_process_hash_ (void *cls, const struct GNUNET_HashCode * file_id)
653{ 653{
654 struct GNUNET_FS_UnindexContext *uc = cls; 654 struct GNUNET_FS_UnindexContext *uc = cls;
655 655
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 0c2d64cac..8d8479d8f 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -98,7 +98,7 @@
98 * @param key wherer to store the unique key 98 * @param key wherer to store the unique key
99 */ 99 */
100void 100void
101GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key) 101GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode * key)
102{ 102{
103 switch (uri->type) 103 switch (uri->type)
104 { 104 {
@@ -121,7 +121,7 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key)
121 key); 121 key);
122 break; 122 break;
123 default: 123 default:
124 memset (key, 0, sizeof (GNUNET_HashCode)); 124 memset (key, 0, sizeof (struct GNUNET_HashCode));
125 break; 125 break;
126 } 126 }
127} 127}
@@ -355,7 +355,7 @@ static struct GNUNET_FS_Uri *
355uri_sks_parse (const char *s, char **emsg) 355uri_sks_parse (const char *s, char **emsg)
356{ 356{
357 struct GNUNET_FS_Uri *ret; 357 struct GNUNET_FS_Uri *ret;
358 GNUNET_HashCode namespace; 358 struct GNUNET_HashCode namespace;
359 char *identifier; 359 char *identifier;
360 unsigned int pos; 360 unsigned int pos;
361 size_t slen; 361 size_t slen;
@@ -963,7 +963,7 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, const char *id,
963 * @return an FS URI for the given namespace and identifier 963 * @return an FS URI for the given namespace and identifier
964 */ 964 */
965struct GNUNET_FS_Uri * 965struct GNUNET_FS_Uri *
966GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id) 966GNUNET_FS_uri_sks_create_from_nsid (struct GNUNET_HashCode * nsid, const char *id)
967{ 967{
968 struct GNUNET_FS_Uri *ns_uri; 968 struct GNUNET_FS_Uri *ns_uri;
969 969
@@ -1273,7 +1273,7 @@ GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
1273 case sks: 1273 case sks:
1274 if ((0 == 1274 if ((0 ==
1275 memcmp (&u1->data.sks.namespace, &u2->data.sks.namespace, 1275 memcmp (&u1->data.sks.namespace, &u2->data.sks.namespace,
1276 sizeof (GNUNET_HashCode))) && 1276 sizeof (struct GNUNET_HashCode))) &&
1277 (0 == strcmp (u1->data.sks.identifier, u2->data.sks.identifier))) 1277 (0 == strcmp (u1->data.sks.identifier, u2->data.sks.identifier)))
1278 1278
1279 return GNUNET_YES; 1279 return GNUNET_YES;
@@ -1334,7 +1334,7 @@ GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri)
1334 */ 1334 */
1335int 1335int
1336GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri, 1336GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
1337 GNUNET_HashCode * nsid) 1337 struct GNUNET_HashCode * nsid)
1338{ 1338{
1339 if (!GNUNET_FS_uri_test_sks (uri)) 1339 if (!GNUNET_FS_uri_test_sks (uri))
1340 { 1340 {
@@ -1931,7 +1931,7 @@ uri_ksk_to_string (const struct GNUNET_FS_Uri *uri)
1931static char * 1931static char *
1932uri_sks_to_string (const struct GNUNET_FS_Uri *uri) 1932uri_sks_to_string (const struct GNUNET_FS_Uri *uri)
1933{ 1933{
1934 const GNUNET_HashCode *namespace; 1934 const struct GNUNET_HashCode *namespace;
1935 const char *identifier; 1935 const char *identifier;
1936 char *ret; 1936 char *ret;
1937 struct GNUNET_CRYPTO_HashAsciiEncoded ns; 1937 struct GNUNET_CRYPTO_HashAsciiEncoded ns;
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c
index 404c64e4d..ce6284aa4 100644
--- a/src/fs/gnunet-fs.c
+++ b/src/fs/gnunet-fs.c
@@ -55,7 +55,7 @@ static int verbose;
55 * @return GNUNET_OK to continue iteration 55 * @return GNUNET_OK to continue iteration
56 */ 56 */
57static int 57static int
58print_indexed (void *cls, const char *filename, const GNUNET_HashCode * file_id) 58print_indexed (void *cls, const char *filename, const struct GNUNET_HashCode * file_id)
59{ 59{
60 if (NULL == filename) 60 if (NULL == filename)
61 { 61 {
diff --git a/src/fs/gnunet-pseudonym.c b/src/fs/gnunet-pseudonym.c
index 2b1b897c2..02b71b513 100644
--- a/src/fs/gnunet-pseudonym.c
+++ b/src/fs/gnunet-pseudonym.c
@@ -95,7 +95,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
95 95
96 96
97static void 97static void
98ns_printer (void *cls, const char *name, const GNUNET_HashCode * id) 98ns_printer (void *cls, const char *name, const struct GNUNET_HashCode * id)
99{ 99{
100 struct GNUNET_CRYPTO_HashAsciiEncoded enc; 100 struct GNUNET_CRYPTO_HashAsciiEncoded enc;
101 101
@@ -105,7 +105,7 @@ ns_printer (void *cls, const char *name, const GNUNET_HashCode * id)
105 105
106 106
107static int 107static int
108pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym, 108pseudo_printer (void *cls, const struct GNUNET_HashCode * pseudonym,
109 const char *name, const char *unique_name, 109 const char *name, const char *unique_name,
110 const struct GNUNET_CONTAINER_MetaData *md, int rating) 110 const struct GNUNET_CONTAINER_MetaData *md, int rating)
111{ 111{
@@ -136,7 +136,7 @@ pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym,
136static void 136static void
137post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg) 137post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
138{ 138{
139 GNUNET_HashCode nsid; 139 struct GNUNET_HashCode nsid;
140 char *set; 140 char *set;
141 int delta; 141 int delta;
142 142
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 94e8e6b23..aa8e8de27 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -476,7 +476,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
476 * @return GNUNET_YES to continue to iterate 476 * @return GNUNET_YES to continue to iterate
477 */ 477 */
478static int 478static int
479consider_peer_for_forwarding (void *cls, const GNUNET_HashCode * key, 479consider_peer_for_forwarding (void *cls, const struct GNUNET_HashCode * key,
480 struct GSF_PendingRequest *pr) 480 struct GSF_PendingRequest *pr)
481{ 481{
482 struct GSF_ConnectedPeer *cp = cls; 482 struct GSF_ConnectedPeer *cp = cls;
diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h
index 0c796bf9c..70e65186d 100644
--- a/src/fs/gnunet-service-fs.h
+++ b/src/fs/gnunet-service-fs.h
@@ -119,7 +119,7 @@ struct GetMessage
119 /** 119 /**
120 * Which of the optional hash codes are present at the end of the 120 * Which of the optional hash codes are present at the end of the
121 * message? See GET_MESSAGE_BIT_xx constants. For each bit that is 121 * message? See GET_MESSAGE_BIT_xx constants. For each bit that is
122 * set, an additional GNUNET_HashCode with the respective content 122 * set, an additional struct GNUNET_HashCode with the respective content
123 * (in order of the bits) will be appended to the end of the GET 123 * (in order of the bits) will be appended to the end of the GET
124 * message. 124 * message.
125 */ 125 */
@@ -129,7 +129,7 @@ struct GetMessage
129 * Hashcodes of the file(s) we're looking for. 129 * Hashcodes of the file(s) we're looking for.
130 * Details depend on the query type. 130 * Details depend on the query type.
131 */ 131 */
132 GNUNET_HashCode query; 132 struct GNUNET_HashCode query;
133 133
134 /* this is followed by hash codes as specified in the "hash_bitmap"; 134 /* this is followed by hash codes as specified in the "hash_bitmap";
135 * after that, an optional bloomfilter (with bits set for replies 135 * after that, an optional bloomfilter (with bits set for replies
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index 9c229251d..e021606a9 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -759,7 +759,7 @@ copy_reply (void *cls, size_t buf_size, void *buf)
759 */ 759 */
760static void 760static void
761free_pending_request (struct PeerRequest *peerreq, 761free_pending_request (struct PeerRequest *peerreq,
762 const GNUNET_HashCode *query) 762 const struct GNUNET_HashCode *query)
763{ 763{
764 struct GSF_ConnectedPeer *cp = peerreq->cp; 764 struct GSF_ConnectedPeer *cp = peerreq->cp;
765 765
@@ -786,7 +786,7 @@ free_pending_request (struct PeerRequest *peerreq,
786 * @return GNUNET_YES (continue to iterate) 786 * @return GNUNET_YES (continue to iterate)
787 */ 787 */
788static int 788static int
789cancel_pending_request (void *cls, const GNUNET_HashCode * query, void *value) 789cancel_pending_request (void *cls, const struct GNUNET_HashCode * query, void *value)
790{ 790{
791 struct PeerRequest *peerreq = value; 791 struct PeerRequest *peerreq = value;
792 struct GSF_PendingRequest *pr = peerreq->pr; 792 struct GSF_PendingRequest *pr = peerreq->pr;
@@ -1129,13 +1129,13 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
1129 struct GSF_PendingRequestData *prd; 1129 struct GSF_PendingRequestData *prd;
1130 struct GSF_ConnectedPeer *cp; 1130 struct GSF_ConnectedPeer *cp;
1131 struct GSF_ConnectedPeer *cps; 1131 struct GSF_ConnectedPeer *cps;
1132 const GNUNET_HashCode *namespace; 1132 const struct GNUNET_HashCode *namespace;
1133 const struct GNUNET_PeerIdentity *target; 1133 const struct GNUNET_PeerIdentity *target;
1134 enum GSF_PendingRequestOptions options; 1134 enum GSF_PendingRequestOptions options;
1135 uint16_t msize; 1135 uint16_t msize;
1136 const struct GetMessage *gm; 1136 const struct GetMessage *gm;
1137 unsigned int bits; 1137 unsigned int bits;
1138 const GNUNET_HashCode *opt; 1138 const struct GNUNET_HashCode *opt;
1139 uint32_t bm; 1139 uint32_t bm;
1140 size_t bfsize; 1140 size_t bfsize;
1141 uint32_t ttl_decrement; 1141 uint32_t ttl_decrement;
@@ -1165,13 +1165,13 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
1165 bits++; 1165 bits++;
1166 bm >>= 1; 1166 bm >>= 1;
1167 } 1167 }
1168 if (msize < sizeof (struct GetMessage) + bits * sizeof (GNUNET_HashCode)) 1168 if (msize < sizeof (struct GetMessage) + bits * sizeof (struct GNUNET_HashCode))
1169 { 1169 {
1170 GNUNET_break_op (0); 1170 GNUNET_break_op (0);
1171 return NULL; 1171 return NULL;
1172 } 1172 }
1173 opt = (const GNUNET_HashCode *) &gm[1]; 1173 opt = (const struct GNUNET_HashCode *) &gm[1];
1174 bfsize = msize - sizeof (struct GetMessage) - bits * sizeof (GNUNET_HashCode); 1174 bfsize = msize - sizeof (struct GetMessage) - bits * sizeof (struct GNUNET_HashCode);
1175 /* bfsize must be power of 2, check! */ 1175 /* bfsize must be power of 2, check! */
1176 if (0 != ((bfsize - 1) & bfsize)) 1176 if (0 != ((bfsize - 1) & bfsize))
1177 { 1177 {
@@ -1284,7 +1284,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
1284 prd = GSF_pending_request_get_data_ (pr); 1284 prd = GSF_pending_request_get_data_ (pr);
1285 if ((prd->type == type) && 1285 if ((prd->type == type) &&
1286 ((type != GNUNET_BLOCK_TYPE_FS_SBLOCK) || 1286 ((type != GNUNET_BLOCK_TYPE_FS_SBLOCK) ||
1287 (0 == memcmp (&prd->namespace, namespace, sizeof (GNUNET_HashCode))))) 1287 (0 == memcmp (&prd->namespace, namespace, sizeof (struct GNUNET_HashCode)))))
1288 { 1288 {
1289 if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl) 1289 if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl)
1290 { 1290 {
@@ -1612,7 +1612,7 @@ struct IterationContext
1612 * @return GNUNET_YES to continue iteration 1612 * @return GNUNET_YES to continue iteration
1613 */ 1613 */
1614static int 1614static int
1615call_iterator (void *cls, const GNUNET_HashCode * key, void *value) 1615call_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
1616{ 1616{
1617 struct IterationContext *ic = cls; 1617 struct IterationContext *ic = cls;
1618 struct GSF_ConnectedPeer *cp = value; 1618 struct GSF_ConnectedPeer *cp = value;
@@ -1728,7 +1728,7 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
1728 * @return GNUNET_OK to continue iteration 1728 * @return GNUNET_OK to continue iteration
1729 */ 1729 */
1730static int 1730static int
1731flush_trust (void *cls, const GNUNET_HashCode * key, void *value) 1731flush_trust (void *cls, const struct GNUNET_HashCode * key, void *value)
1732{ 1732{
1733 struct GSF_ConnectedPeer *cp = value; 1733 struct GSF_ConnectedPeer *cp = value;
1734 char *fn; 1734 char *fn;
@@ -1829,7 +1829,7 @@ GSF_connected_peer_init_ ()
1829 * @return GNUNET_YES (we should continue to iterate) 1829 * @return GNUNET_YES (we should continue to iterate)
1830 */ 1830 */
1831static int 1831static int
1832clean_peer (void *cls, const GNUNET_HashCode * key, void *value) 1832clean_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
1833{ 1833{
1834 GSF_peer_disconnect_handler_ (NULL, (const struct GNUNET_PeerIdentity *) key); 1834 GSF_peer_disconnect_handler_ (NULL, (const struct GNUNET_PeerIdentity *) key);
1835 return GNUNET_YES; 1835 return GNUNET_YES;
@@ -1862,7 +1862,7 @@ GSF_connected_peer_done_ ()
1862 * @return GNUNET_YES (we should continue to iterate) 1862 * @return GNUNET_YES (we should continue to iterate)
1863 */ 1863 */
1864static int 1864static int
1865clean_local_client (void *cls, const GNUNET_HashCode * key, void *value) 1865clean_local_client (void *cls, const struct GNUNET_HashCode * key, void *value)
1866{ 1866{
1867 const struct GSF_LocalClient *lc = cls; 1867 const struct GSF_LocalClient *lc = cls;
1868 struct GSF_ConnectedPeer *cp = value; 1868 struct GSF_ConnectedPeer *cp = value;
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c
index e45289484..60dd1c131 100644
--- a/src/fs/gnunet-service-fs_indexing.c
+++ b/src/fs/gnunet-service-fs_indexing.c
@@ -67,7 +67,7 @@ struct IndexInfo
67 /** 67 /**
68 * Hash of the contents of the file. 68 * Hash of the contents of the file.
69 */ 69 */
70 GNUNET_HashCode file_id; 70 struct GNUNET_HashCode file_id;
71 71
72}; 72};
73 73
@@ -126,7 +126,7 @@ write_index_list ()
126 while (pos != NULL) 126 while (pos != NULL)
127 { 127 {
128 if ((GNUNET_OK != 128 if ((GNUNET_OK !=
129 GNUNET_BIO_write (wh, &pos->file_id, sizeof (GNUNET_HashCode))) || 129 GNUNET_BIO_write (wh, &pos->file_id, sizeof (struct GNUNET_HashCode))) ||
130 (GNUNET_OK != GNUNET_BIO_write_string (wh, pos->filename))) 130 (GNUNET_OK != GNUNET_BIO_write_string (wh, pos->filename)))
131 break; 131 break;
132 pos = pos->next; 132 pos = pos->next;
@@ -152,7 +152,7 @@ read_index_list ()
152 char *fn; 152 char *fn;
153 struct IndexInfo *pos; 153 struct IndexInfo *pos;
154 char *fname; 154 char *fname;
155 GNUNET_HashCode hc; 155 struct GNUNET_HashCode hc;
156 size_t slen; 156 size_t slen;
157 char *emsg; 157 char *emsg;
158 158
@@ -180,7 +180,7 @@ read_index_list ()
180 } 180 }
181 while ((GNUNET_OK == 181 while ((GNUNET_OK ==
182 GNUNET_BIO_read (rh, "Hash of indexed file", &hc, 182 GNUNET_BIO_read (rh, "Hash of indexed file", &hc,
183 sizeof (GNUNET_HashCode))) && 183 sizeof (struct GNUNET_HashCode))) &&
184 (GNUNET_OK == 184 (GNUNET_OK ==
185 GNUNET_BIO_read_string (rh, "Name of indexed file", &fname, 185 GNUNET_BIO_read_string (rh, "Name of indexed file", &fname,
186 1024 * 16)) && (fname != NULL)) 186 1024 * 16)) && (fname != NULL))
@@ -253,13 +253,13 @@ signal_index_ok (struct IndexInfo *ii)
253 * @param res resulting hash, NULL on error 253 * @param res resulting hash, NULL on error
254 */ 254 */
255static void 255static void
256hash_for_index_val (void *cls, const GNUNET_HashCode * res) 256hash_for_index_val (void *cls, const struct GNUNET_HashCode * res)
257{ 257{
258 struct IndexInfo *ii = cls; 258 struct IndexInfo *ii = cls;
259 259
260 ii->fhc = NULL; 260 ii->fhc = NULL;
261 if ((res == NULL) || 261 if ((res == NULL) ||
262 (0 != memcmp (res, &ii->file_id, sizeof (GNUNET_HashCode)))) 262 (0 != memcmp (res, &ii->file_id, sizeof (struct GNUNET_HashCode))))
263 { 263 {
264 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 264 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
265 _ 265 _
@@ -431,7 +431,7 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
431 while (NULL != pos) 431 while (NULL != pos)
432 { 432 {
433 next = pos->next; 433 next = pos->next;
434 if (0 == memcmp (&pos->file_id, &um->file_id, sizeof (GNUNET_HashCode))) 434 if (0 == memcmp (&pos->file_id, &um->file_id, sizeof (struct GNUNET_HashCode)))
435 { 435 {
436 if (prev == NULL) 436 if (prev == NULL)
437 indexed_files = next; 437 indexed_files = next;
@@ -502,7 +502,7 @@ remove_cont (void *cls, int success,
502 * @return GNUNET_OK on success 502 * @return GNUNET_OK on success
503 */ 503 */
504int 504int
505GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size, 505GNUNET_FS_handle_on_demand_block (const struct GNUNET_HashCode * key, uint32_t size,
506 const void *data, enum GNUNET_BLOCK_Type type, 506 const void *data, enum GNUNET_BLOCK_Type type,
507 uint32_t priority, uint32_t anonymity, 507 uint32_t priority, uint32_t anonymity,
508 struct GNUNET_TIME_Absolute expiration, 508 struct GNUNET_TIME_Absolute expiration,
@@ -511,10 +511,10 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
511 void *cont_cls) 511 void *cont_cls)
512{ 512{
513 const struct OnDemandBlock *odb; 513 const struct OnDemandBlock *odb;
514 GNUNET_HashCode nkey; 514 struct GNUNET_HashCode nkey;
515 struct GNUNET_CRYPTO_AesSessionKey skey; 515 struct GNUNET_CRYPTO_AesSessionKey skey;
516 struct GNUNET_CRYPTO_AesInitializationVector iv; 516 struct GNUNET_CRYPTO_AesInitializationVector iv;
517 GNUNET_HashCode query; 517 struct GNUNET_HashCode query;
518 ssize_t nsize; 518 ssize_t nsize;
519 char ndata[DBLOCK_SIZE]; 519 char ndata[DBLOCK_SIZE];
520 char edata[DBLOCK_SIZE]; 520 char edata[DBLOCK_SIZE];
@@ -565,7 +565,7 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
565 GNUNET_CRYPTO_hash_to_aes_key (&nkey, &skey, &iv); 565 GNUNET_CRYPTO_hash_to_aes_key (&nkey, &skey, &iv);
566 GNUNET_CRYPTO_aes_encrypt (ndata, nsize, &skey, &iv, edata); 566 GNUNET_CRYPTO_aes_encrypt (ndata, nsize, &skey, &iv, edata);
567 GNUNET_CRYPTO_hash (edata, nsize, &query); 567 GNUNET_CRYPTO_hash (edata, nsize, &query);
568 if (0 != memcmp (&query, key, sizeof (GNUNET_HashCode))) 568 if (0 != memcmp (&query, key, sizeof (struct GNUNET_HashCode)))
569 { 569 {
570 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 570 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
571 _("Indexed file `%s' changed at offset %llu\n"), fn, 571 _("Indexed file `%s' changed at offset %llu\n"), fn,
diff --git a/src/fs/gnunet-service-fs_indexing.h b/src/fs/gnunet-service-fs_indexing.h
index 4295b2011..3bb0af262 100644
--- a/src/fs/gnunet-service-fs_indexing.h
+++ b/src/fs/gnunet-service-fs_indexing.h
@@ -55,7 +55,7 @@
55 * @return GNUNET_OK on success 55 * @return GNUNET_OK on success
56 */ 56 */
57int 57int
58GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size, 58GNUNET_FS_handle_on_demand_block (const struct GNUNET_HashCode * key, uint32_t size,
59 const void *data, enum GNUNET_BLOCK_Type type, 59 const void *data, enum GNUNET_BLOCK_Type type,
60 uint32_t priority, uint32_t anonymity, 60 uint32_t priority, uint32_t anonymity,
61 struct GNUNET_TIME_Absolute expiration, 61 struct GNUNET_TIME_Absolute expiration,
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c
index 20d430e5a..f3b18256b 100644
--- a/src/fs/gnunet-service-fs_lc.c
+++ b/src/fs/gnunet-service-fs_lc.c
@@ -299,7 +299,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
299 *message, 299 *message,
300 struct GSF_PendingRequest **prptr) 300 struct GSF_PendingRequest **prptr)
301{ 301{
302 static GNUNET_HashCode all_zeros; 302 static struct GNUNET_HashCode all_zeros;
303 const struct SearchMessage *sm; 303 const struct SearchMessage *sm;
304 struct GSF_LocalClient *lc; 304 struct GSF_LocalClient *lc;
305 struct ClientRequest *cr; 305 struct ClientRequest *cr;
@@ -311,7 +311,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
311 311
312 msize = ntohs (message->size); 312 msize = ntohs (message->size);
313 if ((msize < sizeof (struct SearchMessage)) || 313 if ((msize < sizeof (struct SearchMessage)) ||
314 (0 != (msize - sizeof (struct SearchMessage)) % sizeof (GNUNET_HashCode))) 314 (0 != (msize - sizeof (struct SearchMessage)) % sizeof (struct GNUNET_HashCode)))
315 { 315 {
316 GNUNET_break (0); 316 GNUNET_break (0);
317 *prptr = NULL; 317 *prptr = NULL;
@@ -320,7 +320,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
320 GNUNET_STATISTICS_update (GSF_stats, 320 GNUNET_STATISTICS_update (GSF_stats,
321 gettext_noop ("# client searches received"), 1, 321 gettext_noop ("# client searches received"), 1,
322 GNUNET_NO); 322 GNUNET_NO);
323 sc = (msize - sizeof (struct SearchMessage)) / sizeof (GNUNET_HashCode); 323 sc = (msize - sizeof (struct SearchMessage)) / sizeof (struct GNUNET_HashCode);
324 sm = (const struct SearchMessage *) message; 324 sm = (const struct SearchMessage *) message;
325 type = ntohl (sm->type); 325 type = ntohl (sm->type);
326 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 326 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -340,7 +340,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
340 (SEARCH_MESSAGE_OPTION_CONTINUED was always set) and that have a 340 (SEARCH_MESSAGE_OPTION_CONTINUED was always set) and that have a
341 matching query and type */ 341 matching query and type */
342 if ((GNUNET_YES != prd->has_started) && 342 if ((GNUNET_YES != prd->has_started) &&
343 (0 != memcmp (&prd->query, &sm->query, sizeof (GNUNET_HashCode))) && 343 (0 != memcmp (&prd->query, &sm->query, sizeof (struct GNUNET_HashCode))) &&
344 (prd->type == type)) 344 (prd->type == type))
345 break; 345 break;
346 cr = cr->next; 346 cr = cr->next;
@@ -350,7 +350,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
350 { 350 {
351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
352 "Have existing request, merging content-seen lists.\n"); 352 "Have existing request, merging content-seen lists.\n");
353 GSF_pending_request_update_ (cr->pr, (const GNUNET_HashCode *) &sm[1], sc); 353 GSF_pending_request_update_ (cr->pr, (const struct GNUNET_HashCode *) &sm[1], sc);
354 GNUNET_STATISTICS_update (GSF_stats, 354 GNUNET_STATISTICS_update (GSF_stats,
355 gettext_noop 355 gettext_noop
356 ("# client searches updated (merged content seen list)"), 356 ("# client searches updated (merged content seen list)"),
@@ -371,7 +371,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
371 : NULL, 371 : NULL,
372 (0 != 372 (0 !=
373 memcmp (&sm->target, &all_zeros, 373 memcmp (&sm->target, &all_zeros,
374 sizeof (GNUNET_HashCode))) 374 sizeof (struct GNUNET_HashCode)))
375 ? (const struct GNUNET_PeerIdentity *) 375 ? (const struct GNUNET_PeerIdentity *)
376 &sm->target : NULL, NULL, 0, 376 &sm->target : NULL, NULL, 0,
377 0 /* bf */ , 377 0 /* bf */ ,
@@ -380,7 +380,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
380 0 /* ttl */ , 380 0 /* ttl */ ,
381 0 /* sender PID */ , 381 0 /* sender PID */ ,
382 0 /* origin PID */ , 382 0 /* origin PID */ ,
383 (const GNUNET_HashCode *) &sm[1], sc, 383 (const struct GNUNET_HashCode *) &sm[1], sc,
384 &client_response_handler, cr); 384 &client_response_handler, cr);
385 } 385 }
386 *prptr = cr->pr; 386 *prptr = cr->pr;
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c
index 71b0fc091..c70f3cc84 100644
--- a/src/fs/gnunet-service-fs_pe.c
+++ b/src/fs/gnunet-service-fs_pe.c
@@ -224,7 +224,7 @@ static unsigned long long plan_count;
224 * @param rp a request plan 224 * @param rp a request plan
225 * @return the associated query 225 * @return the associated query
226 */ 226 */
227static const GNUNET_HashCode * 227static const struct GNUNET_HashCode *
228get_rp_key (struct GSF_RequestPlan *rp) 228get_rp_key (struct GSF_RequestPlan *rp)
229{ 229{
230 return &GSF_pending_request_get_data_ (rp->prl_head->pr)->query; 230 return &GSF_pending_request_get_data_ (rp->prl_head->pr)->query;
@@ -512,7 +512,7 @@ struct MergeContext
512 * GNUNET_NO if not (merge success) 512 * GNUNET_NO if not (merge success)
513 */ 513 */
514static int 514static int
515merge_pr (void *cls, const GNUNET_HashCode * query, void *element) 515merge_pr (void *cls, const struct GNUNET_HashCode * query, void *element)
516{ 516{
517 struct MergeContext *mpr = cls; 517 struct MergeContext *mpr = cls;
518 struct GSF_RequestPlan *rp = element; 518 struct GSF_RequestPlan *rp = element;
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index 8ca4121a5..0914ca4d2 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -74,7 +74,7 @@ struct GSF_PendingRequest
74 /** 74 /**
75 * Array of hash codes of replies we've already seen. 75 * Array of hash codes of replies we've already seen.
76 */ 76 */
77 GNUNET_HashCode *replies_seen; 77 struct GNUNET_HashCode *replies_seen;
78 78
79 /** 79 /**
80 * Bloomfilter masking replies we've already seen. 80 * Bloomfilter masking replies we've already seen.
@@ -263,15 +263,15 @@ refresh_bloomfilter (struct GSF_PendingRequest *pr)
263struct GSF_PendingRequest * 263struct GSF_PendingRequest *
264GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, 264GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
265 enum GNUNET_BLOCK_Type type, 265 enum GNUNET_BLOCK_Type type,
266 const GNUNET_HashCode * query, 266 const struct GNUNET_HashCode * query,
267 const GNUNET_HashCode * namespace, 267 const struct GNUNET_HashCode * namespace,
268 const struct GNUNET_PeerIdentity *target, 268 const struct GNUNET_PeerIdentity *target,
269 const char *bf_data, size_t bf_size, 269 const char *bf_data, size_t bf_size,
270 uint32_t mingle, uint32_t anonymity_level, 270 uint32_t mingle, uint32_t anonymity_level,
271 uint32_t priority, int32_t ttl, 271 uint32_t priority, int32_t ttl,
272 GNUNET_PEER_Id sender_pid, 272 GNUNET_PEER_Id sender_pid,
273 GNUNET_PEER_Id origin_pid, 273 GNUNET_PEER_Id origin_pid,
274 const GNUNET_HashCode * replies_seen, 274 const struct GNUNET_HashCode * replies_seen,
275 unsigned int replies_seen_count, 275 unsigned int replies_seen_count,
276 GSF_PendingRequestReplyHandler rh, void *rh_cls) 276 GSF_PendingRequestReplyHandler rh, void *rh_cls)
277{ 277{
@@ -324,9 +324,9 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
324 { 324 {
325 pr->replies_seen_size = replies_seen_count; 325 pr->replies_seen_size = replies_seen_count;
326 pr->replies_seen = 326 pr->replies_seen =
327 GNUNET_malloc (sizeof (GNUNET_HashCode) * pr->replies_seen_size); 327 GNUNET_malloc (sizeof (struct GNUNET_HashCode) * pr->replies_seen_size);
328 memcpy (pr->replies_seen, replies_seen, 328 memcpy (pr->replies_seen, replies_seen,
329 replies_seen_count * sizeof (GNUNET_HashCode)); 329 replies_seen_count * sizeof (struct GNUNET_HashCode));
330 pr->replies_seen_count = replies_seen_count; 330 pr->replies_seen_count = replies_seen_count;
331 } 331 }
332 if (NULL != bf_data) 332 if (NULL != bf_data)
@@ -398,11 +398,11 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
398 if ((pra->public_data.type != prb->public_data.type) || 398 if ((pra->public_data.type != prb->public_data.type) ||
399 (0 != 399 (0 !=
400 memcmp (&pra->public_data.query, &prb->public_data.query, 400 memcmp (&pra->public_data.query, &prb->public_data.query,
401 sizeof (GNUNET_HashCode))) || 401 sizeof (struct GNUNET_HashCode))) ||
402 ((pra->public_data.type == GNUNET_BLOCK_TYPE_FS_SBLOCK) && 402 ((pra->public_data.type == GNUNET_BLOCK_TYPE_FS_SBLOCK) &&
403 (0 != 403 (0 !=
404 memcmp (&pra->public_data.namespace, &prb->public_data.namespace, 404 memcmp (&pra->public_data.namespace, &prb->public_data.namespace,
405 sizeof (GNUNET_HashCode))))) 405 sizeof (struct GNUNET_HashCode)))))
406 return GNUNET_NO; 406 return GNUNET_NO;
407 return GNUNET_OK; 407 return GNUNET_OK;
408} 408}
@@ -419,11 +419,11 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
419 */ 419 */
420void 420void
421GSF_pending_request_update_ (struct GSF_PendingRequest *pr, 421GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
422 const GNUNET_HashCode * replies_seen, 422 const struct GNUNET_HashCode * replies_seen,
423 unsigned int replies_seen_count) 423 unsigned int replies_seen_count)
424{ 424{
425 unsigned int i; 425 unsigned int i;
426 GNUNET_HashCode mhash; 426 struct GNUNET_HashCode mhash;
427 427
428 if (replies_seen_count + pr->replies_seen_count < pr->replies_seen_count) 428 if (replies_seen_count + pr->replies_seen_count < pr->replies_seen_count)
429 return; /* integer overflow */ 429 return; /* integer overflow */
@@ -434,7 +434,7 @@ GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
434 GNUNET_array_grow (pr->replies_seen, pr->replies_seen_size, 434 GNUNET_array_grow (pr->replies_seen, pr->replies_seen_size,
435 replies_seen_count + pr->replies_seen_count); 435 replies_seen_count + pr->replies_seen_count);
436 memcpy (&pr->replies_seen[pr->replies_seen_count], replies_seen, 436 memcpy (&pr->replies_seen[pr->replies_seen_count], replies_seen,
437 sizeof (GNUNET_HashCode) * replies_seen_count); 437 sizeof (struct GNUNET_HashCode) * replies_seen_count);
438 pr->replies_seen_count += replies_seen_count; 438 pr->replies_seen_count += replies_seen_count;
439 refresh_bloomfilter (pr); 439 refresh_bloomfilter (pr);
440 } 440 }
@@ -477,7 +477,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
477{ 477{
478 char lbuf[GNUNET_SERVER_MAX_MESSAGE_SIZE]; 478 char lbuf[GNUNET_SERVER_MAX_MESSAGE_SIZE];
479 struct GetMessage *gm; 479 struct GetMessage *gm;
480 GNUNET_HashCode *ext; 480 struct GNUNET_HashCode *ext;
481 size_t msize; 481 size_t msize;
482 unsigned int k; 482 unsigned int k;
483 uint32_t bm; 483 uint32_t bm;
@@ -515,7 +515,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
515 k++; 515 k++;
516 } 516 }
517 bf_size = GNUNET_CONTAINER_bloomfilter_get_size (pr->bf); 517 bf_size = GNUNET_CONTAINER_bloomfilter_get_size (pr->bf);
518 msize = sizeof (struct GetMessage) + bf_size + k * sizeof (GNUNET_HashCode); 518 msize = sizeof (struct GetMessage) + bf_size + k * sizeof (struct GNUNET_HashCode);
519 GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); 519 GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE);
520 if (buf_size < msize) 520 if (buf_size < msize)
521 return msize; 521 return msize;
@@ -537,13 +537,13 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
537 gm->filter_mutator = htonl (pr->mingle); 537 gm->filter_mutator = htonl (pr->mingle);
538 gm->hash_bitmap = htonl (bm); 538 gm->hash_bitmap = htonl (bm);
539 gm->query = pr->public_data.query; 539 gm->query = pr->public_data.query;
540 ext = (GNUNET_HashCode *) & gm[1]; 540 ext = (struct GNUNET_HashCode *) & gm[1];
541 k = 0; 541 k = 0;
542 if (!do_route) 542 if (!do_route)
543 GNUNET_PEER_resolve (pr->sender_pid, 543 GNUNET_PEER_resolve (pr->sender_pid,
544 (struct GNUNET_PeerIdentity *) &ext[k++]); 544 (struct GNUNET_PeerIdentity *) &ext[k++]);
545 if (GNUNET_BLOCK_TYPE_FS_SBLOCK == pr->public_data.type) 545 if (GNUNET_BLOCK_TYPE_FS_SBLOCK == pr->public_data.type)
546 memcpy (&ext[k++], &pr->public_data.namespace, sizeof (GNUNET_HashCode)); 546 memcpy (&ext[k++], &pr->public_data.namespace, sizeof (struct GNUNET_HashCode));
547 if (GNUNET_YES == pr->public_data.has_target) 547 if (GNUNET_YES == pr->public_data.has_target)
548 ext[k++] = pr->public_data.target.hashPubKey; 548 ext[k++] = pr->public_data.target.hashPubKey;
549 if (pr->bf != NULL) 549 if (pr->bf != NULL)
@@ -565,7 +565,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
565 * @return GNUNET_YES (we should continue to iterate) 565 * @return GNUNET_YES (we should continue to iterate)
566 */ 566 */
567static int 567static int
568clean_request (void *cls, const GNUNET_HashCode * key, void *value) 568clean_request (void *cls, const struct GNUNET_HashCode * key, void *value)
569{ 569{
570 struct GSF_PendingRequest *pr = value; 570 struct GSF_PendingRequest *pr = value;
571 GSF_LocalLookupContinuation cont; 571 GSF_LocalLookupContinuation cont;
@@ -763,11 +763,11 @@ update_request_performance_data (struct ProcessReplyClosure *prq,
763 * @return GNUNET_YES (we should continue to iterate) 763 * @return GNUNET_YES (we should continue to iterate)
764 */ 764 */
765static int 765static int
766process_reply (void *cls, const GNUNET_HashCode * key, void *value) 766process_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
767{ 767{
768 struct ProcessReplyClosure *prq = cls; 768 struct ProcessReplyClosure *prq = cls;
769 struct GSF_PendingRequest *pr = value; 769 struct GSF_PendingRequest *pr = value;
770 GNUNET_HashCode chash; 770 struct GNUNET_HashCode chash;
771 struct GNUNET_TIME_Absolute last_transmission; 771 struct GNUNET_TIME_Absolute last_transmission;
772 772
773 if (NULL == pr->rh) 773 if (NULL == pr->rh)
@@ -783,7 +783,7 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value)
783 &pr->public_data.namespace, 783 &pr->public_data.namespace,
784 (prq->type == 784 (prq->type ==
785 GNUNET_BLOCK_TYPE_FS_SBLOCK) ? 785 GNUNET_BLOCK_TYPE_FS_SBLOCK) ?
786 sizeof (GNUNET_HashCode) : 0, prq->data, 786 sizeof (struct GNUNET_HashCode) : 0, prq->data,
787 prq->size); 787 prq->size);
788 switch (prq->eval) 788 switch (prq->eval)
789 { 789 {
@@ -1000,7 +1000,7 @@ test_put_load_too_high (uint32_t priority)
1000 */ 1000 */
1001static void 1001static void
1002handle_dht_reply (void *cls, struct GNUNET_TIME_Absolute exp, 1002handle_dht_reply (void *cls, struct GNUNET_TIME_Absolute exp,
1003 const GNUNET_HashCode * key, 1003 const struct GNUNET_HashCode * key,
1004 const struct GNUNET_PeerIdentity *get_path, 1004 const struct GNUNET_PeerIdentity *get_path,
1005 unsigned int get_path_length, 1005 unsigned int get_path_length,
1006 const struct GNUNET_PeerIdentity *put_path, 1006 const struct GNUNET_PeerIdentity *put_path,
@@ -1057,7 +1057,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
1057 const void *xquery; 1057 const void *xquery;
1058 size_t xquery_size; 1058 size_t xquery_size;
1059 struct GNUNET_PeerIdentity pi; 1059 struct GNUNET_PeerIdentity pi;
1060 char buf[sizeof (GNUNET_HashCode) * 2] GNUNET_ALIGN; 1060 char buf[sizeof (struct GNUNET_HashCode) * 2] GNUNET_ALIGN;
1061 1061
1062 if (0 != pr->public_data.anonymity_level) 1062 if (0 != pr->public_data.anonymity_level)
1063 return; 1063 return;
@@ -1071,8 +1071,8 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
1071 if (GNUNET_BLOCK_TYPE_FS_SBLOCK == pr->public_data.type) 1071 if (GNUNET_BLOCK_TYPE_FS_SBLOCK == pr->public_data.type)
1072 { 1072 {
1073 xquery = buf; 1073 xquery = buf;
1074 memcpy (buf, &pr->public_data.namespace, sizeof (GNUNET_HashCode)); 1074 memcpy (buf, &pr->public_data.namespace, sizeof (struct GNUNET_HashCode));
1075 xquery_size = sizeof (GNUNET_HashCode); 1075 xquery_size = sizeof (struct GNUNET_HashCode);
1076 } 1076 }
1077 if (0 != (pr->public_data.options & GSF_PRO_FORWARD_ONLY)) 1077 if (0 != (pr->public_data.options & GSF_PRO_FORWARD_ONLY))
1078 { 1078 {
@@ -1151,7 +1151,7 @@ odc_warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1151 * maybe 0 if no unique identifier is available 1151 * maybe 0 if no unique identifier is available
1152 */ 1152 */
1153static void 1153static void
1154process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size, 1154process_local_reply (void *cls, const struct GNUNET_HashCode * key, size_t size,
1155 const void *data, enum GNUNET_BLOCK_Type type, 1155 const void *data, enum GNUNET_BLOCK_Type type,
1156 uint32_t priority, uint32_t anonymity, 1156 uint32_t priority, uint32_t anonymity,
1157 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 1157 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -1159,7 +1159,7 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
1159 struct GSF_PendingRequest *pr = cls; 1159 struct GSF_PendingRequest *pr = cls;
1160 GSF_LocalLookupContinuation cont; 1160 GSF_LocalLookupContinuation cont;
1161 struct ProcessReplyClosure prq; 1161 struct ProcessReplyClosure prq;
1162 GNUNET_HashCode query; 1162 struct GNUNET_HashCode query;
1163 unsigned int old_rf; 1163 unsigned int old_rf;
1164 1164
1165 GNUNET_SCHEDULER_cancel (pr->warn_task); 1165 GNUNET_SCHEDULER_cancel (pr->warn_task);
@@ -1477,7 +1477,7 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
1477 size_t dsize; 1477 size_t dsize;
1478 enum GNUNET_BLOCK_Type type; 1478 enum GNUNET_BLOCK_Type type;
1479 struct GNUNET_TIME_Absolute expiration; 1479 struct GNUNET_TIME_Absolute expiration;
1480 GNUNET_HashCode query; 1480 struct GNUNET_HashCode query;
1481 struct ProcessReplyClosure prq; 1481 struct ProcessReplyClosure prq;
1482 struct GNUNET_TIME_Relative block_time; 1482 struct GNUNET_TIME_Relative block_time;
1483 double putl; 1483 double putl;
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index 92827f76b..ab088f88f 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -84,12 +84,12 @@ struct GSF_PendingRequestData
84 /** 84 /**
85 * Primary query hash for this request. 85 * Primary query hash for this request.
86 */ 86 */
87 GNUNET_HashCode query; 87 struct GNUNET_HashCode query;
88 88
89 /** 89 /**
90 * Namespace to query, only set if the type is SBLOCK. 90 * Namespace to query, only set if the type is SBLOCK.
91 */ 91 */
92 GNUNET_HashCode namespace; 92 struct GNUNET_HashCode namespace;
93 93
94 /** 94 /**
95 * Identity of a peer hosting the content, only set if 95 * Identity of a peer hosting the content, only set if
@@ -220,15 +220,15 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls,
220struct GSF_PendingRequest * 220struct GSF_PendingRequest *
221GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, 221GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
222 enum GNUNET_BLOCK_Type type, 222 enum GNUNET_BLOCK_Type type,
223 const GNUNET_HashCode * query, 223 const struct GNUNET_HashCode * query,
224 const GNUNET_HashCode * namespace, 224 const struct GNUNET_HashCode * namespace,
225 const struct GNUNET_PeerIdentity *target, 225 const struct GNUNET_PeerIdentity *target,
226 const char *bf_data, size_t bf_size, 226 const char *bf_data, size_t bf_size,
227 uint32_t mingle, uint32_t anonymity_level, 227 uint32_t mingle, uint32_t anonymity_level,
228 uint32_t priority, int32_t ttl, 228 uint32_t priority, int32_t ttl,
229 GNUNET_PEER_Id sender_pid, 229 GNUNET_PEER_Id sender_pid,
230 GNUNET_PEER_Id origin_pid, 230 GNUNET_PEER_Id origin_pid,
231 const GNUNET_HashCode * replies_seen, 231 const struct GNUNET_HashCode * replies_seen,
232 unsigned int replies_seen_count, 232 unsigned int replies_seen_count,
233 GSF_PendingRequestReplyHandler rh, void *rh_cls); 233 GSF_PendingRequestReplyHandler rh, void *rh_cls);
234 234
@@ -243,7 +243,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
243 */ 243 */
244void 244void
245GSF_pending_request_update_ (struct GSF_PendingRequest *pr, 245GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
246 const GNUNET_HashCode * replies_seen, 246 const struct GNUNET_HashCode * replies_seen,
247 unsigned int replies_seen_count); 247 unsigned int replies_seen_count);
248 248
249 249
@@ -305,7 +305,7 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup);
305 * @return GNUNET_YES to continue to iterate 305 * @return GNUNET_YES to continue to iterate
306 */ 306 */
307typedef int (*GSF_PendingRequestIterator) (void *cls, 307typedef int (*GSF_PendingRequestIterator) (void *cls,
308 const GNUNET_HashCode * key, 308 const struct GNUNET_HashCode * key,
309 struct GSF_PendingRequest * pr); 309 struct GSF_PendingRequest * pr);
310 310
311 311
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c
index 22a76f332..aaf7ca8a3 100644
--- a/src/fs/gnunet-service-fs_push.c
+++ b/src/fs/gnunet-service-fs_push.c
@@ -71,7 +71,7 @@ struct MigrationReadyBlock
71 /** 71 /**
72 * Query for the block. 72 * Query for the block.
73 */ 73 */
74 GNUNET_HashCode query; 74 struct GNUNET_HashCode query;
75 75
76 /** 76 /**
77 * When does this block expire? 77 * When does this block expire?
@@ -467,7 +467,7 @@ consider_gathering ()
467 * maybe 0 if no unique identifier is available 467 * maybe 0 if no unique identifier is available
468 */ 468 */
469static void 469static void
470process_migration_content (void *cls, const GNUNET_HashCode * key, size_t size, 470process_migration_content (void *cls, const struct GNUNET_HashCode * key, size_t size,
471 const void *data, enum GNUNET_BLOCK_Type type, 471 const void *data, enum GNUNET_BLOCK_Type type,
472 uint32_t priority, uint32_t anonymity, 472 uint32_t priority, uint32_t anonymity,
473 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 473 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
diff --git a/src/fs/gnunet-service-fs_put.c b/src/fs/gnunet-service-fs_put.c
index 463acc02d..e4b13edab 100644
--- a/src/fs/gnunet-service-fs_put.c
+++ b/src/fs/gnunet-service-fs_put.c
@@ -180,7 +180,7 @@ delay_dht_put_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
180 * maybe 0 if no unique identifier is available 180 * maybe 0 if no unique identifier is available
181 */ 181 */
182static void 182static void
183process_dht_put_content (void *cls, const GNUNET_HashCode * key, size_t size, 183process_dht_put_content (void *cls, const struct GNUNET_HashCode * key, size_t size,
184 const void *data, enum GNUNET_BLOCK_Type type, 184 const void *data, enum GNUNET_BLOCK_Type type,
185 uint32_t priority, uint32_t anonymity, 185 uint32_t priority, uint32_t anonymity,
186 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 186 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
diff --git a/src/fs/plugin_block_fs.c b/src/fs/plugin_block_fs.c
index 9b73f2497..c43a5de5e 100644
--- a/src/fs/plugin_block_fs.c
+++ b/src/fs/plugin_block_fs.c
@@ -57,17 +57,17 @@
57 */ 57 */
58static enum GNUNET_BLOCK_EvaluationResult 58static enum GNUNET_BLOCK_EvaluationResult
59block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type, 59block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
60 const GNUNET_HashCode * query, 60 const struct GNUNET_HashCode * query,
61 struct GNUNET_CONTAINER_BloomFilter **bf, 61 struct GNUNET_CONTAINER_BloomFilter **bf,
62 int32_t bf_mutator, const void *xquery, 62 int32_t bf_mutator, const void *xquery,
63 size_t xquery_size, const void *reply_block, 63 size_t xquery_size, const void *reply_block,
64 size_t reply_block_size) 64 size_t reply_block_size)
65{ 65{
66 const struct SBlock *sb; 66 const struct SBlock *sb;
67 GNUNET_HashCode chash; 67 struct GNUNET_HashCode chash;
68 GNUNET_HashCode mhash; 68 struct GNUNET_HashCode mhash;
69 const GNUNET_HashCode *nsid; 69 const struct GNUNET_HashCode *nsid;
70 GNUNET_HashCode sh; 70 struct GNUNET_HashCode sh;
71 71
72 switch (type) 72 switch (type)
73 { 73 {
@@ -107,7 +107,7 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
107 } 107 }
108 return GNUNET_BLOCK_EVALUATION_OK_MORE; 108 return GNUNET_BLOCK_EVALUATION_OK_MORE;
109 case GNUNET_BLOCK_TYPE_FS_SBLOCK: 109 case GNUNET_BLOCK_TYPE_FS_SBLOCK:
110 if (xquery_size != sizeof (GNUNET_HashCode)) 110 if (xquery_size != sizeof (struct GNUNET_HashCode))
111 { 111 {
112 GNUNET_break_op (0); 112 GNUNET_break_op (0);
113 return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID; 113 return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID;
@@ -124,7 +124,7 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
124 GNUNET_CRYPTO_hash (&sb->subspace, 124 GNUNET_CRYPTO_hash (&sb->subspace,
125 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 125 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
126 &sh); 126 &sh);
127 if (0 != memcmp (nsid, &sh, sizeof (GNUNET_HashCode))) 127 if (0 != memcmp (nsid, &sh, sizeof (struct GNUNET_HashCode)))
128 { 128 {
129 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "block-fs", 129 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "block-fs",
130 _ 130 _
@@ -167,7 +167,7 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
167static int 167static int
168block_plugin_fs_get_key (void *cls, enum GNUNET_BLOCK_Type type, 168block_plugin_fs_get_key (void *cls, enum GNUNET_BLOCK_Type type,
169 const void *block, size_t block_size, 169 const void *block, size_t block_size,
170 GNUNET_HashCode * key) 170 struct GNUNET_HashCode * key)
171{ 171{
172 const struct KBlock *kb; 172 const struct KBlock *kb;
173 const struct SBlock *sb; 173 const struct SBlock *sb;
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index 78af1f148..e837b630f 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -34,7 +34,7 @@
34 34
35static struct PeerContext p1; 35static struct PeerContext p1;
36 36
37static GNUNET_HashCode nsid; 37static struct GNUNET_HashCode nsid;
38 38
39static struct GNUNET_FS_Uri *sks_expect_uri; 39static struct GNUNET_FS_Uri *sks_expect_uri;
40 40
@@ -314,7 +314,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
314 314
315 315
316static void 316static void
317ns_iterator (void *cls, const char *name, const GNUNET_HashCode * id) 317ns_iterator (void *cls, const char *name, const struct GNUNET_HashCode * id)
318{ 318{
319 int *ok = cls; 319 int *ok = cls;
320 320