aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ats-test/test_transport_ats.c2
-rw-r--r--src/ats/gnunet-service-ats_addresses.c14
-rw-r--r--src/ats/gnunet-service-ats_addresses_mlp.c6
-rw-r--r--src/ats/gnunet-service-ats_reservations.c2
-rw-r--r--src/block/block.c14
-rw-r--r--src/block/plugin_block_template.c4
-rw-r--r--src/block/plugin_block_test.c8
-rw-r--r--src/block/test_block.c2
-rw-r--r--src/chat/chat.c14
-rw-r--r--src/chat/chat.h20
-rw-r--r--src/chat/gnunet-chat.c20
-rw-r--r--src/chat/gnunet-service-chat.c56
-rw-r--r--src/chat/test_chat.c18
-rw-r--r--src/chat/test_chat_private.c24
-rw-r--r--src/core/core_api.c2
-rw-r--r--src/core/gnunet-service-core_clients.c2
-rw-r--r--src/core/gnunet-service-core_kx.c6
-rw-r--r--src/core/gnunet-service-core_neighbours.c2
-rw-r--r--src/core/gnunet-service-core_sessions.c8
-rw-r--r--src/datacache/datacache.c6
-rw-r--r--src/datacache/perf_datacache.c18
-rw-r--r--src/datacache/plugin_datacache_mysql.c46
-rw-r--r--src/datacache/plugin_datacache_postgres.c16
-rw-r--r--src/datacache/plugin_datacache_sqlite.c18
-rw-r--r--src/datacache/plugin_datacache_template.c4
-rw-r--r--src/datacache/test_datacache.c24
-rw-r--r--src/datacache/test_datacache_quota.c12
-rw-r--r--src/datastore/datastore.h6
-rw-r--r--src/datastore/datastore_api.c8
-rw-r--r--src/datastore/gnunet-service-datastore.c18
-rw-r--r--src/datastore/perf_datastore_api.c10
-rw-r--r--src/datastore/perf_plugin_datastore.c10
-rw-r--r--src/datastore/plugin_datastore_mysql.c32
-rw-r--r--src/datastore/plugin_datastore_postgres.c32
-rw-r--r--src/datastore/plugin_datastore_sqlite.c28
-rw-r--r--src/datastore/plugin_datastore_template.c6
-rw-r--r--src/datastore/test_datastore_api.c14
-rw-r--r--src/datastore/test_datastore_api_management.c8
-rw-r--r--src/datastore/test_plugin_datastore.c12
-rw-r--r--src/dht/dht.h16
-rw-r--r--src/dht/dht_api.c28
-rw-r--r--src/dht/gnunet-dht-get.c4
-rw-r--r--src/dht/gnunet-dht-monitor.c10
-rw-r--r--src/dht/gnunet-dht-put.c2
-rw-r--r--src/dht/gnunet-service-dht_clients.c42
-rw-r--r--src/dht/gnunet-service-dht_clients.h8
-rw-r--r--src/dht/gnunet-service-dht_datacache.c8
-rw-r--r--src/dht/gnunet-service-dht_datacache.h4
-rw-r--r--src/dht/gnunet-service-dht_hello.c2
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c42
-rw-r--r--src/dht/gnunet-service-dht_neighbours.h6
-rw-r--r--src/dht/gnunet-service-dht_routing.c12
-rw-r--r--src/dht/gnunet-service-dht_routing.h4
-rw-r--r--src/dht/plugin_block_dht.c6
-rw-r--r--src/dht/test_dht_api.c10
-rw-r--r--src/dht/test_dht_monitor.c12
-rw-r--r--src/dht/test_dht_multipeer.c12
-rw-r--r--src/dht/test_dht_topo.c6
-rw-r--r--src/dht/test_dht_twopeer.c4
-rw-r--r--src/dht/test_dht_twopeer_get_put.c20
-rw-r--r--src/dht/test_dht_twopeer_path_tracking.c16
-rw-r--r--src/dht/test_dht_twopeer_put_get.c16
-rw-r--r--src/dns/plugin_block_dns.c6
-rw-r--r--src/dv/dv_api.c8
-rw-r--r--src/dv/gnunet-service-dv.c30
-rw-r--r--src/exit/exit.h6
-rw-r--r--src/exit/gnunet-daemon-exit.c34
-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
-rw-r--r--src/gns/gnunet-service-gns.c6
-rw-r--r--src/gns/gnunet-service-gns_resolver.c26
-rw-r--r--src/gns/plugin_block_gns.c18
-rw-r--r--src/gns/test_gns_dht_delegated_lookup.c6
-rw-r--r--src/gns/test_gns_pseu_shorten.c18
-rw-r--r--src/include/block_dns.h2
-rw-r--r--src/include/block_fs.h4
-rw-r--r--src/include/gnunet_block_lib.h10
-rw-r--r--src/include/gnunet_block_plugin.h4
-rw-r--r--src/include/gnunet_chat_service.h6
-rw-r--r--src/include/gnunet_common.h11
-rw-r--r--src/include/gnunet_constants.h2
-rw-r--r--src/include/gnunet_container_lib.h24
-rw-r--r--src/include/gnunet_crypto_lib.h60
-rw-r--r--src/include/gnunet_datacache_lib.h6
-rw-r--r--src/include/gnunet_datacache_plugin.h6
-rw-r--r--src/include/gnunet_datastore_plugin.h10
-rw-r--r--src/include/gnunet_datastore_service.h8
-rw-r--r--src/include/gnunet_dht_service.h14
-rw-r--r--src/include/gnunet_fs_service.h12
-rw-r--r--src/include/gnunet_pseudonym_lib.h14
-rw-r--r--src/include/gnunet_regex_lib.h8
-rw-r--r--src/include/gnunet_vpn_service.h2
-rw-r--r--src/integration-tests/connection_watchdog.c6
-rw-r--r--src/lockmanager/gnunet-service-lockmanager.c4
-rw-r--r--src/lockmanager/lockmanager_api.c6
-rw-r--r--src/mesh/gnunet-service-mesh.c44
-rw-r--r--src/mesh/gnunet-service-mesh_new.c44
-rw-r--r--src/mesh/mesh_tunnel_tree.c2
-rw-r--r--src/namestore/gnunet-service-namestore.c12
-rw-r--r--src/namestore/test_namestore_api_remove_not_existing_record.c2
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c4
-rw-r--r--src/nse/gnunet-service-nse.c14
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c6
-rw-r--r--src/regex/regex.c6
-rw-r--r--src/regex/test_regex_iterate_api.c2
-rw-r--r--src/testing_old/testing_group.c36
-rw-r--r--src/topology/gnunet-daemon-topology.c8
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c4
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c6
-rw-r--r--src/transport/gnunet-service-transport_validation.c6
-rw-r--r--src/transport/plugin_transport_tcp.c6
-rw-r--r--src/transport/plugin_transport_udp.c6
-rw-r--r--src/transport/plugin_transport_unix.c6
-rw-r--r--src/transport/transport_api.c2
-rw-r--r--src/util/common_logging.c4
-rw-r--r--src/util/container_bloomfilter.c16
-rw-r--r--src/util/container_multihashmap.c34
-rw-r--r--src/util/crypto_hash.c72
-rw-r--r--src/util/crypto_ksk.c30
-rw-r--r--src/util/crypto_rsa.c10
-rw-r--r--src/util/perf_crypto_hash.c10
-rw-r--r--src/util/pseudonym.c48
-rw-r--r--src/util/test_container_bloomfilter.c8
-rw-r--r--src/util/test_container_multihashmap.c4
-rw-r--r--src/util/test_crypto_hash.c20
-rw-r--r--src/util/test_crypto_ksk.c6
-rw-r--r--src/util/test_pseudonym.c26
-rw-r--r--src/vpn/gnunet-service-vpn.c32
-rw-r--r--src/vpn/gnunet-vpn.c2
-rw-r--r--src/vpn/vpn.h2
-rw-r--r--src/vpn/vpn_api.c4
157 files changed, 1059 insertions, 1060 deletions
diff --git a/src/ats-test/test_transport_ats.c b/src/ats-test/test_transport_ats.c
index 0d16cd1b8..1c920fb59 100644
--- a/src/ats-test/test_transport_ats.c
+++ b/src/ats-test/test_transport_ats.c
@@ -148,7 +148,7 @@ iterate_sections (void *cls, const char *section)
148 if (99 == strlen (section)) 148 if (99 == strlen (section))
149 { 149 {
150 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer '%s`\n", section); 150 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer '%s`\n", section);
151 GNUNET_HashCode h; 151 struct GNUNET_HashCode h;
152 int res = GNUNET_CRYPTO_hash_from_string (section, &h); 152 int res = GNUNET_CRYPTO_hash_from_string (section, &h);
153 153
154 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "HASH '%s` %i\n", GNUNET_h2s (&h), res); 154 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "HASH '%s` %i\n", GNUNET_h2s (&h), res);
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 9bf5ca678..97475ad19 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -98,7 +98,7 @@ send_bw_notification (struct ATS_Address *aa)
98 * @return GNUNET_OK (continue to iterate) 98 * @return GNUNET_OK (continue to iterate)
99 */ 99 */
100static int 100static int
101update_bw_simple_it (void *cls, const GNUNET_HashCode * key, void *value) 101update_bw_simple_it (void *cls, const struct GNUNET_HashCode * key, void *value)
102{ 102{
103 struct ATS_Address *aa = value; 103 struct ATS_Address *aa = value;
104 104
@@ -219,7 +219,7 @@ struct CompareAddressContext
219 219
220 220
221static int 221static int
222compare_address_it (void *cls, const GNUNET_HashCode * key, void *value) 222compare_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
223{ 223{
224 struct CompareAddressContext *cac = cls; 224 struct CompareAddressContext *cac = cls;
225 struct ATS_Address *aa = value; 225 struct ATS_Address *aa = value;
@@ -289,7 +289,7 @@ find_address (const struct GNUNET_PeerIdentity *peer,
289 289
290 290
291static int 291static int
292compare_address_session_it (void *cls, const GNUNET_HashCode * key, void *value) 292compare_address_session_it (void *cls, const struct GNUNET_HashCode * key, void *value)
293{ 293{
294 struct CompareAddressContext *cac = cls; 294 struct CompareAddressContext *cac = cls;
295 struct ATS_Address *aa = value; 295 struct ATS_Address *aa = value;
@@ -444,7 +444,7 @@ GAS_addresses_update (const struct GNUNET_PeerIdentity *peer,
444 * @return GNUNET_OK (continue to iterate) 444 * @return GNUNET_OK (continue to iterate)
445 */ 445 */
446static int 446static int
447destroy_by_session_id (void *cls, const GNUNET_HashCode * key, void *value) 447destroy_by_session_id (void *cls, const struct GNUNET_HashCode * key, void *value)
448{ 448{
449 const struct ATS_Address *info = cls; 449 const struct ATS_Address *info = cls;
450 struct ATS_Address *aa = value; 450 struct ATS_Address *aa = value;
@@ -539,7 +539,7 @@ GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer,
539 * @return GNUNET_OK (continue to iterate) 539 * @return GNUNET_OK (continue to iterate)
540 */ 540 */
541static int 541static int
542find_address_it (void *cls, const GNUNET_HashCode * key, void *value) 542find_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
543{ 543{
544 struct ATS_Address **ap = cls; 544 struct ATS_Address **ap = cls;
545 struct ATS_Address *aa = (struct ATS_Address *) value; 545 struct ATS_Address *aa = (struct ATS_Address *) value;
@@ -761,7 +761,7 @@ GAS_addresses_request_address (const struct GNUNET_PeerIdentity *peer)
761 761
762 762
763static int 763static int
764reset_address_it (void *cls, const GNUNET_HashCode * key, void *value) 764reset_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
765{ 765{
766 struct ATS_Address *aa = value; 766 struct ATS_Address *aa = value;
767 767
@@ -903,7 +903,7 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
903 * @return GNUNET_OK (continue to iterate) 903 * @return GNUNET_OK (continue to iterate)
904 */ 904 */
905static int 905static int
906free_address_it (void *cls, const GNUNET_HashCode * key, void *value) 906free_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
907{ 907{
908 struct ATS_Address *aa = value; 908 struct ATS_Address *aa = value;
909 909
diff --git a/src/ats/gnunet-service-ats_addresses_mlp.c b/src/ats/gnunet-service-ats_addresses_mlp.c
index 8bfa010ca..8ee9f57a6 100644
--- a/src/ats/gnunet-service-ats_addresses_mlp.c
+++ b/src/ats/gnunet-service-ats_addresses_mlp.c
@@ -278,7 +278,7 @@ mlp_delete_problem (struct GAS_MLP_Handle *mlp)
278 * @return GNUNET_OK to continue 278 * @return GNUNET_OK to continue
279 */ 279 */
280static int 280static int
281create_constraint_it (void *cls, const GNUNET_HashCode * key, void *value) 281create_constraint_it (void *cls, const struct GNUNET_HashCode * key, void *value)
282{ 282{
283 struct GAS_MLP_Handle *mlp = cls; 283 struct GAS_MLP_Handle *mlp = cls;
284 struct ATS_Address *address = value; 284 struct ATS_Address *address = value;
@@ -674,7 +674,7 @@ mlp_add_constraints_all_addresses (struct GAS_MLP_Handle *mlp, struct GNUNET_CON
674 * @return GNUNET_OK to continue 674 * @return GNUNET_OK to continue
675 */ 675 */
676static int 676static int
677create_columns_it (void *cls, const GNUNET_HashCode * key, void *value) 677create_columns_it (void *cls, const struct GNUNET_HashCode * key, void *value)
678{ 678{
679 struct GAS_MLP_Handle *mlp = cls; 679 struct GAS_MLP_Handle *mlp = cls;
680 struct ATS_Address *address = value; 680 struct ATS_Address *address = value;
@@ -1706,7 +1706,7 @@ GAS_mlp_address_delete (struct GAS_MLP_Handle *mlp, struct GNUNET_CONTAINER_Mult
1706} 1706}
1707 1707
1708static int 1708static int
1709mlp_get_preferred_address_it (void *cls, const GNUNET_HashCode * key, void *value) 1709mlp_get_preferred_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
1710{ 1710{
1711 1711
1712 struct ATS_PreferedAddress *aa = (struct ATS_PreferedAddress *) cls; 1712 struct ATS_PreferedAddress *aa = (struct ATS_PreferedAddress *) cls;
diff --git a/src/ats/gnunet-service-ats_reservations.c b/src/ats/gnunet-service-ats_reservations.c
index d1212dd00..daacbbec0 100644
--- a/src/ats/gnunet-service-ats_reservations.c
+++ b/src/ats/gnunet-service-ats_reservations.c
@@ -135,7 +135,7 @@ GAS_reservations_init ()
135 * @return GNUNET_OK (continue to iterate) 135 * @return GNUNET_OK (continue to iterate)
136 */ 136 */
137static int 137static int
138free_tracker (void *cls, const GNUNET_HashCode * key, void *value) 138free_tracker (void *cls, const struct GNUNET_HashCode * key, void *value)
139{ 139{
140 struct GNUNET_BANDWIDTH_Tracker *tracker = value; 140 struct GNUNET_BANDWIDTH_Tracker *tracker = value;
141 141
diff --git a/src/block/block.c b/src/block/block.c
index 51dab783d..344038d6e 100644
--- a/src/block/block.c
+++ b/src/block/block.c
@@ -78,10 +78,10 @@ struct GNUNET_BLOCK_Context
78 * @param hc where to store the result. 78 * @param hc where to store the result.
79 */ 79 */
80void 80void
81GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, uint32_t mingle_number, 81GNUNET_BLOCK_mingle_hash (const struct GNUNET_HashCode * in, uint32_t mingle_number,
82 GNUNET_HashCode * hc) 82 struct GNUNET_HashCode * hc)
83{ 83{
84 GNUNET_HashCode m; 84 struct GNUNET_HashCode m;
85 85
86 GNUNET_CRYPTO_hash (&mingle_number, sizeof (uint32_t), &m); 86 GNUNET_CRYPTO_hash (&mingle_number, sizeof (uint32_t), &m);
87 GNUNET_CRYPTO_hash_xor (&m, in, hc); 87 GNUNET_CRYPTO_hash_xor (&m, in, hc);
@@ -204,7 +204,7 @@ find_plugin (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type)
204enum GNUNET_BLOCK_EvaluationResult 204enum GNUNET_BLOCK_EvaluationResult
205GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, 205GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
206 enum GNUNET_BLOCK_Type type, 206 enum GNUNET_BLOCK_Type type,
207 const GNUNET_HashCode * query, 207 const struct GNUNET_HashCode * query,
208 struct GNUNET_CONTAINER_BloomFilter **bf, 208 struct GNUNET_CONTAINER_BloomFilter **bf,
209 int32_t bf_mutator, const void *xquery, 209 int32_t bf_mutator, const void *xquery,
210 size_t xquery_size, const void *reply_block, 210 size_t xquery_size, const void *reply_block,
@@ -233,7 +233,7 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
233int 233int
234GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx, 234GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
235 enum GNUNET_BLOCK_Type type, const void *block, 235 enum GNUNET_BLOCK_Type type, const void *block,
236 size_t block_size, GNUNET_HashCode * key) 236 size_t block_size, struct GNUNET_HashCode * key)
237{ 237{
238 struct GNUNET_BLOCK_PluginFunctions *plugin = find_plugin (ctx, type); 238 struct GNUNET_BLOCK_PluginFunctions *plugin = find_plugin (ctx, type);
239 239
@@ -285,11 +285,11 @@ compute_bloomfilter_size (unsigned int entry_count)
285 */ 285 */
286struct GNUNET_CONTAINER_BloomFilter * 286struct GNUNET_CONTAINER_BloomFilter *
287GNUNET_BLOCK_construct_bloomfilter (int32_t bf_mutator, 287GNUNET_BLOCK_construct_bloomfilter (int32_t bf_mutator,
288 const GNUNET_HashCode * seen_results, 288 const struct GNUNET_HashCode * seen_results,
289 unsigned int seen_results_count) 289 unsigned int seen_results_count)
290{ 290{
291 struct GNUNET_CONTAINER_BloomFilter *bf; 291 struct GNUNET_CONTAINER_BloomFilter *bf;
292 GNUNET_HashCode mhash; 292 struct GNUNET_HashCode mhash;
293 unsigned int i; 293 unsigned int i;
294 size_t nsize; 294 size_t nsize;
295 295
diff --git a/src/block/plugin_block_template.c b/src/block/plugin_block_template.c
index ca5b8744f..1675fdb1c 100644
--- a/src/block/plugin_block_template.c
+++ b/src/block/plugin_block_template.c
@@ -47,7 +47,7 @@
47 */ 47 */
48static enum GNUNET_BLOCK_EvaluationResult 48static enum GNUNET_BLOCK_EvaluationResult
49block_plugin_template_evaluate (void *cls, enum GNUNET_BLOCK_Type type, 49block_plugin_template_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
50 const GNUNET_HashCode * query, 50 const struct GNUNET_HashCode * query,
51 struct GNUNET_CONTAINER_BloomFilter **bf, 51 struct GNUNET_CONTAINER_BloomFilter **bf,
52 int32_t bf_mutator, const void *xquery, 52 int32_t bf_mutator, const void *xquery,
53 size_t xquery_size, const void *reply_block, 53 size_t xquery_size, const void *reply_block,
@@ -92,7 +92,7 @@ block_plugin_template_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
92static int 92static int
93block_plugin_template_get_key (void *cls, enum GNUNET_BLOCK_Type type, 93block_plugin_template_get_key (void *cls, enum GNUNET_BLOCK_Type type,
94 const void *block, size_t block_size, 94 const void *block, size_t block_size,
95 GNUNET_HashCode * key) 95 struct GNUNET_HashCode * key)
96{ 96{
97 return GNUNET_SYSERR; 97 return GNUNET_SYSERR;
98} 98}
diff --git a/src/block/plugin_block_test.c b/src/block/plugin_block_test.c
index 81e80e3ad..e6b4f4960 100644
--- a/src/block/plugin_block_test.c
+++ b/src/block/plugin_block_test.c
@@ -54,14 +54,14 @@
54 */ 54 */
55static enum GNUNET_BLOCK_EvaluationResult 55static enum GNUNET_BLOCK_EvaluationResult
56block_plugin_test_evaluate (void *cls, enum GNUNET_BLOCK_Type type, 56block_plugin_test_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
57 const GNUNET_HashCode * query, 57 const struct GNUNET_HashCode * query,
58 struct GNUNET_CONTAINER_BloomFilter **bf, 58 struct GNUNET_CONTAINER_BloomFilter **bf,
59 int32_t bf_mutator, const void *xquery, 59 int32_t bf_mutator, const void *xquery,
60 size_t xquery_size, const void *reply_block, 60 size_t xquery_size, const void *reply_block,
61 size_t reply_block_size) 61 size_t reply_block_size)
62{ 62{
63 GNUNET_HashCode chash; 63 struct GNUNET_HashCode chash;
64 GNUNET_HashCode mhash; 64 struct GNUNET_HashCode mhash;
65 65
66 if (type != GNUNET_BLOCK_TYPE_TEST) 66 if (type != GNUNET_BLOCK_TYPE_TEST)
67 return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED; 67 return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
@@ -106,7 +106,7 @@ block_plugin_test_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
106static int 106static int
107block_plugin_test_get_key (void *cls, enum GNUNET_BLOCK_Type type, 107block_plugin_test_get_key (void *cls, enum GNUNET_BLOCK_Type type,
108 const void *block, size_t block_size, 108 const void *block, size_t block_size,
109 GNUNET_HashCode * key) 109 struct GNUNET_HashCode * key)
110{ 110{
111 /* always fails since there is no fixed relationship between 111 /* always fails since there is no fixed relationship between
112 * keys and values for test values */ 112 * keys and values for test values */
diff --git a/src/block/test_block.c b/src/block/test_block.c
index e57b891ad..5e2b34696 100644
--- a/src/block/test_block.c
+++ b/src/block/test_block.c
@@ -32,7 +32,7 @@
32static int 32static int
33test_fs (struct GNUNET_BLOCK_Context *ctx) 33test_fs (struct GNUNET_BLOCK_Context *ctx)
34{ 34{
35 GNUNET_HashCode key; 35 struct GNUNET_HashCode key;
36 char block[4]; 36 char block[4];
37 37
38 memset (block, 1, sizeof (block)); 38 memset (block, 1, sizeof (block));
diff --git a/src/chat/chat.c b/src/chat/chat.c
index 72c49a063..d7ebd79b8 100644
--- a/src/chat/chat.c
+++ b/src/chat/chat.c
@@ -92,7 +92,7 @@ struct MemberList
92 /** 92 /**
93 * Member ID (pseudonym). 93 * Member ID (pseudonym).
94 */ 94 */
95 GNUNET_HashCode id; 95 struct GNUNET_HashCode id;
96 96
97}; 97};
98 98
@@ -224,8 +224,8 @@ process_result (struct GNUNET_CHAT_Room *room,
224 struct ReceiveNotificationMessage *received_msg; 224 struct ReceiveNotificationMessage *received_msg;
225 struct ConfirmationReceiptMessage *receipt; 225 struct ConfirmationReceiptMessage *receipt;
226 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; 226 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
227 GNUNET_HashCode id; 227 struct GNUNET_HashCode id;
228 const GNUNET_HashCode *sender; 228 const struct GNUNET_HashCode *sender;
229 struct GNUNET_CONTAINER_MetaData *meta; 229 struct GNUNET_CONTAINER_MetaData *meta;
230 struct GNUNET_CHAT_SendReceiptContext *src; 230 struct GNUNET_CHAT_SendReceiptContext *src;
231 struct MemberList *pos; 231 struct MemberList *pos;
@@ -308,7 +308,7 @@ process_result (struct GNUNET_CHAT_Room *room,
308 prev = NULL; 308 prev = NULL;
309 pos = room->members; 309 pos = room->members;
310 while ((NULL != pos) && 310 while ((NULL != pos) &&
311 (0 != memcmp (&pos->id, &id, sizeof (GNUNET_HashCode)))) 311 (0 != memcmp (&pos->id, &id, sizeof (struct GNUNET_HashCode))))
312 { 312 {
313 prev = pos; 313 prev = pos;
314 pos = pos->next; 314 pos = pos->next;
@@ -379,7 +379,7 @@ process_result (struct GNUNET_CHAT_Room *room,
379 while ((NULL != pos) && 379 while ((NULL != pos) &&
380 (0 != 380 (0 !=
381 memcmp (&pos->id, &received_msg->sender, 381 memcmp (&pos->id, &received_msg->sender,
382 sizeof (GNUNET_HashCode)))) 382 sizeof (struct GNUNET_HashCode))))
383 pos = pos->next; 383 pos = pos->next;
384 GNUNET_assert (NULL != pos); 384 GNUNET_assert (NULL != pos);
385 sender = &received_msg->sender; 385 sender = &received_msg->sender;
@@ -649,7 +649,7 @@ GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
649 GNUNET_CHAT_MemberListCallback memberCallback, 649 GNUNET_CHAT_MemberListCallback memberCallback,
650 void *member_cls, 650 void *member_cls,
651 GNUNET_CHAT_MessageConfirmation confirmationCallback, 651 GNUNET_CHAT_MessageConfirmation confirmationCallback,
652 void *confirmation_cls, GNUNET_HashCode * me) 652 void *confirmation_cls, struct GNUNET_HashCode * me)
653{ 653{
654 struct GNUNET_CHAT_Room *chat_room; 654 struct GNUNET_CHAT_Room *chat_room;
655 struct GNUNET_CRYPTO_RsaPrivateKey *priv_key; 655 struct GNUNET_CRYPTO_RsaPrivateKey *priv_key;
@@ -755,7 +755,7 @@ transmit_send_request (void *cls, size_t size, void *buf)
755 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); 755 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
756 msg_to_send->reserved = htonl (0); 756 msg_to_send->reserved = htonl (0);
757 if (NULL == smc->receiver) 757 if (NULL == smc->receiver)
758 memset (&msg_to_send->target, 0, sizeof (GNUNET_HashCode)); 758 memset (&msg_to_send->target, 0, sizeof (struct GNUNET_HashCode));
759 else 759 else
760 GNUNET_CRYPTO_hash (smc->receiver, 760 GNUNET_CRYPTO_hash (smc->receiver,
761 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 761 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
diff --git a/src/chat/chat.h b/src/chat/chat.h
index 5df7773a7..c65b75de9 100644
--- a/src/chat/chat.h
+++ b/src/chat/chat.h
@@ -80,7 +80,7 @@ struct ReceiveNotificationMessage
80 * Hash of the public key of the pseudonym of the sender of the message. 80 * Hash of the public key of the pseudonym of the sender of the message.
81 * Should be all zeros for anonymous. 81 * Should be all zeros for anonymous.
82 */ 82 */
83 GNUNET_HashCode sender; 83 struct GNUNET_HashCode sender;
84 84
85 /** 85 /**
86 * The encrypted session key. 86 * The encrypted session key.
@@ -136,7 +136,7 @@ struct TransmitRequestMessage
136 /** 136 /**
137 * Who should receive this message? Set to all zeros for "everyone". 137 * Who should receive this message? Set to all zeros for "everyone".
138 */ 138 */
139 GNUNET_HashCode target; 139 struct GNUNET_HashCode target;
140 140
141}; 141};
142 142
@@ -189,17 +189,17 @@ struct ConfirmationReceiptMessage
189 /** 189 /**
190 * Who is confirming the receipt? 190 * Who is confirming the receipt?
191 */ 191 */
192 GNUNET_HashCode target; 192 struct GNUNET_HashCode target;
193 193
194 /** 194 /**
195 * Who is the author of the chat message? 195 * Who is the author of the chat message?
196 */ 196 */
197 GNUNET_HashCode author; 197 struct GNUNET_HashCode author;
198 198
199 /** 199 /**
200 * Hash of the (possibly encrypted) content. 200 * Hash of the (possibly encrypted) content.
201 */ 201 */
202 GNUNET_HashCode content; 202 struct GNUNET_HashCode content;
203 203
204}; 204};
205 205
@@ -406,12 +406,12 @@ struct P2PReceiveNotificationMessage
406 * Hash of the public key of the pseudonym of the sender of the message 406 * Hash of the public key of the pseudonym of the sender of the message
407 * Should be all zeros for anonymous. 407 * Should be all zeros for anonymous.
408 */ 408 */
409 GNUNET_HashCode sender; 409 struct GNUNET_HashCode sender;
410 410
411 /** 411 /**
412 * Who should receive this message? Set to all zeros for "everyone". 412 * Who should receive this message? Set to all zeros for "everyone".
413 */ 413 */
414 GNUNET_HashCode target; 414 struct GNUNET_HashCode target;
415 415
416 /** 416 /**
417 * The encrypted session key. 417 * The encrypted session key.
@@ -465,17 +465,17 @@ struct P2PConfirmationReceiptMessage
465 /** 465 /**
466 * Who is confirming the receipt? 466 * Who is confirming the receipt?
467 */ 467 */
468 GNUNET_HashCode target; 468 struct GNUNET_HashCode target;
469 469
470 /** 470 /**
471 * Who is the author of the chat message? 471 * Who is the author of the chat message?
472 */ 472 */
473 GNUNET_HashCode author; 473 struct GNUNET_HashCode author;
474 474
475 /** 475 /**
476 * Hash of the (possibly encrypted) content. 476 * Hash of the (possibly encrypted) content.
477 */ 477 */
478 GNUNET_HashCode content; 478 struct GNUNET_HashCode content;
479 479
480}; 480};
481GNUNET_NETWORK_STRUCT_END 481GNUNET_NETWORK_STRUCT_END
diff --git a/src/chat/gnunet-chat.c b/src/chat/gnunet-chat.c
index 012f78ed9..d41d59062 100644
--- a/src/chat/gnunet-chat.c
+++ b/src/chat/gnunet-chat.c
@@ -110,7 +110,7 @@ join_cb (void *cls)
110 */ 110 */
111static int 111static int
112receive_cb (void *cls, struct GNUNET_CHAT_Room *room, 112receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
113 const GNUNET_HashCode * sender, 113 const struct GNUNET_HashCode * sender,
114 const struct GNUNET_CONTAINER_MetaData *member_info, 114 const struct GNUNET_CONTAINER_MetaData *member_info,
115 const char *message, struct GNUNET_TIME_Absolute timestamp, 115 const char *message, struct GNUNET_TIME_Absolute timestamp,
116 enum GNUNET_CHAT_MsgOptions options) 116 enum GNUNET_CHAT_MsgOptions options)
@@ -199,7 +199,7 @@ static int
199confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room, 199confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
200 uint32_t orig_seq_number, 200 uint32_t orig_seq_number,
201 struct GNUNET_TIME_Absolute timestamp, 201 struct GNUNET_TIME_Absolute timestamp,
202 const GNUNET_HashCode * receiver) 202 const struct GNUNET_HashCode * receiver)
203{ 203{
204 char *nick; 204 char *nick;
205 char *unique_nick; 205 char *unique_nick;
@@ -238,7 +238,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
238 char *nick; 238 char *nick;
239 char *non_unique_nick; 239 char *non_unique_nick;
240 int nick_is_a_dup; 240 int nick_is_a_dup;
241 GNUNET_HashCode id; 241 struct GNUNET_HashCode id;
242 struct UserList *pos; 242 struct UserList *pos;
243 struct UserList *prev; 243 struct UserList *prev;
244 244
@@ -304,7 +304,7 @@ do_join (const char *arg, const void *xtra)
304{ 304{
305 char *my_name; 305 char *my_name;
306 int my_name_is_a_dup; 306 int my_name_is_a_dup;
307 GNUNET_HashCode me; 307 struct GNUNET_HashCode me;
308 308
309 if (arg[0] == '#') 309 if (arg[0] == '#')
310 arg++; /* ignore first hash */ 310 arg++; /* ignore first hash */
@@ -343,7 +343,7 @@ do_nick (const char *msg, const void *xtra)
343{ 343{
344 char *my_name; 344 char *my_name;
345 int my_name_is_a_dup; 345 int my_name_is_a_dup;
346 GNUNET_HashCode me; 346 struct GNUNET_HashCode me;
347 347
348 GNUNET_CHAT_leave_room (room); 348 GNUNET_CHAT_leave_room (room);
349 free_user_list (); 349 free_user_list ();
@@ -383,7 +383,7 @@ do_names (const char *msg, const void *xtra)
383 char *unique_name; 383 char *unique_name;
384 int name_is_a_dup; 384 int name_is_a_dup;
385 struct UserList *pos; 385 struct UserList *pos;
386 GNUNET_HashCode pid; 386 struct GNUNET_HashCode pid;
387 387
388 FPRINTF (stdout, _("Users in room `%s': "), room_name); 388 FPRINTF (stdout, _("Users in room `%s': "), room_name);
389 pos = users; 389 pos = users;
@@ -424,8 +424,8 @@ static int
424do_send_pm (const char *msg, const void *xtra) 424do_send_pm (const char *msg, const void *xtra)
425{ 425{
426 char *user; 426 char *user;
427 GNUNET_HashCode uid; 427 struct GNUNET_HashCode uid;
428 GNUNET_HashCode pid; 428 struct GNUNET_HashCode pid;
429 uint32_t seq; 429 uint32_t seq;
430 struct UserList *pos; 430 struct UserList *pos;
431 431
@@ -451,7 +451,7 @@ do_send_pm (const char *msg, const void *xtra)
451 GNUNET_CRYPTO_hash (&pos->pkey, 451 GNUNET_CRYPTO_hash (&pos->pkey,
452 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 452 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
453 &pid); 453 &pid);
454 if (0 == memcmp (&pid, &uid, sizeof (GNUNET_HashCode))) 454 if (0 == memcmp (&pid, &uid, sizeof (struct GNUNET_HashCode)))
455 break; 455 break;
456 pos = pos->next; 456 pos = pos->next;
457 } 457 }
@@ -661,7 +661,7 @@ static void
661run (void *cls, char *const *args, const char *cfgfile, 661run (void *cls, char *const *args, const char *cfgfile,
662 const struct GNUNET_CONFIGURATION_Handle *c) 662 const struct GNUNET_CONFIGURATION_Handle *c)
663{ 663{
664 GNUNET_HashCode me; 664 struct GNUNET_HashCode me;
665 char *my_name; 665 char *my_name;
666 int my_name_is_a_dup; 666 int my_name_is_a_dup;
667 667
diff --git a/src/chat/gnunet-service-chat.c b/src/chat/gnunet-service-chat.c
index 3405659a9..a20c8cf32 100644
--- a/src/chat/gnunet-service-chat.c
+++ b/src/chat/gnunet-service-chat.c
@@ -69,7 +69,7 @@ struct ChatClient
69 /** 69 /**
70 * Hash of the public key (for convenience). 70 * Hash of the public key (for convenience).
71 */ 71 */
72 GNUNET_HashCode id; 72 struct GNUNET_HashCode id;
73 73
74 /** 74 /**
75 * Options which the client is willing to receive. 75 * Options which the client is willing to receive.
@@ -117,7 +117,7 @@ struct AnonymousMessage
117 /** 117 /**
118 * Hash of the message. 118 * Hash of the message.
119 */ 119 */
120 GNUNET_HashCode hash; 120 struct GNUNET_HashCode hash;
121 121
122}; 122};
123 123
@@ -162,7 +162,7 @@ static void
162remember_anonymous_message (const struct P2PReceiveNotificationMessage 162remember_anonymous_message (const struct P2PReceiveNotificationMessage
163 *p2p_rnmsg) 163 *p2p_rnmsg)
164{ 164{
165 static GNUNET_HashCode hash; 165 static struct GNUNET_HashCode hash;
166 struct AnonymousMessage *anon_msg; 166 struct AnonymousMessage *anon_msg;
167 struct AnonymousMessage *prev; 167 struct AnonymousMessage *prev;
168 int anon_list_len; 168 int anon_list_len;
@@ -192,13 +192,13 @@ remember_anonymous_message (const struct P2PReceiveNotificationMessage
192static int 192static int
193lookup_anonymous_message (const struct P2PReceiveNotificationMessage *p2p_rnmsg) 193lookup_anonymous_message (const struct P2PReceiveNotificationMessage *p2p_rnmsg)
194{ 194{
195 static GNUNET_HashCode hash; 195 static struct GNUNET_HashCode hash;
196 struct AnonymousMessage *anon_msg; 196 struct AnonymousMessage *anon_msg;
197 197
198 GNUNET_CRYPTO_hash (p2p_rnmsg, ntohs (p2p_rnmsg->header.size), &hash); 198 GNUNET_CRYPTO_hash (p2p_rnmsg, ntohs (p2p_rnmsg->header.size), &hash);
199 anon_msg = anonymous_list_head; 199 anon_msg = anonymous_list_head;
200 while ((NULL != anon_msg) && 200 while ((NULL != anon_msg) &&
201 (0 != memcmp (&anon_msg->hash, &hash, sizeof (GNUNET_HashCode)))) 201 (0 != memcmp (&anon_msg->hash, &hash, sizeof (struct GNUNET_HashCode))))
202 anon_msg = anon_msg->next; 202 anon_msg = anon_msg->next;
203 return (NULL != anon_msg); 203 return (NULL != anon_msg);
204} 204}
@@ -244,7 +244,7 @@ transmit_message_notification_to_peer (void *cls, size_t size, void *buf)
244 * Ask to send a message notification to the peer. 244 * Ask to send a message notification to the peer.
245 */ 245 */
246static int 246static int
247send_message_noficiation (void *cls, const GNUNET_HashCode * key, void *value) 247send_message_noficiation (void *cls, const struct GNUNET_HashCode * key, void *value)
248{ 248{
249 struct P2PReceiveNotificationMessage *msg = cls; 249 struct P2PReceiveNotificationMessage *msg = cls;
250 struct ConnectedPeer *cp = value; 250 struct ConnectedPeer *cp = value;
@@ -280,7 +280,7 @@ static void
280handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client, 280handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
281 const struct GNUNET_MessageHeader *message) 281 const struct GNUNET_MessageHeader *message)
282{ 282{
283 static GNUNET_HashCode all_zeros; 283 static struct GNUNET_HashCode all_zeros;
284 const struct TransmitRequestMessage *trmsg; 284 const struct TransmitRequestMessage *trmsg;
285 struct ReceiveNotificationMessage *rnmsg; 285 struct ReceiveNotificationMessage *rnmsg;
286 struct P2PReceiveNotificationMessage *p2p_rnmsg; 286 struct P2PReceiveNotificationMessage *p2p_rnmsg;
@@ -349,7 +349,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
349 is_anon = (0 != (ntohl (trmsg->msg_options) & GNUNET_CHAT_MSG_ANONYMOUS)); 349 is_anon = (0 != (ntohl (trmsg->msg_options) & GNUNET_CHAT_MSG_ANONYMOUS));
350 if (is_anon) 350 if (is_anon)
351 { 351 {
352 memset (&rnmsg->sender, 0, sizeof (GNUNET_HashCode)); 352 memset (&rnmsg->sender, 0, sizeof (struct GNUNET_HashCode));
353 rnmsg->sequence_number = 0; 353 rnmsg->sequence_number = 0;
354 } 354 }
355 else 355 else
@@ -364,7 +364,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
364 "Encrypting the session key using the public key of '%s'\n", 364 "Encrypting the session key using the public key of '%s'\n",
365 GNUNET_h2s (&trmsg->target)); 365 GNUNET_h2s (&trmsg->target));
366#endif 366#endif
367 if (0 == memcmp (&all_zeros, &trmsg->target, sizeof (GNUNET_HashCode))) 367 if (0 == memcmp (&all_zeros, &trmsg->target, sizeof (struct GNUNET_HashCode)))
368 { 368 {
369 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 369 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
370 "Malformed message: private, but no target\n"); 370 "Malformed message: private, but no target\n");
@@ -377,7 +377,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
377 target = client_list_head; 377 target = client_list_head;
378 while ((NULL != target) && 378 while ((NULL != target) &&
379 (0 != 379 (0 !=
380 memcmp (&target->id, &trmsg->target, sizeof (GNUNET_HashCode)))) 380 memcmp (&target->id, &trmsg->target, sizeof (struct GNUNET_HashCode))))
381 target = target->next; 381 target = target->next;
382 if (NULL == target) 382 if (NULL == target)
383 { 383 {
@@ -416,7 +416,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
416 (pos->client != client)) 416 (pos->client != client))
417 { 417 {
418 if (((!is_priv) || 418 if (((!is_priv) ||
419 (0 == memcmp (&trmsg->target, &pos->id, sizeof (GNUNET_HashCode)))) 419 (0 == memcmp (&trmsg->target, &pos->id, sizeof (struct GNUNET_HashCode))))
420 && (0 == (ntohl (trmsg->msg_options) & (~pos->msg_options)))) 420 && (0 == (ntohl (trmsg->msg_options) & (~pos->msg_options))))
421 { 421 {
422 GNUNET_SERVER_notification_context_unicast (nc, pos->client, 422 GNUNET_SERVER_notification_context_unicast (nc, pos->client,
@@ -521,7 +521,7 @@ transmit_join_notification_to_peer (void *cls, size_t size, void *buf)
521 * Ask to send a join notification to the peer. 521 * Ask to send a join notification to the peer.
522 */ 522 */
523static int 523static int
524send_join_noficiation (void *cls, const GNUNET_HashCode * key, void *value) 524send_join_noficiation (void *cls, const struct GNUNET_HashCode * key, void *value)
525{ 525{
526 struct ChatClient *entry = cls; 526 struct ChatClient *entry = cls;
527 struct ConnectedPeer *cp = value; 527 struct ConnectedPeer *cp = value;
@@ -703,7 +703,7 @@ transmit_confirmation_receipt_to_peer (void *cls, size_t size, void *buf)
703 * Ask to send a confirmation receipt to the peer. 703 * Ask to send a confirmation receipt to the peer.
704 */ 704 */
705static int 705static int
706send_confirmation_receipt (void *cls, const GNUNET_HashCode * key, void *value) 706send_confirmation_receipt (void *cls, const struct GNUNET_HashCode * key, void *value)
707{ 707{
708 struct P2PConfirmationReceiptMessage *receipt = cls; 708 struct P2PConfirmationReceiptMessage *receipt = cls;
709 struct ConnectedPeer *cp = value; 709 struct ConnectedPeer *cp = value;
@@ -754,7 +754,7 @@ handle_acknowledge_request (void *cls, struct GNUNET_SERVER_Client *client,
754 author = client_list_head; 754 author = client_list_head;
755 while ((NULL != author) && 755 while ((NULL != author) &&
756 (0 != 756 (0 !=
757 memcmp (&receipt->author, &author->id, sizeof (GNUNET_HashCode)))) 757 memcmp (&receipt->author, &author->id, sizeof (struct GNUNET_HashCode))))
758 author = author->next; 758 author = author->next;
759 if (NULL == author) 759 if (NULL == author)
760 { 760 {
@@ -767,7 +767,7 @@ handle_acknowledge_request (void *cls, struct GNUNET_SERVER_Client *client,
767 target = client_list_head; 767 target = client_list_head;
768 while ((NULL != target) && 768 while ((NULL != target) &&
769 (0 != 769 (0 !=
770 memcmp (&receipt->target, &target->id, sizeof (GNUNET_HashCode)))) 770 memcmp (&receipt->target, &target->id, sizeof (struct GNUNET_HashCode))))
771 target = target->next; 771 target = target->next;
772 if (NULL == target) 772 if (NULL == target)
773 { 773 {
@@ -880,7 +880,7 @@ transmit_leave_notification_to_peer (void *cls, size_t size, void *buf)
880 * Ask to send a leave notification to the peer. 880 * Ask to send a leave notification to the peer.
881 */ 881 */
882static int 882static int
883send_leave_noficiation (void *cls, const GNUNET_HashCode * key, void *value) 883send_leave_noficiation (void *cls, const struct GNUNET_HashCode * key, void *value)
884{ 884{
885 struct ChatClient *entry = cls; 885 struct ChatClient *entry = cls;
886 struct ConnectedPeer *cp = value; 886 struct ConnectedPeer *cp = value;
@@ -1000,7 +1000,7 @@ handle_p2p_join_notification (void *cls,
1000 struct ChatClient *new_entry; 1000 struct ChatClient *new_entry;
1001 struct ChatClient *entry; 1001 struct ChatClient *entry;
1002 struct JoinNotificationMessage *jnmsg; 1002 struct JoinNotificationMessage *jnmsg;
1003 GNUNET_HashCode id; 1003 struct GNUNET_HashCode id;
1004 1004
1005 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got P2P join notification\n"); 1005 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got P2P join notification\n");
1006 if (ntohs (message->size) <= sizeof (struct P2PJoinNotificationMessage)) 1006 if (ntohs (message->size) <= sizeof (struct P2PJoinNotificationMessage))
@@ -1025,7 +1025,7 @@ handle_p2p_join_notification (void *cls,
1025 entry = client_list_head; 1025 entry = client_list_head;
1026 while (NULL != entry) 1026 while (NULL != entry)
1027 { 1027 {
1028 if (0 == memcmp (&entry->id, &id, sizeof (GNUNET_HashCode))) 1028 if (0 == memcmp (&entry->id, &id, sizeof (struct GNUNET_HashCode)))
1029 { 1029 {
1030#if DEBUG_CHAT_SERVICE 1030#if DEBUG_CHAT_SERVICE
1031 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1031 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1109,7 +1109,7 @@ handle_p2p_leave_notification (void *cls,
1109 unsigned int atsi_count) 1109 unsigned int atsi_count)
1110{ 1110{
1111 const struct P2PLeaveNotificationMessage *p2p_lnmsg; 1111 const struct P2PLeaveNotificationMessage *p2p_lnmsg;
1112 GNUNET_HashCode id; 1112 struct GNUNET_HashCode id;
1113 struct ChatClient *pos; 1113 struct ChatClient *pos;
1114 struct ChatClient *prev; 1114 struct ChatClient *prev;
1115 struct ChatClient *entry; 1115 struct ChatClient *entry;
@@ -1124,7 +1124,7 @@ handle_p2p_leave_notification (void *cls,
1124 prev = NULL; 1124 prev = NULL;
1125 while (NULL != pos) 1125 while (NULL != pos)
1126 { 1126 {
1127 if (0 == memcmp (&pos->id, &id, sizeof (GNUNET_HashCode))) 1127 if (0 == memcmp (&pos->id, &id, sizeof (struct GNUNET_HashCode)))
1128 break; 1128 break;
1129 prev = pos; 1129 prev = pos;
1130 pos = pos->next; 1130 pos = pos->next;
@@ -1195,7 +1195,7 @@ handle_p2p_message_notification (void *cls,
1195 struct ReceiveNotificationMessage *rnmsg; 1195 struct ReceiveNotificationMessage *rnmsg;
1196 struct ChatClient *sender; 1196 struct ChatClient *sender;
1197 struct ChatClient *pos; 1197 struct ChatClient *pos;
1198 static GNUNET_HashCode all_zeros; 1198 static struct GNUNET_HashCode all_zeros;
1199 int is_priv; 1199 int is_priv;
1200 int is_anon; 1200 int is_anon;
1201 uint16_t msg_len; 1201 uint16_t msg_len;
@@ -1246,7 +1246,7 @@ handle_p2p_message_notification (void *cls,
1246 sender = client_list_head; 1246 sender = client_list_head;
1247 while ((NULL != sender) && 1247 while ((NULL != sender) &&
1248 (0 != 1248 (0 !=
1249 memcmp (&sender->id, &p2p_rnmsg->sender, sizeof (GNUNET_HashCode)))) 1249 memcmp (&sender->id, &p2p_rnmsg->sender, sizeof (struct GNUNET_HashCode))))
1250 sender = sender->next; 1250 sender = sender->next;
1251 if (NULL == sender) 1251 if (NULL == sender)
1252 { 1252 {
@@ -1287,7 +1287,7 @@ handle_p2p_message_notification (void *cls,
1287 rnmsg->reserved = htonl (0); 1287 rnmsg->reserved = htonl (0);
1288 rnmsg->timestamp = p2p_rnmsg->timestamp; 1288 rnmsg->timestamp = p2p_rnmsg->timestamp;
1289 is_priv = 1289 is_priv =
1290 (0 != memcmp (&all_zeros, &p2p_rnmsg->target, sizeof (GNUNET_HashCode))); 1290 (0 != memcmp (&all_zeros, &p2p_rnmsg->target, sizeof (struct GNUNET_HashCode)));
1291 if (is_priv) 1291 if (is_priv)
1292 memcpy (&rnmsg->encrypted_key, &p2p_rnmsg->encrypted_key, 1292 memcpy (&rnmsg->encrypted_key, &p2p_rnmsg->encrypted_key,
1293 sizeof (struct GNUNET_CRYPTO_RsaEncryptedData)); 1293 sizeof (struct GNUNET_CRYPTO_RsaEncryptedData));
@@ -1300,7 +1300,7 @@ handle_p2p_message_notification (void *cls,
1300 { 1300 {
1301 if (((!is_priv) || 1301 if (((!is_priv) ||
1302 (0 == 1302 (0 ==
1303 memcmp (&p2p_rnmsg->target, &pos->id, sizeof (GNUNET_HashCode)))) && 1303 memcmp (&p2p_rnmsg->target, &pos->id, sizeof (struct GNUNET_HashCode)))) &&
1304 (0 == (ntohl (p2p_rnmsg->msg_options) & (~pos->msg_options)))) 1304 (0 == (ntohl (p2p_rnmsg->msg_options) & (~pos->msg_options))))
1305 { 1305 {
1306 GNUNET_SERVER_notification_context_unicast (nc, pos->client, 1306 GNUNET_SERVER_notification_context_unicast (nc, pos->client,
@@ -1396,7 +1396,7 @@ handle_p2p_confirmation_receipt (void *cls,
1396 target = client_list_head; 1396 target = client_list_head;
1397 while ((NULL != target) && 1397 while ((NULL != target) &&
1398 (0 != 1398 (0 !=
1399 memcmp (&target->id, &p2p_crmsg->target, sizeof (GNUNET_HashCode)))) 1399 memcmp (&target->id, &p2p_crmsg->target, sizeof (struct GNUNET_HashCode))))
1400 target = target->next; 1400 target = target->next;
1401 if (NULL == target) 1401 if (NULL == target)
1402 { 1402 {
@@ -1420,7 +1420,7 @@ handle_p2p_confirmation_receipt (void *cls,
1420 author = client_list_head; 1420 author = client_list_head;
1421 while ((NULL != author) && 1421 while ((NULL != author) &&
1422 (0 != 1422 (0 !=
1423 memcmp (&author->id, &p2p_crmsg->author, sizeof (GNUNET_HashCode)))) 1423 memcmp (&author->id, &p2p_crmsg->author, sizeof (struct GNUNET_HashCode))))
1424 author = author->next; 1424 author = author->next;
1425 if (NULL == author) 1425 if (NULL == author)
1426 { 1426 {
@@ -1563,7 +1563,7 @@ peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
1563 * @return GNUNET_YES (we should continue to iterate) 1563 * @return GNUNET_YES (we should continue to iterate)
1564 */ 1564 */
1565static int 1565static int
1566clean_peer (void *cls, const GNUNET_HashCode * key, void *value) 1566clean_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
1567{ 1567{
1568 struct ConnectedPeer *cp; 1568 struct ConnectedPeer *cp;
1569 const struct GNUNET_PeerIdentity *peer = 1569 const struct GNUNET_PeerIdentity *peer =
@@ -1595,7 +1595,7 @@ peer_disconnect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
1595 return; 1595 return;
1596 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer disconnected: %s\n", 1596 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer disconnected: %s\n",
1597 GNUNET_i2s (peer)); 1597 GNUNET_i2s (peer));
1598 clean_peer (NULL, (const GNUNET_HashCode *) peer, NULL); 1598 clean_peer (NULL, (const struct GNUNET_HashCode *) peer, NULL);
1599} 1599}
1600 1600
1601 1601
diff --git a/src/chat/test_chat.c b/src/chat/test_chat.c
index 2e8272def..370cb04ee 100644
--- a/src/chat/test_chat.c
+++ b/src/chat/test_chat.c
@@ -58,7 +58,7 @@ struct Wanted
58{ 58{
59 struct GNUNET_CONTAINER_MetaData *meta; 59 struct GNUNET_CONTAINER_MetaData *meta;
60 60
61 GNUNET_HashCode *sender; 61 struct GNUNET_HashCode *sender;
62 62
63 char *msg; 63 char *msg;
64 64
@@ -80,9 +80,9 @@ static struct PeerContext p1;
80 80
81static struct PeerContext p2; 81static struct PeerContext p2;
82 82
83static GNUNET_HashCode alice; 83static struct GNUNET_HashCode alice;
84 84
85static GNUNET_HashCode bob; 85static struct GNUNET_HashCode bob;
86 86
87static struct GNUNET_CHAT_Room *alice_room; 87static struct GNUNET_CHAT_Room *alice_room;
88 88
@@ -201,7 +201,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
201 enum GNUNET_CHAT_MsgOptions options) 201 enum GNUNET_CHAT_MsgOptions options)
202{ 202{
203 struct Wanted *want = cls; 203 struct Wanted *want = cls;
204 GNUNET_HashCode sender; 204 struct GNUNET_HashCode sender;
205 205
206#if VERBOSE 206#if VERBOSE
207 printf ("%s - told that %s has %s\n", want->me, 207 printf ("%s - told that %s has %s\n", want->me,
@@ -213,7 +213,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
213 GNUNET_CRYPTO_hash (member_id, 213 GNUNET_CRYPTO_hash (member_id,
214 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 214 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
215 &sender); 215 &sender);
216 if ((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) && 216 if ((0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode))) &&
217 (((member_info == NULL) && (want->meta == NULL)) || 217 (((member_info == NULL) && (want->meta == NULL)) ||
218 ((member_info != NULL) && (want->meta != NULL) && 218 ((member_info != NULL) && (want->meta != NULL) &&
219 (GNUNET_CONTAINER_meta_data_test_equal (member_info, want->meta)))) && 219 (GNUNET_CONTAINER_meta_data_test_equal (member_info, want->meta)))) &&
@@ -234,7 +234,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
234 234
235static int 235static int
236receive_cb (void *cls, struct GNUNET_CHAT_Room *room, 236receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
237 const GNUNET_HashCode * sender, 237 const struct GNUNET_HashCode * sender,
238 const struct GNUNET_CONTAINER_MetaData *meta, const char *message, 238 const struct GNUNET_CONTAINER_MetaData *meta, const char *message,
239 struct GNUNET_TIME_Absolute timestamp, 239 struct GNUNET_TIME_Absolute timestamp,
240 enum GNUNET_CHAT_MsgOptions options) 240 enum GNUNET_CHAT_MsgOptions options)
@@ -250,7 +250,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
250 if ((0 == strcmp (message, want->msg)) && 250 if ((0 == strcmp (message, want->msg)) &&
251 (((sender == NULL) && (want->sender == NULL)) || 251 (((sender == NULL) && (want->sender == NULL)) ||
252 ((sender != NULL) && (want->sender != NULL) && 252 ((sender != NULL) && (want->sender != NULL) &&
253 (0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) && 253 (0 == memcmp (sender, want->sender, sizeof (struct GNUNET_HashCode))))) &&
254 (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) && 254 (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) &&
255 (options == want->opt) && 255 (options == want->opt) &&
256 /* Not == since the library sets the actual timestamp, so it may be 256 /* Not == since the library sets the actual timestamp, so it may be
@@ -275,7 +275,7 @@ static int
275confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room, 275confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
276 uint32_t orig_seq_number, 276 uint32_t orig_seq_number,
277 struct GNUNET_TIME_Absolute timestamp, 277 struct GNUNET_TIME_Absolute timestamp,
278 const GNUNET_HashCode * receiver) 278 const struct GNUNET_HashCode * receiver)
279{ 279{
280 struct Wanted *want = cls; 280 struct Wanted *want = cls;
281 281
@@ -285,7 +285,7 @@ confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
285 EXTRACTOR_METATYPE_TITLE), 285 EXTRACTOR_METATYPE_TITLE),
286 orig_seq_number); 286 orig_seq_number);
287#endif 287#endif
288 if ((0 == memcmp (receiver, want->sender, sizeof (GNUNET_HashCode))) && 288 if ((0 == memcmp (receiver, want->sender, sizeof (struct GNUNET_HashCode))) &&
289 (orig_seq_number == want->sequence_number) && 289 (orig_seq_number == want->sequence_number) &&
290 (timestamp.abs_value >= want->timestamp.abs_value)) 290 (timestamp.abs_value >= want->timestamp.abs_value))
291 { 291 {
diff --git a/src/chat/test_chat_private.c b/src/chat/test_chat_private.c
index 8b61392ca..0aebd8f8b 100644
--- a/src/chat/test_chat_private.c
+++ b/src/chat/test_chat_private.c
@@ -56,7 +56,7 @@ struct Wanted
56{ 56{
57 struct GNUNET_CONTAINER_MetaData *meta; 57 struct GNUNET_CONTAINER_MetaData *meta;
58 58
59 GNUNET_HashCode *sender; 59 struct GNUNET_HashCode *sender;
60 60
61 /** 61 /**
62 * Alternative meta/sender is used when we expect join/leave notification 62 * Alternative meta/sender is used when we expect join/leave notification
@@ -64,7 +64,7 @@ struct Wanted
64 */ 64 */
65 struct GNUNET_CONTAINER_MetaData *meta2; 65 struct GNUNET_CONTAINER_MetaData *meta2;
66 66
67 GNUNET_HashCode *sender2; 67 struct GNUNET_HashCode *sender2;
68 68
69 char *msg; 69 char *msg;
70 70
@@ -86,11 +86,11 @@ static struct PeerContext p2;
86 86
87static struct PeerContext p3; 87static struct PeerContext p3;
88 88
89static GNUNET_HashCode alice; 89static struct GNUNET_HashCode alice;
90 90
91static GNUNET_HashCode bob; 91static struct GNUNET_HashCode bob;
92 92
93static GNUNET_HashCode carol; 93static struct GNUNET_HashCode carol;
94 94
95static struct GNUNET_CHAT_Room *alice_room; 95static struct GNUNET_CHAT_Room *alice_room;
96 96
@@ -220,7 +220,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
220 enum GNUNET_CHAT_MsgOptions options) 220 enum GNUNET_CHAT_MsgOptions options)
221{ 221{
222 struct Wanted *want = cls; 222 struct Wanted *want = cls;
223 GNUNET_HashCode sender; 223 struct GNUNET_HashCode sender;
224 224
225#if VERBOSE 225#if VERBOSE
226 printf ("%s - told that %s has %s\n", want->me, 226 printf ("%s - told that %s has %s\n", want->me,
@@ -233,9 +233,9 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
233 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), 233 sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
234 &sender); 234 &sender);
235 /* entertain both primary and an alternative sender/meta */ 235 /* entertain both primary and an alternative sender/meta */
236 if (((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) || 236 if (((0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode))) ||
237 ((want->sender2 != NULL) && 237 ((want->sender2 != NULL) &&
238 (0 == memcmp (&sender, want->sender2, sizeof (GNUNET_HashCode))))) && 238 (0 == memcmp (&sender, want->sender2, sizeof (struct GNUNET_HashCode))))) &&
239 (((member_info == NULL) && (want->meta == NULL)) || 239 (((member_info == NULL) && (want->meta == NULL)) ||
240 ((member_info != NULL) && 240 ((member_info != NULL) &&
241 (((want->meta != NULL) && 241 (((want->meta != NULL) &&
@@ -246,7 +246,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
246 { 246 {
247 /* remember Bob's public key, we need it to send private message */ 247 /* remember Bob's public key, we need it to send private message */
248 if (NULL == bob_public_key && 248 if (NULL == bob_public_key &&
249 (0 == memcmp (&bob, want->sender, sizeof (GNUNET_HashCode)))) 249 (0 == memcmp (&bob, want->sender, sizeof (struct GNUNET_HashCode))))
250 bob_public_key = 250 bob_public_key =
251 GNUNET_memdup (member_id, 251 GNUNET_memdup (member_id,
252 sizeof (struct 252 sizeof (struct
@@ -254,7 +254,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
254 if (want->sender2 != NULL) 254 if (want->sender2 != NULL)
255 { 255 {
256 /* flush alternative sender */ 256 /* flush alternative sender */
257 if (0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) 257 if (0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode)))
258 { 258 {
259 want->sender = want->sender2; 259 want->sender = want->sender2;
260 want->meta = want->meta2; 260 want->meta = want->meta2;
@@ -277,7 +277,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
277 277
278static int 278static int
279receive_cb (void *cls, struct GNUNET_CHAT_Room *room, 279receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
280 const GNUNET_HashCode * sender, 280 const struct GNUNET_HashCode * sender,
281 const struct GNUNET_CONTAINER_MetaData *meta, const char *message, 281 const struct GNUNET_CONTAINER_MetaData *meta, const char *message,
282 struct GNUNET_TIME_Absolute timestamp, 282 struct GNUNET_TIME_Absolute timestamp,
283 enum GNUNET_CHAT_MsgOptions options) 283 enum GNUNET_CHAT_MsgOptions options)
@@ -294,7 +294,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
294 if ((want->msg != NULL) && (0 == strcmp (message, want->msg)) && 294 if ((want->msg != NULL) && (0 == strcmp (message, want->msg)) &&
295 (((sender == NULL) && (want->sender == NULL)) || 295 (((sender == NULL) && (want->sender == NULL)) ||
296 ((sender != NULL) && (want->sender != NULL) && 296 ((sender != NULL) && (want->sender != NULL) &&
297 (0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) && 297 (0 == memcmp (sender, want->sender, sizeof (struct GNUNET_HashCode))))) &&
298 (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) && 298 (GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) &&
299 (options == want->opt) && 299 (options == want->opt) &&
300 /* Not == since the library sets the actual timestamp, so it may be 300 /* Not == since the library sets the actual timestamp, so it may be
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 616528b5d..42077f3a3 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -357,7 +357,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
357 * @return GNUNET_YES (continue) 357 * @return GNUNET_YES (continue)
358 */ 358 */
359static int 359static int
360disconnect_and_free_peer_entry (void *cls, const GNUNET_HashCode * key, 360disconnect_and_free_peer_entry (void *cls, const struct GNUNET_HashCode * key,
361 void *value) 361 void *value)
362{ 362{
363 struct GNUNET_CORE_Handle *h = cls; 363 struct GNUNET_CORE_Handle *h = cls;
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index 72b5b8803..2f04ba57d 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -559,7 +559,7 @@ client_tokenizer_callback (void *cls, void *client,
559 * @return GNUNET_YES (continue iteration) 559 * @return GNUNET_YES (continue iteration)
560 */ 560 */
561static int 561static int
562destroy_active_client_request (void *cls, const GNUNET_HashCode * key, 562destroy_active_client_request (void *cls, const struct GNUNET_HashCode * key,
563 void *value) 563 void *value)
564{ 564{
565 struct GSC_ClientActiveRequest *car = value; 565 struct GSC_ClientActiveRequest *car = value;
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c
index 1fce2e528..31f5bb494 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -207,7 +207,7 @@ struct EncryptedMessage
207 * (excluding this value itself) will be encrypted and authenticated. 207 * (excluding this value itself) will be encrypted and authenticated.
208 * ENCRYPTED_HEADER_SIZE must be set to the offset of the *next* field. 208 * ENCRYPTED_HEADER_SIZE must be set to the offset of the *next* field.
209 */ 209 */
210 GNUNET_HashCode hmac; 210 struct GNUNET_HashCode hmac;
211 211
212 /** 212 /**
213 * Sequence number, in network byte order. This field 213 * Sequence number, in network byte order. This field
@@ -1513,7 +1513,7 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
1513{ 1513{
1514 const struct EncryptedMessage *m; 1514 const struct EncryptedMessage *m;
1515 struct EncryptedMessage *pt; /* plaintext */ 1515 struct EncryptedMessage *pt; /* plaintext */
1516 GNUNET_HashCode ph; 1516 struct GNUNET_HashCode ph;
1517 uint32_t snum; 1517 uint32_t snum;
1518 struct GNUNET_TIME_Absolute t; 1518 struct GNUNET_TIME_Absolute t;
1519 struct GNUNET_CRYPTO_AesInitializationVector iv; 1519 struct GNUNET_CRYPTO_AesInitializationVector iv;
@@ -1550,7 +1550,7 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
1550 kx->decrypt_key_created); 1550 kx->decrypt_key_created);
1551 GNUNET_CRYPTO_hmac (&auth_key, &m->sequence_number, 1551 GNUNET_CRYPTO_hmac (&auth_key, &m->sequence_number,
1552 size - ENCRYPTED_HEADER_SIZE, &ph); 1552 size - ENCRYPTED_HEADER_SIZE, &ph);
1553 if (0 != memcmp (&ph, &m->hmac, sizeof (GNUNET_HashCode))) 1553 if (0 != memcmp (&ph, &m->hmac, sizeof (struct GNUNET_HashCode)))
1554 { 1554 {
1555 /* checksum failed */ 1555 /* checksum failed */
1556 GNUNET_break_op (0); 1556 GNUNET_break_op (0);
diff --git a/src/core/gnunet-service-core_neighbours.c b/src/core/gnunet-service-core_neighbours.c
index 97737a63a..65b4ba41a 100644
--- a/src/core/gnunet-service-core_neighbours.c
+++ b/src/core/gnunet-service-core_neighbours.c
@@ -486,7 +486,7 @@ GSC_NEIGHBOURS_init ()
486 * @return GNUNET_OK (continue to iterate) 486 * @return GNUNET_OK (continue to iterate)
487 */ 487 */
488static int 488static int
489free_neighbour_helper (void *cls, const GNUNET_HashCode * key, void *value) 489free_neighbour_helper (void *cls, const struct GNUNET_HashCode * key, void *value)
490{ 490{
491 struct Neighbour *n = value; 491 struct Neighbour *n = value;
492 492
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c
index 054ad97f4..fa69134cb 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -283,7 +283,7 @@ GSC_SESSIONS_create (const struct GNUNET_PeerIdentity *peer,
283 * @return GNUNET_OK (continue to iterate) 283 * @return GNUNET_OK (continue to iterate)
284 */ 284 */
285static int 285static int
286notify_client_about_session (void *cls, const GNUNET_HashCode * key, 286notify_client_about_session (void *cls, const struct GNUNET_HashCode * key,
287 void *value) 287 void *value)
288{ 288{
289 struct GSC_Client *client = cls; 289 struct GSC_Client *client = cls;
@@ -549,7 +549,7 @@ try_transmission (struct Session *session)
549 * @return always GNUNET_OK 549 * @return always GNUNET_OK
550 */ 550 */
551static int 551static int
552do_send_message (void *cls, const GNUNET_HashCode * key, void *value) 552do_send_message (void *cls, const struct GNUNET_HashCode * key, void *value)
553{ 553{
554 const struct GNUNET_MessageHeader *hdr = cls; 554 const struct GNUNET_MessageHeader *hdr = cls;
555 struct Session *session = value; 555 struct Session *session = value;
@@ -642,7 +642,7 @@ GSC_SESSIONS_transmit (struct GSC_ClientActiveRequest *car,
642 */ 642 */
643#include "core.h" 643#include "core.h"
644static int 644static int
645queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value) 645queue_connect_message (void *cls, const struct GNUNET_HashCode * key, void *value)
646{ 646{
647 struct GNUNET_SERVER_TransmitContext *tc = cls; 647 struct GNUNET_SERVER_TransmitContext *tc = cls;
648 struct Session *session = value; 648 struct Session *session = value;
@@ -795,7 +795,7 @@ GSC_SESSIONS_init ()
795 * @return GNUNET_OK (continue to iterate) 795 * @return GNUNET_OK (continue to iterate)
796 */ 796 */
797static int 797static int
798free_session_helper (void *cls, const GNUNET_HashCode * key, void *value) 798free_session_helper (void *cls, const struct GNUNET_HashCode * key, void *value)
799{ 799{
800 struct Session *session = value; 800 struct Session *session = value;
801 801
diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c
index b440af1b2..9087ae0dd 100644
--- a/src/datacache/datacache.c
+++ b/src/datacache/datacache.c
@@ -103,7 +103,7 @@ struct GNUNET_DATACACHE_Handle
103 * @param size number of bytes that were made available 103 * @param size number of bytes that were made available
104 */ 104 */
105static void 105static void
106env_delete_notify (void *cls, const GNUNET_HashCode * key, size_t size) 106env_delete_notify (void *cls, const struct GNUNET_HashCode * key, size_t size)
107{ 107{
108 struct GNUNET_DATACACHE_Handle *h = cls; 108 struct GNUNET_DATACACHE_Handle *h = cls;
109 109
@@ -233,7 +233,7 @@ GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h)
233 */ 233 */
234int 234int
235GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, 235GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
236 const GNUNET_HashCode * key, size_t size, 236 const struct GNUNET_HashCode * key, size_t size,
237 const char *data, enum GNUNET_BLOCK_Type type, 237 const char *data, enum GNUNET_BLOCK_Type type,
238 struct GNUNET_TIME_Absolute discard_time) 238 struct GNUNET_TIME_Absolute discard_time)
239{ 239{
@@ -270,7 +270,7 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
270 */ 270 */
271unsigned int 271unsigned int
272GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h, 272GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
273 const GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type, 273 const struct GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
274 GNUNET_DATACACHE_Iterator iter, void *iter_cls) 274 GNUNET_DATACACHE_Iterator iter, void *iter_cls)
275{ 275{
276 GNUNET_STATISTICS_update (h->stats, gettext_noop ("# requests received"), 1, 276 GNUNET_STATISTICS_update (h->stats, gettext_noop ("# requests received"), 1,
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
index 94cd7a58e..fd3891116 100644
--- a/src/datacache/perf_datacache.c
+++ b/src/datacache/perf_datacache.c
@@ -45,10 +45,10 @@ static const char *plugin_name;
45 45
46static int 46static int
47checkIt (void *cls, struct GNUNET_TIME_Absolute exp, 47checkIt (void *cls, struct GNUNET_TIME_Absolute exp,
48 const GNUNET_HashCode * key, size_t size, const char *data, 48 const struct GNUNET_HashCode * key, size_t size, const char *data,
49 enum GNUNET_BLOCK_Type type) 49 enum GNUNET_BLOCK_Type type)
50{ 50{
51 if ((size == sizeof (GNUNET_HashCode)) && (0 == memcmp (data, cls, size))) 51 if ((size == sizeof (struct GNUNET_HashCode)) && (0 == memcmp (data, cls, size)))
52 found++; 52 found++;
53 return GNUNET_OK; 53 return GNUNET_OK;
54} 54}
@@ -59,8 +59,8 @@ run (void *cls, char *const *args, const char *cfgfile,
59 const struct GNUNET_CONFIGURATION_Handle *cfg) 59 const struct GNUNET_CONFIGURATION_Handle *cfg)
60{ 60{
61 struct GNUNET_DATACACHE_Handle *h; 61 struct GNUNET_DATACACHE_Handle *h;
62 GNUNET_HashCode k; 62 struct GNUNET_HashCode k;
63 GNUNET_HashCode n; 63 struct GNUNET_HashCode n;
64 struct GNUNET_TIME_Absolute exp; 64 struct GNUNET_TIME_Absolute exp;
65 struct GNUNET_TIME_Absolute start; 65 struct GNUNET_TIME_Absolute start;
66 unsigned int i; 66 unsigned int i;
@@ -76,14 +76,14 @@ run (void *cls, char *const *args, const char *cfgfile,
76 } 76 }
77 exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); 77 exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
78 start = GNUNET_TIME_absolute_get (); 78 start = GNUNET_TIME_absolute_get ();
79 memset (&k, 0, sizeof (GNUNET_HashCode)); 79 memset (&k, 0, sizeof (struct GNUNET_HashCode));
80 for (i = 0; i < ITERATIONS; i++) 80 for (i = 0; i < ITERATIONS; i++)
81 { 81 {
82 if (0 == i % (ITERATIONS / 80)) 82 if (0 == i % (ITERATIONS / 80))
83 FPRINTF (stderr, "%s", "."); 83 FPRINTF (stderr, "%s", ".");
84 GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); 84 GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
85 ASSERT (GNUNET_OK == 85 ASSERT (GNUNET_OK ==
86 GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode), 86 GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
87 (const char *) &n, 1 + i % 16, exp)); 87 (const char *) &n, 1 + i % 16, exp));
88 k = n; 88 k = n;
89 } 89 }
@@ -96,12 +96,12 @@ run (void *cls, char *const *args, const char *cfgfile,
96 GNUNET_TIME_absolute_get_duration (start).rel_value / ITERATIONS, 96 GNUNET_TIME_absolute_get_duration (start).rel_value / ITERATIONS,
97 "ms/item"); 97 "ms/item");
98 start = GNUNET_TIME_absolute_get (); 98 start = GNUNET_TIME_absolute_get ();
99 memset (&k, 0, sizeof (GNUNET_HashCode)); 99 memset (&k, 0, sizeof (struct GNUNET_HashCode));
100 for (i = 0; i < ITERATIONS; i++) 100 for (i = 0; i < ITERATIONS; i++)
101 { 101 {
102 if (0 == i % (ITERATIONS / 80)) 102 if (0 == i % (ITERATIONS / 80))
103 FPRINTF (stderr, "%s", "."); 103 FPRINTF (stderr, "%s", ".");
104 GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); 104 GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
105 GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n); 105 GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n);
106 k = n; 106 k = n;
107 } 107 }
diff --git a/src/datacache/plugin_datacache_mysql.c b/src/datacache/plugin_datacache_mysql.c
index 810342908..1457eddfb 100644
--- a/src/datacache/plugin_datacache_mysql.c
+++ b/src/datacache/plugin_datacache_mysql.c
@@ -87,7 +87,7 @@
87/** 87/**
88 * Estimate of the per-entry overhead (including indices). 88 * Estimate of the per-entry overhead (including indices).
89 */ 89 */
90#define OVERHEAD ((4*2+4*2+8*2+8*2+sizeof(GNUNET_HashCode)*5+8)) 90#define OVERHEAD ((4*2+4*2+8*2+8*2+sizeof(struct GNUNET_HashCode)*5+8))
91 91
92/** 92/**
93 * Die with an error message that indicates 93 * Die with an error message that indicates
@@ -190,7 +190,7 @@ itable (struct Plugin *plugin)
190 * @return 0 on error, number of bytes used otherwise 190 * @return 0 on error, number of bytes used otherwise
191 */ 191 */
192static size_t 192static size_t
193mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size, 193mysql_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
194 const char *data, enum GNUNET_BLOCK_Type type, 194 const char *data, enum GNUNET_BLOCK_Type type,
195 struct GNUNET_TIME_Absolute discard_time) 195 struct GNUNET_TIME_Absolute discard_time)
196{ 196{
@@ -202,7 +202,7 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
202 unsigned long long v_now; 202 unsigned long long v_now;
203 unsigned long long v_discard_time; 203 unsigned long long v_discard_time;
204 unsigned int v_type; 204 unsigned int v_type;
205 GNUNET_HashCode vhash; 205 struct GNUNET_HashCode vhash;
206 int ret; 206 int ret;
207 207
208 if (size > GNUNET_SERVER_MAX_MESSAGE_SIZE) 208 if (size > GNUNET_SERVER_MAX_MESSAGE_SIZE)
@@ -211,8 +211,8 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
211 now = GNUNET_TIME_absolute_get (); 211 now = GNUNET_TIME_absolute_get ();
212 212
213 /* first try UPDATE */ 213 /* first try UPDATE */
214 h_length = sizeof (GNUNET_HashCode); 214 h_length = sizeof (struct GNUNET_HashCode);
215 k_length = sizeof (GNUNET_HashCode); 215 k_length = sizeof (struct GNUNET_HashCode);
216 v_length = size; 216 v_length = size;
217 v_type = type; 217 v_type = type;
218 v_now = (unsigned long long) now.abs_value; 218 v_now = (unsigned long long) now.abs_value;
@@ -221,15 +221,15 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
221 GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->update_value, NULL, 221 GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->update_value, NULL,
222 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES, 222 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
223 MYSQL_TYPE_LONGLONG, &v_discard_time, GNUNET_YES, 223 MYSQL_TYPE_LONGLONG, &v_discard_time, GNUNET_YES,
224 MYSQL_TYPE_BLOB, key, sizeof (GNUNET_HashCode), 224 MYSQL_TYPE_BLOB, key, sizeof (struct GNUNET_HashCode),
225 &k_length, MYSQL_TYPE_BLOB, &vhash, 225 &k_length, MYSQL_TYPE_BLOB, &vhash,
226 sizeof (GNUNET_HashCode), &h_length, 226 sizeof (struct GNUNET_HashCode), &h_length,
227 MYSQL_TYPE_LONG, &v_type, GNUNET_YES, -1)) 227 MYSQL_TYPE_LONG, &v_type, GNUNET_YES, -1))
228 return GNUNET_OK; 228 return GNUNET_OK;
229 229
230 /* now try INSERT */ 230 /* now try INSERT */
231 h_length = sizeof (GNUNET_HashCode); 231 h_length = sizeof (struct GNUNET_HashCode);
232 k_length = sizeof (GNUNET_HashCode); 232 k_length = sizeof (struct GNUNET_HashCode);
233 v_length = size; 233 v_length = size;
234 if (GNUNET_OK != 234 if (GNUNET_OK !=
235 (ret = 235 (ret =
@@ -237,9 +237,9 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
237 MYSQL_TYPE_LONG, &type, GNUNET_YES, 237 MYSQL_TYPE_LONG, &type, GNUNET_YES,
238 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES, 238 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
239 MYSQL_TYPE_LONGLONG, &v_discard_time, GNUNET_YES, 239 MYSQL_TYPE_LONGLONG, &v_discard_time, GNUNET_YES,
240 MYSQL_TYPE_BLOB, key, sizeof (GNUNET_HashCode), 240 MYSQL_TYPE_BLOB, key, sizeof (struct GNUNET_HashCode),
241 &k_length, MYSQL_TYPE_BLOB, &vhash, 241 &k_length, MYSQL_TYPE_BLOB, &vhash,
242 sizeof (GNUNET_HashCode), &h_length, 242 sizeof (struct GNUNET_HashCode), &h_length,
243 MYSQL_TYPE_BLOB, data, (unsigned long) size, 243 MYSQL_TYPE_BLOB, data, (unsigned long) size,
244 &v_length, -1))) 244 &v_length, -1)))
245 { 245 {
@@ -270,7 +270,7 @@ return_ok (void *cls, unsigned int num_values, MYSQL_BIND * values)
270 * @return the number of results found 270 * @return the number of results found
271 */ 271 */
272static unsigned int 272static unsigned int
273mysql_plugin_get (void *cls, const GNUNET_HashCode * key, 273mysql_plugin_get (void *cls, const struct GNUNET_HashCode * key,
274 enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter, 274 enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter,
275 void *iter_cls) 275 void *iter_cls)
276{ 276{
@@ -290,7 +290,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key,
290 char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE]; 290 char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE];
291 291
292 now = GNUNET_TIME_absolute_get (); 292 now = GNUNET_TIME_absolute_get ();
293 h_length = sizeof (GNUNET_HashCode); 293 h_length = sizeof (struct GNUNET_HashCode);
294 v_length = sizeof (buffer); 294 v_length = sizeof (buffer);
295 total = -1; 295 total = -1;
296 memset (rbind, 0, sizeof (rbind)); 296 memset (rbind, 0, sizeof (rbind));
@@ -303,7 +303,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key,
303 (ret = 303 (ret =
304 GNUNET_MYSQL_statement_run_prepared_select (plugin->mc, plugin->count_value, 1, rbind, 304 GNUNET_MYSQL_statement_run_prepared_select (plugin->mc, plugin->count_value, 1, rbind,
305 return_ok, NULL, MYSQL_TYPE_BLOB, key, 305 return_ok, NULL, MYSQL_TYPE_BLOB, key,
306 sizeof (GNUNET_HashCode), &h_length, 306 sizeof (struct GNUNET_HashCode), &h_length,
307 MYSQL_TYPE_LONG, &v_type, GNUNET_YES, 307 MYSQL_TYPE_LONG, &v_type, GNUNET_YES,
308 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES, 308 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
309 -1))) || (-1 == total)) 309 -1))) || (-1 == total))
@@ -332,7 +332,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key,
332 (ret = 332 (ret =
333 GNUNET_MYSQL_statement_run_prepared_select (plugin->mc, plugin->select_value, 2, rbind, 333 GNUNET_MYSQL_statement_run_prepared_select (plugin->mc, plugin->select_value, 2, rbind,
334 return_ok, NULL, MYSQL_TYPE_BLOB, key, 334 return_ok, NULL, MYSQL_TYPE_BLOB, key,
335 sizeof (GNUNET_HashCode), &h_length, 335 sizeof (struct GNUNET_HashCode), &h_length,
336 MYSQL_TYPE_LONG, &v_type, GNUNET_YES, 336 MYSQL_TYPE_LONG, &v_type, GNUNET_YES,
337 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES, 337 MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
338 MYSQL_TYPE_LONG, &off, GNUNET_YES, -1))) 338 MYSQL_TYPE_LONG, &off, GNUNET_YES, -1)))
@@ -364,24 +364,24 @@ mysql_plugin_del (void *cls)
364 364
365 MYSQL_BIND rbind[5]; 365 MYSQL_BIND rbind[5];
366 unsigned int v_type; 366 unsigned int v_type;
367 GNUNET_HashCode v_key; 367 struct GNUNET_HashCode v_key;
368 GNUNET_HashCode vhash; 368 struct GNUNET_HashCode vhash;
369 unsigned long k_length; 369 unsigned long k_length;
370 unsigned long h_length; 370 unsigned long h_length;
371 unsigned long v_length; 371 unsigned long v_length;
372 int ret; 372 int ret;
373 char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE]; 373 char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE];
374 374
375 k_length = sizeof (GNUNET_HashCode); 375 k_length = sizeof (struct GNUNET_HashCode);
376 h_length = sizeof (GNUNET_HashCode); 376 h_length = sizeof (struct GNUNET_HashCode);
377 v_length = sizeof (buffer); 377 v_length = sizeof (buffer);
378 memset (rbind, 0, sizeof (rbind)); 378 memset (rbind, 0, sizeof (rbind));
379 rbind[0].buffer_type = MYSQL_TYPE_BLOB; 379 rbind[0].buffer_type = MYSQL_TYPE_BLOB;
380 rbind[0].buffer_length = sizeof (GNUNET_HashCode); 380 rbind[0].buffer_length = sizeof (struct GNUNET_HashCode);
381 rbind[0].length = &k_length; 381 rbind[0].length = &k_length;
382 rbind[0].buffer = &v_key; 382 rbind[0].buffer = &v_key;
383 rbind[1].buffer_type = MYSQL_TYPE_BLOB; 383 rbind[1].buffer_type = MYSQL_TYPE_BLOB;
384 rbind[1].buffer_length = sizeof (GNUNET_HashCode); 384 rbind[1].buffer_length = sizeof (struct GNUNET_HashCode);
385 rbind[1].length = &h_length; 385 rbind[1].length = &h_length;
386 rbind[1].buffer = &vhash; 386 rbind[1].buffer = &vhash;
387 rbind[2].buffer_type = MYSQL_TYPE_LONG; 387 rbind[2].buffer_type = MYSQL_TYPE_LONG;
@@ -399,9 +399,9 @@ mysql_plugin_del (void *cls)
399 (ret = 399 (ret =
400 GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->delete_value, NULL, 400 GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->delete_value, NULL,
401 MYSQL_TYPE_BLOB, &v_key, 401 MYSQL_TYPE_BLOB, &v_key,
402 sizeof (GNUNET_HashCode), &k_length, 402 sizeof (struct GNUNET_HashCode), &k_length,
403 MYSQL_TYPE_BLOB, &vhash, 403 MYSQL_TYPE_BLOB, &vhash,
404 sizeof (GNUNET_HashCode), &h_length, 404 sizeof (struct GNUNET_HashCode), &h_length,
405 MYSQL_TYPE_LONG, &v_type, GNUNET_YES, 405 MYSQL_TYPE_LONG, &v_type, GNUNET_YES,
406 MYSQL_TYPE_BLOB, buffer, 406 MYSQL_TYPE_BLOB, buffer,
407 (unsigned long) sizeof (buffer), &v_length, 407 (unsigned long) sizeof (buffer), &v_length,
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index b40f1fd04..e9157742c 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -34,7 +34,7 @@
34/** 34/**
35 * Per-entry overhead estimate 35 * Per-entry overhead estimate
36 */ 36 */
37#define OVERHEAD (sizeof(GNUNET_HashCode) + 24) 37#define OVERHEAD (sizeof(struct GNUNET_HashCode) + 24)
38 38
39/** 39/**
40 * Context for all functions in this plugin. 40 * Context for all functions in this plugin.
@@ -160,7 +160,7 @@ init_connection (struct Plugin *plugin)
160 * @return 0 on error, number of bytes used otherwise 160 * @return 0 on error, number of bytes used otherwise
161 */ 161 */
162static size_t 162static size_t
163postgres_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size, 163postgres_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
164 const char *data, enum GNUNET_BLOCK_Type type, 164 const char *data, enum GNUNET_BLOCK_Type type,
165 struct GNUNET_TIME_Absolute discard_time) 165 struct GNUNET_TIME_Absolute discard_time)
166{ 166{
@@ -178,7 +178,7 @@ postgres_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
178 int paramLengths[] = { 178 int paramLengths[] = {
179 sizeof (btype), 179 sizeof (btype),
180 sizeof (bexpi), 180 sizeof (bexpi),
181 sizeof (GNUNET_HashCode), 181 sizeof (struct GNUNET_HashCode),
182 size 182 size
183 }; 183 };
184 const int paramFormats[] = { 1, 1, 1, 1 }; 184 const int paramFormats[] = { 1, 1, 1, 1 };
@@ -206,7 +206,7 @@ postgres_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
206 * @return the number of results found 206 * @return the number of results found
207 */ 207 */
208static unsigned int 208static unsigned int
209postgres_plugin_get (void *cls, const GNUNET_HashCode * key, 209postgres_plugin_get (void *cls, const struct GNUNET_HashCode * key,
210 enum GNUNET_BLOCK_Type type, 210 enum GNUNET_BLOCK_Type type,
211 GNUNET_DATACACHE_Iterator iter, void *iter_cls) 211 GNUNET_DATACACHE_Iterator iter, void *iter_cls)
212{ 212{
@@ -218,7 +218,7 @@ postgres_plugin_get (void *cls, const GNUNET_HashCode * key,
218 (const char *) &btype, 218 (const char *) &btype,
219 }; 219 };
220 int paramLengths[] = { 220 int paramLengths[] = {
221 sizeof (GNUNET_HashCode), 221 sizeof (struct GNUNET_HashCode),
222 sizeof (btype), 222 sizeof (btype),
223 }; 223 };
224 const int paramFormats[] = { 1, 1 }; 224 const int paramFormats[] = { 1, 1 };
@@ -298,7 +298,7 @@ postgres_plugin_del (void *cls)
298 struct Plugin *plugin = cls; 298 struct Plugin *plugin = cls;
299 uint32_t size; 299 uint32_t size;
300 uint32_t oid; 300 uint32_t oid;
301 GNUNET_HashCode key; 301 struct GNUNET_HashCode key;
302 PGresult *res; 302 PGresult *res;
303 303
304 res = PQexecPrepared (plugin->dbh, "getm", 0, NULL, NULL, NULL, 1); 304 res = PQexecPrepared (plugin->dbh, "getm", 0, NULL, NULL, NULL, 1);
@@ -319,7 +319,7 @@ postgres_plugin_del (void *cls)
319 } 319 }
320 if ((3 != PQnfields (res)) || (sizeof (size) != PQfsize (res, 0)) || 320 if ((3 != PQnfields (res)) || (sizeof (size) != PQfsize (res, 0)) ||
321 (sizeof (oid) != PQfsize (res, 1)) || 321 (sizeof (oid) != PQfsize (res, 1)) ||
322 (sizeof (GNUNET_HashCode) != PQgetlength (res, 0, 2))) 322 (sizeof (struct GNUNET_HashCode) != PQgetlength (res, 0, 2)))
323 { 323 {
324 GNUNET_break (0); 324 GNUNET_break (0);
325 PQclear (res); 325 PQclear (res);
@@ -327,7 +327,7 @@ postgres_plugin_del (void *cls)
327 } 327 }
328 size = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0)); 328 size = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0));
329 oid = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1)); 329 oid = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1));
330 memcpy (&key, PQgetvalue (res, 0, 2), sizeof (GNUNET_HashCode)); 330 memcpy (&key, PQgetvalue (res, 0, 2), sizeof (struct GNUNET_HashCode));
331 PQclear (res); 331 PQclear (res);
332 if (GNUNET_OK != GNUNET_POSTGRES_delete_by_rowid (plugin->dbh, "delrow", oid)) 332 if (GNUNET_OK != GNUNET_POSTGRES_delete_by_rowid (plugin->dbh, "delrow", oid))
333 return GNUNET_SYSERR; 333 return GNUNET_SYSERR;
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c
index db27de3e2..26792e1fb 100644
--- a/src/datacache/plugin_datacache_sqlite.c
+++ b/src/datacache/plugin_datacache_sqlite.c
@@ -37,7 +37,7 @@
37 * How much overhead do we assume per entry in the 37 * How much overhead do we assume per entry in the
38 * datacache? 38 * datacache?
39 */ 39 */
40#define OVERHEAD (sizeof(GNUNET_HashCode) + 32) 40#define OVERHEAD (sizeof(struct GNUNET_HashCode) + 32)
41 41
42/** 42/**
43 * Context for all functions in this plugin. 43 * Context for all functions in this plugin.
@@ -98,7 +98,7 @@ sq_prepare (sqlite3 * dbh, const char *zSql, /* SQL statement, UTF-8 encoded
98 * @return 0 on error, number of bytes used otherwise 98 * @return 0 on error, number of bytes used otherwise
99 */ 99 */
100static size_t 100static size_t
101sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size, 101sqlite_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
102 const char *data, enum GNUNET_BLOCK_Type type, 102 const char *data, enum GNUNET_BLOCK_Type type,
103 struct GNUNET_TIME_Absolute discard_time) 103 struct GNUNET_TIME_Absolute discard_time)
104{ 104{
@@ -126,7 +126,7 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
126 if ((SQLITE_OK != sqlite3_bind_int (stmt, 1, type)) || 126 if ((SQLITE_OK != sqlite3_bind_int (stmt, 1, type)) ||
127 (SQLITE_OK != sqlite3_bind_int64 (stmt, 2, dval)) || 127 (SQLITE_OK != sqlite3_bind_int64 (stmt, 2, dval)) ||
128 (SQLITE_OK != 128 (SQLITE_OK !=
129 sqlite3_bind_blob (stmt, 3, key, sizeof (GNUNET_HashCode), 129 sqlite3_bind_blob (stmt, 3, key, sizeof (struct GNUNET_HashCode),
130 SQLITE_TRANSIENT)) || 130 SQLITE_TRANSIENT)) ||
131 (SQLITE_OK != sqlite3_bind_blob (stmt, 4, data, size, SQLITE_TRANSIENT))) 131 (SQLITE_OK != sqlite3_bind_blob (stmt, 4, data, size, SQLITE_TRANSIENT)))
132 { 132 {
@@ -161,7 +161,7 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
161 * @return the number of results found 161 * @return the number of results found
162 */ 162 */
163static unsigned int 163static unsigned int
164sqlite_plugin_get (void *cls, const GNUNET_HashCode * key, 164sqlite_plugin_get (void *cls, const struct GNUNET_HashCode * key,
165 enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter, 165 enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter,
166 void *iter_cls) 166 void *iter_cls)
167{ 167{
@@ -192,7 +192,7 @@ sqlite_plugin_get (void *cls, const GNUNET_HashCode * key,
192 ntime = (int64_t) now.abs_value; 192 ntime = (int64_t) now.abs_value;
193 GNUNET_assert (ntime >= 0); 193 GNUNET_assert (ntime >= 0);
194 if ((SQLITE_OK != 194 if ((SQLITE_OK !=
195 sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode), 195 sqlite3_bind_blob (stmt, 1, key, sizeof (struct GNUNET_HashCode),
196 SQLITE_TRANSIENT)) || 196 SQLITE_TRANSIENT)) ||
197 (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) || 197 (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
198 (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value))) 198 (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value)))
@@ -239,7 +239,7 @@ sqlite_plugin_get (void *cls, const GNUNET_HashCode * key,
239 return cnt; 239 return cnt;
240 } 240 }
241 if ((SQLITE_OK != 241 if ((SQLITE_OK !=
242 sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode), 242 sqlite3_bind_blob (stmt, 1, key, sizeof (struct GNUNET_HashCode),
243 SQLITE_TRANSIENT)) || 243 SQLITE_TRANSIENT)) ||
244 (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) || 244 (SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
245 (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value))) 245 (SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value)))
@@ -287,7 +287,7 @@ sqlite_plugin_del (void *cls)
287 unsigned int dsize; 287 unsigned int dsize;
288 sqlite3_stmt *stmt; 288 sqlite3_stmt *stmt;
289 sqlite3_stmt *dstmt; 289 sqlite3_stmt *dstmt;
290 GNUNET_HashCode hc; 290 struct GNUNET_HashCode hc;
291 291
292 LOG (GNUNET_ERROR_TYPE_DEBUG, "Processing `%s'\n", "DEL"); 292 LOG (GNUNET_ERROR_TYPE_DEBUG, "Processing `%s'\n", "DEL");
293 stmt = NULL; 293 stmt = NULL;
@@ -311,8 +311,8 @@ sqlite_plugin_del (void *cls)
311 return GNUNET_SYSERR; 311 return GNUNET_SYSERR;
312 } 312 }
313 rowid = sqlite3_column_int64 (stmt, 0); 313 rowid = sqlite3_column_int64 (stmt, 0);
314 GNUNET_assert (sqlite3_column_bytes (stmt, 1) == sizeof (GNUNET_HashCode)); 314 GNUNET_assert (sqlite3_column_bytes (stmt, 1) == sizeof (struct GNUNET_HashCode));
315 memcpy (&hc, sqlite3_column_blob (stmt, 1), sizeof (GNUNET_HashCode)); 315 memcpy (&hc, sqlite3_column_blob (stmt, 1), sizeof (struct GNUNET_HashCode));
316 dsize = sqlite3_column_bytes (stmt, 2); 316 dsize = sqlite3_column_bytes (stmt, 2);
317 if (SQLITE_OK != sqlite3_finalize (stmt)) 317 if (SQLITE_OK != sqlite3_finalize (stmt))
318 LOG_SQLITE (plugin->dbh, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, 318 LOG_SQLITE (plugin->dbh, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
diff --git a/src/datacache/plugin_datacache_template.c b/src/datacache/plugin_datacache_template.c
index 2d3f160e4..6c4395982 100644
--- a/src/datacache/plugin_datacache_template.c
+++ b/src/datacache/plugin_datacache_template.c
@@ -52,7 +52,7 @@ struct Plugin
52 * @return 0 on error, number of bytes used otherwise 52 * @return 0 on error, number of bytes used otherwise
53 */ 53 */
54static size_t 54static size_t
55template_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size, 55template_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
56 const char *data, enum GNUNET_BLOCK_Type type, 56 const char *data, enum GNUNET_BLOCK_Type type,
57 struct GNUNET_TIME_Absolute discard_time) 57 struct GNUNET_TIME_Absolute discard_time)
58{ 58{
@@ -73,7 +73,7 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
73 * @return the number of results found 73 * @return the number of results found
74 */ 74 */
75static unsigned int 75static unsigned int
76template_plugin_get (void *cls, const GNUNET_HashCode * key, 76template_plugin_get (void *cls, const struct GNUNET_HashCode * key,
77 enum GNUNET_BLOCK_Type type, 77 enum GNUNET_BLOCK_Type type,
78 GNUNET_DATACACHE_Iterator iter, void *iter_cls) 78 GNUNET_DATACACHE_Iterator iter, void *iter_cls)
79{ 79{
diff --git a/src/datacache/test_datacache.c b/src/datacache/test_datacache.c
index c818daaa8..1d8cd3295 100644
--- a/src/datacache/test_datacache.c
+++ b/src/datacache/test_datacache.c
@@ -39,10 +39,10 @@ static const char *plugin_name;
39 39
40static int 40static int
41checkIt (void *cls, struct GNUNET_TIME_Absolute exp, 41checkIt (void *cls, struct GNUNET_TIME_Absolute exp,
42 const GNUNET_HashCode * key, size_t size, const char *data, 42 const struct GNUNET_HashCode * key, size_t size, const char *data,
43 enum GNUNET_BLOCK_Type type) 43 enum GNUNET_BLOCK_Type type)
44{ 44{
45 if (size != sizeof (GNUNET_HashCode)) 45 if (size != sizeof (struct GNUNET_HashCode))
46 { 46 {
47 GNUNET_break (0); 47 GNUNET_break (0);
48 ok = 2; 48 ok = 2;
@@ -61,8 +61,8 @@ run (void *cls, char *const *args, const char *cfgfile,
61 const struct GNUNET_CONFIGURATION_Handle *cfg) 61 const struct GNUNET_CONFIGURATION_Handle *cfg)
62{ 62{
63 struct GNUNET_DATACACHE_Handle *h; 63 struct GNUNET_DATACACHE_Handle *h;
64 GNUNET_HashCode k; 64 struct GNUNET_HashCode k;
65 GNUNET_HashCode n; 65 struct GNUNET_HashCode n;
66 struct GNUNET_TIME_Absolute exp; 66 struct GNUNET_TIME_Absolute exp;
67 unsigned int i; 67 unsigned int i;
68 68
@@ -77,27 +77,27 @@ run (void *cls, char *const *args, const char *cfgfile,
77 } 77 }
78 exp = GNUNET_TIME_absolute_get (); 78 exp = GNUNET_TIME_absolute_get ();
79 exp.abs_value += 5 * 60 * 1000; 79 exp.abs_value += 5 * 60 * 1000;
80 memset (&k, 0, sizeof (GNUNET_HashCode)); 80 memset (&k, 0, sizeof (struct GNUNET_HashCode));
81 for (i = 0; i < 100; i++) 81 for (i = 0; i < 100; i++)
82 { 82 {
83 GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); 83 GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
84 ASSERT (GNUNET_OK == 84 ASSERT (GNUNET_OK ==
85 GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode), 85 GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
86 (const char *) &n, 1 + i % 16, exp)); 86 (const char *) &n, 1 + i % 16, exp));
87 k = n; 87 k = n;
88 } 88 }
89 memset (&k, 0, sizeof (GNUNET_HashCode)); 89 memset (&k, 0, sizeof (struct GNUNET_HashCode));
90 for (i = 0; i < 100; i++) 90 for (i = 0; i < 100; i++)
91 { 91 {
92 GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); 92 GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
93 ASSERT (1 == GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n)); 93 ASSERT (1 == GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n));
94 k = n; 94 k = n;
95 } 95 }
96 96
97 memset (&k, 42, sizeof (GNUNET_HashCode)); 97 memset (&k, 42, sizeof (struct GNUNET_HashCode));
98 GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); 98 GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
99 ASSERT (GNUNET_OK == 99 ASSERT (GNUNET_OK ==
100 GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode), 100 GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
101 (const char *) &n, 792, 101 (const char *) &n, 792,
102 GNUNET_TIME_UNIT_FOREVER_ABS)); 102 GNUNET_TIME_UNIT_FOREVER_ABS));
103 ASSERT (0 != GNUNET_DATACACHE_get (h, &k, 792, &checkIt, &n)); 103 ASSERT (0 != GNUNET_DATACACHE_get (h, &k, 792, &checkIt, &n));
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c
index 5325b398f..1f252c14a 100644
--- a/src/datacache/test_datacache_quota.c
+++ b/src/datacache/test_datacache_quota.c
@@ -47,8 +47,8 @@ run (void *cls, char *const *args, const char *cfgfile,
47 const struct GNUNET_CONFIGURATION_Handle *cfg) 47 const struct GNUNET_CONFIGURATION_Handle *cfg)
48{ 48{
49 struct GNUNET_DATACACHE_Handle *h; 49 struct GNUNET_DATACACHE_Handle *h;
50 GNUNET_HashCode k; 50 struct GNUNET_HashCode k;
51 GNUNET_HashCode n; 51 struct GNUNET_HashCode n;
52 unsigned int i; 52 unsigned int i;
53 unsigned int j; 53 unsigned int j;
54 char buf[3200]; 54 char buf[3200];
@@ -64,11 +64,11 @@ run (void *cls, char *const *args, const char *cfgfile,
64 } 64 }
65 exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); 65 exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
66 memset (buf, 1, sizeof (buf)); 66 memset (buf, 1, sizeof (buf));
67 memset (&k, 0, sizeof (GNUNET_HashCode)); 67 memset (&k, 0, sizeof (struct GNUNET_HashCode));
68 for (i = 0; i < 10; i++) 68 for (i = 0; i < 10; i++)
69 { 69 {
70 FPRINTF (stderr, "%s", "."); 70 FPRINTF (stderr, "%s", ".");
71 GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); 71 GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
72 for (j = i; j < sizeof (buf); j += 10) 72 for (j = i; j < sizeof (buf); j += 10)
73 { 73 {
74 exp.abs_value++; 74 exp.abs_value++;
@@ -79,11 +79,11 @@ run (void *cls, char *const *args, const char *cfgfile,
79 k = n; 79 k = n;
80 } 80 }
81 FPRINTF (stderr, "%s", "\n"); 81 FPRINTF (stderr, "%s", "\n");
82 memset (&k, 0, sizeof (GNUNET_HashCode)); 82 memset (&k, 0, sizeof (struct GNUNET_HashCode));
83 for (i = 0; i < 10; i++) 83 for (i = 0; i < 10; i++)
84 { 84 {
85 FPRINTF (stderr, "%s", "."); 85 FPRINTF (stderr, "%s", ".");
86 GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); 86 GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
87 if (i < 2) 87 if (i < 2)
88 ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); 88 ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));
89 if (i == 9) 89 if (i == 9)
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h
index 87ceb0134..4f431856b 100644
--- a/src/datastore/datastore.h
+++ b/src/datastore/datastore.h
@@ -111,7 +111,7 @@ struct GetMessage
111 /** 111 /**
112 * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size 112 * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size
113 * can either be "sizeof(struct GetMessage)" or 113 * can either be "sizeof(struct GetMessage)" or
114 * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"! 114 * "sizeof(struct GetMessage) - sizeof(struct GNUNET_HashCode)"!
115 */ 115 */
116 struct GNUNET_MessageHeader header; 116 struct GNUNET_MessageHeader header;
117 117
@@ -129,7 +129,7 @@ struct GetMessage
129 * Desired key (optional). Check the "size" of the 129 * Desired key (optional). Check the "size" of the
130 * header to see if the key is actually present. 130 * header to see if the key is actually present.
131 */ 131 */
132 GNUNET_HashCode key; 132 struct GNUNET_HashCode key;
133 133
134}; 134};
135 135
@@ -252,7 +252,7 @@ struct DataMessage
252 /** 252 /**
253 * Key under which the item can be found. 253 * Key under which the item can be found.
254 */ 254 */
255 GNUNET_HashCode key; 255 struct GNUNET_HashCode key;
256 256
257}; 257};
258GNUNET_NETWORK_STRUCT_END 258GNUNET_NETWORK_STRUCT_END
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 57663e99e..3bf8ecd94 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -836,7 +836,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg)
836 */ 836 */
837struct GNUNET_DATASTORE_QueueEntry * 837struct GNUNET_DATASTORE_QueueEntry *
838GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid, 838GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
839 const GNUNET_HashCode * key, size_t size, 839 const struct GNUNET_HashCode * key, size_t size,
840 const void *data, enum GNUNET_BLOCK_Type type, 840 const void *data, enum GNUNET_BLOCK_Type type,
841 uint32_t priority, uint32_t anonymity, 841 uint32_t priority, uint32_t anonymity,
842 uint32_t replication, 842 uint32_t replication,
@@ -1087,7 +1087,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
1087 */ 1087 */
1088struct GNUNET_DATASTORE_QueueEntry * 1088struct GNUNET_DATASTORE_QueueEntry *
1089GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h, 1089GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
1090 const GNUNET_HashCode * key, size_t size, 1090 const struct GNUNET_HashCode * key, size_t size,
1091 const void *data, unsigned int queue_priority, 1091 const void *data, unsigned int queue_priority,
1092 unsigned int max_queue_size, 1092 unsigned int max_queue_size,
1093 struct GNUNET_TIME_Relative timeout, 1093 struct GNUNET_TIME_Relative timeout,
@@ -1381,7 +1381,7 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
1381 */ 1381 */
1382struct GNUNET_DATASTORE_QueueEntry * 1382struct GNUNET_DATASTORE_QueueEntry *
1383GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset, 1383GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
1384 const GNUNET_HashCode * key, 1384 const struct GNUNET_HashCode * key,
1385 enum GNUNET_BLOCK_Type type, 1385 enum GNUNET_BLOCK_Type type,
1386 unsigned int queue_priority, 1386 unsigned int queue_priority,
1387 unsigned int max_queue_size, 1387 unsigned int max_queue_size,
@@ -1420,7 +1420,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
1420 else 1420 else
1421 { 1421 {
1422 gm->header.size = 1422 gm->header.size =
1423 htons (sizeof (struct GetMessage) - sizeof (GNUNET_HashCode)); 1423 htons (sizeof (struct GetMessage) - sizeof (struct GNUNET_HashCode));
1424 } 1424 }
1425 process_queue (h); 1425 process_queue (h);
1426 return qe; 1426 return qe;
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 49b9db859..6fb1ebf1b 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -316,7 +316,7 @@ delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
316 * GNUNET_NO to delete the item and continue (if supported) 316 * GNUNET_NO to delete the item and continue (if supported)
317 */ 317 */
318static int 318static int
319expired_processor (void *cls, const GNUNET_HashCode * key, uint32_t size, 319expired_processor (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
320 const void *data, enum GNUNET_BLOCK_Type type, 320 const void *data, enum GNUNET_BLOCK_Type type,
321 uint32_t priority, uint32_t anonymity, 321 uint32_t priority, uint32_t anonymity,
322 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 322 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -394,7 +394,7 @@ delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
394 * GNUNET_NO to delete the item and continue (if supported) 394 * GNUNET_NO to delete the item and continue (if supported)
395 */ 395 */
396static int 396static int
397quota_processor (void *cls, const GNUNET_HashCode * key, uint32_t size, 397quota_processor (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
398 const void *data, enum GNUNET_BLOCK_Type type, 398 const void *data, enum GNUNET_BLOCK_Type type,
399 uint32_t priority, uint32_t anonymity, 399 uint32_t priority, uint32_t anonymity,
400 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 400 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -581,7 +581,7 @@ transmit_status (struct GNUNET_SERVER_Client *client, int code, const char *msg)
581 * GNUNET_NO to delete the item and continue (if supported) 581 * GNUNET_NO to delete the item and continue (if supported)
582 */ 582 */
583static int 583static int
584transmit_item (void *cls, const GNUNET_HashCode * key, uint32_t size, 584transmit_item (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
585 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 585 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
586 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 586 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
587 uint64_t uid) 587 uint64_t uid)
@@ -871,7 +871,7 @@ execute_put (struct GNUNET_SERVER_Client *client, const struct DataMessage *dm)
871 * GNUNET_NO to delete the item 871 * GNUNET_NO to delete the item
872 */ 872 */
873static int 873static int
874check_present (void *cls, const GNUNET_HashCode * key, uint32_t size, 874check_present (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
875 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 875 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
876 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 876 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
877 uint64_t uid) 877 uint64_t uid)
@@ -930,7 +930,7 @@ handle_put (void *cls, struct GNUNET_SERVER_Client *client,
930 int rid; 930 int rid;
931 struct ReservationList *pos; 931 struct ReservationList *pos;
932 struct PutContext *pc; 932 struct PutContext *pc;
933 GNUNET_HashCode vhash; 933 struct GNUNET_HashCode vhash;
934 uint32_t size; 934 uint32_t size;
935 935
936 if ((dm == NULL) || (ntohl (dm->type) == 0)) 936 if ((dm == NULL) || (ntohl (dm->type) == 0))
@@ -993,7 +993,7 @@ handle_get (void *cls, struct GNUNET_SERVER_Client *client,
993 993
994 size = ntohs (message->size); 994 size = ntohs (message->size);
995 if ((size != sizeof (struct GetMessage)) && 995 if ((size != sizeof (struct GetMessage)) &&
996 (size != sizeof (struct GetMessage) - sizeof (GNUNET_HashCode))) 996 (size != sizeof (struct GetMessage) - sizeof (struct GNUNET_HashCode)))
997 { 997 {
998 GNUNET_break (0); 998 GNUNET_break (0);
999 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 999 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
@@ -1120,7 +1120,7 @@ handle_get_zero_anonymity (void *cls, struct GNUNET_SERVER_Client *client,
1120 * in to be deleted (by returning GNUNET_NO). 1120 * in to be deleted (by returning GNUNET_NO).
1121 */ 1121 */
1122static int 1122static int
1123remove_callback (void *cls, const GNUNET_HashCode * key, uint32_t size, 1123remove_callback (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
1124 const void *data, enum GNUNET_BLOCK_Type type, 1124 const void *data, enum GNUNET_BLOCK_Type type,
1125 uint32_t priority, uint32_t anonymity, 1125 uint32_t priority, uint32_t anonymity,
1126 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 1126 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -1160,7 +1160,7 @@ handle_remove (void *cls, struct GNUNET_SERVER_Client *client,
1160 const struct GNUNET_MessageHeader *message) 1160 const struct GNUNET_MessageHeader *message)
1161{ 1161{
1162 const struct DataMessage *dm = check_data (message); 1162 const struct DataMessage *dm = check_data (message);
1163 GNUNET_HashCode vhash; 1163 struct GNUNET_HashCode vhash;
1164 1164
1165 if (dm == NULL) 1165 if (dm == NULL)
1166 { 1166 {
@@ -1428,7 +1428,7 @@ cleanup_reservations (void *cls, struct GNUNET_SERVER_Client *client)
1428 */ 1428 */
1429static void 1429static void
1430add_key_to_bloomfilter (void *cls, 1430add_key_to_bloomfilter (void *cls,
1431 const GNUNET_HashCode *key, 1431 const struct GNUNET_HashCode *key,
1432 unsigned int count) 1432 unsigned int count)
1433{ 1433{
1434 struct GNUNET_CONTAINER_BloomFilter *bf = cls; 1434 struct GNUNET_CONTAINER_BloomFilter *bf = cls;
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index 09064ceb0..6b7a73640 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -171,7 +171,7 @@ remove_next (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration,
171 171
172 172
173static void 173static void
174delete_value (void *cls, const GNUNET_HashCode * key, size_t size, 174delete_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
177 uint64_t uid) 177 uint64_t uid)
@@ -196,7 +196,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
196{ 196{
197 struct CpsRunContext *crc = cls; 197 struct CpsRunContext *crc = cls;
198 size_t size; 198 size_t size;
199 static GNUNET_HashCode key; 199 static struct GNUNET_HashCode key;
200 static char data[65536]; 200 static char data[65536];
201 int i; 201 int i;
202 int k; 202 int k;
@@ -206,7 +206,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
206 switch (crc->phase) 206 switch (crc->phase)
207 { 207 {
208 case RP_PUT: 208 case RP_PUT:
209 memset (&key, 256 - crc->i, sizeof (GNUNET_HashCode)); 209 memset (&key, 256 - crc->i, sizeof (struct GNUNET_HashCode));
210 i = crc->j; 210 i = crc->j;
211 k = crc->i; 211 k = crc->i;
212 /* most content is 32k */ 212 /* most content is 32k */
@@ -214,7 +214,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
214 if (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) == 0) /* but some of it is less! */ 214 if (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) == 0) /* but some of it is less! */
215 size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024); 215 size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024);
216 crc->size = size = size - (size & 7); /* always multiple of 8 */ 216 crc->size = size = size - (size & 7); /* always multiple of 8 */
217 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key); 217 GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key);
218 memset (data, i, size); 218 memset (data, i, size);
219 if (i > 255) 219 if (i > 255)
220 memset (data, i - 255, size / 2); 220 memset (data, i - 255, size / 2);
@@ -298,7 +298,7 @@ run (void *cls,
298 const struct GNUNET_CONFIGURATION_Handle *cfg) 298 const struct GNUNET_CONFIGURATION_Handle *cfg)
299{ 299{
300 struct CpsRunContext *crc; 300 struct CpsRunContext *crc;
301 static GNUNET_HashCode zkey; 301 static struct GNUNET_HashCode zkey;
302 302
303 datastore = GNUNET_DATASTORE_connect (cfg); 303 datastore = GNUNET_DATASTORE_connect (cfg);
304 start_time = GNUNET_TIME_absolute_get (); 304 start_time = GNUNET_TIME_absolute_get ();
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 4b1bdabde..fec090571 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -103,7 +103,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
103{ 103{
104 char value[65536]; 104 char value[65536];
105 size_t size; 105 size_t size;
106 static GNUNET_HashCode key; 106 static struct GNUNET_HashCode key;
107 static int ic; 107 static int ic;
108 char *msg; 108 char *msg;
109 unsigned int prio; 109 unsigned int prio;
@@ -116,7 +116,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
116 116
117 /* generate random key */ 117 /* generate random key */
118 key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value; 118 key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value;
119 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key); 119 GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key);
120 memset (value, i, size); 120 memset (value, i, size);
121 if (i > 255) 121 if (i > 255)
122 memset (value, i - 255, size / 2); 122 memset (value, i - 255, size / 2);
@@ -149,7 +149,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
149 149
150 150
151static int 151static int
152iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size, 152iterate_zeros (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
153 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 153 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
154 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 154 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
155 uint64_t uid) 155 uint64_t uid)
@@ -196,7 +196,7 @@ iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size,
196 196
197 197
198static int 198static int
199expiration_get (void *cls, const GNUNET_HashCode * key, uint32_t size, 199expiration_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
200 const void *data, enum GNUNET_BLOCK_Type type, 200 const void *data, enum GNUNET_BLOCK_Type type,
201 uint32_t priority, uint32_t anonymity, 201 uint32_t priority, uint32_t anonymity,
202 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 202 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -241,7 +241,7 @@ expiration_get (void *cls, const GNUNET_HashCode * key, uint32_t size,
241 241
242 242
243static int 243static int
244replication_get (void *cls, const GNUNET_HashCode * key, uint32_t size, 244replication_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
245 const void *data, enum GNUNET_BLOCK_Type type, 245 const void *data, enum GNUNET_BLOCK_Type type,
246 uint32_t priority, uint32_t anonymity, 246 uint32_t priority, uint32_t anonymity,
247 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 247 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index ed7741cfc..b92877d98 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -281,7 +281,7 @@ mysql_plugin_estimate_size (void *cls)
281 * @return GNUNET_OK on success 281 * @return GNUNET_OK on success
282 */ 282 */
283static int 283static int
284mysql_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 284mysql_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
285 const void *data, enum GNUNET_BLOCK_Type type, 285 const void *data, enum GNUNET_BLOCK_Type type,
286 uint32_t priority, uint32_t anonymity, uint32_t replication, 286 uint32_t priority, uint32_t anonymity, uint32_t replication,
287 struct GNUNET_TIME_Absolute expiration, char **msg) 287 struct GNUNET_TIME_Absolute expiration, char **msg)
@@ -297,15 +297,15 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
297 unsigned long hashSize; 297 unsigned long hashSize;
298 unsigned long hashSize2; 298 unsigned long hashSize2;
299 unsigned long lsize; 299 unsigned long lsize;
300 GNUNET_HashCode vhash; 300 struct GNUNET_HashCode vhash;
301 301
302 if (size > MAX_DATUM_SIZE) 302 if (size > MAX_DATUM_SIZE)
303 { 303 {
304 GNUNET_break (0); 304 GNUNET_break (0);
305 return GNUNET_SYSERR; 305 return GNUNET_SYSERR;
306 } 306 }
307 hashSize = sizeof (GNUNET_HashCode); 307 hashSize = sizeof (struct GNUNET_HashCode);
308 hashSize2 = sizeof (GNUNET_HashCode); 308 hashSize2 = sizeof (struct GNUNET_HashCode);
309 lsize = size; 309 lsize = size;
310 GNUNET_CRYPTO_hash (data, size, &vhash); 310 GNUNET_CRYPTO_hash (data, size, &vhash);
311 if (GNUNET_OK != 311 if (GNUNET_OK !=
@@ -403,11 +403,11 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
403 unsigned long size; 403 unsigned long size;
404 unsigned long long uid; 404 unsigned long long uid;
405 char value[GNUNET_DATASTORE_MAX_VALUE_SIZE]; 405 char value[GNUNET_DATASTORE_MAX_VALUE_SIZE];
406 GNUNET_HashCode key; 406 struct GNUNET_HashCode key;
407 struct GNUNET_TIME_Absolute expiration; 407 struct GNUNET_TIME_Absolute expiration;
408 MYSQL_BIND rbind[7]; 408 MYSQL_BIND rbind[7];
409 409
410 hashSize = sizeof (GNUNET_HashCode); 410 hashSize = sizeof (struct GNUNET_HashCode);
411 memset (rbind, 0, sizeof (rbind)); 411 memset (rbind, 0, sizeof (rbind));
412 rbind[0].buffer_type = MYSQL_TYPE_LONG; 412 rbind[0].buffer_type = MYSQL_TYPE_LONG;
413 rbind[0].buffer = &type; 413 rbind[0].buffer = &type;
@@ -442,8 +442,8 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
442 return; 442 return;
443 } 443 }
444 GNUNET_assert (size <= sizeof (value)); 444 GNUNET_assert (size <= sizeof (value));
445 if ((rbind[4].buffer_length != sizeof (GNUNET_HashCode)) || 445 if ((rbind[4].buffer_length != sizeof (struct GNUNET_HashCode)) ||
446 (hashSize != sizeof (GNUNET_HashCode))) 446 (hashSize != sizeof (struct GNUNET_HashCode)))
447 { 447 {
448 GNUNET_break (0); 448 GNUNET_break (0);
449 proc (proc_cls, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0); 449 proc (proc_cls, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
@@ -486,8 +486,8 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
486 * @param proc_cls closure for proc 486 * @param proc_cls closure for proc
487 */ 487 */
488static void 488static void
489mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key, 489mysql_plugin_get_key (void *cls, uint64_t offset, const struct GNUNET_HashCode * key,
490 const GNUNET_HashCode * vhash, 490 const struct GNUNET_HashCode * vhash,
491 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 491 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
492 void *proc_cls) 492 void *proc_cls)
493{ 493{
@@ -501,8 +501,8 @@ mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
501 501
502 GNUNET_assert (key != NULL); 502 GNUNET_assert (key != NULL);
503 GNUNET_assert (NULL != proc); 503 GNUNET_assert (NULL != proc);
504 hashSize = sizeof (GNUNET_HashCode); 504 hashSize = sizeof (struct GNUNET_HashCode);
505 hashSize2 = sizeof (GNUNET_HashCode); 505 hashSize2 = sizeof (struct GNUNET_HashCode);
506 memset (cbind, 0, sizeof (cbind)); 506 memset (cbind, 0, sizeof (cbind));
507 total = -1; 507 total = -1;
508 cbind[0].buffer_type = MYSQL_TYPE_LONGLONG; 508 cbind[0].buffer_type = MYSQL_TYPE_LONGLONG;
@@ -669,7 +669,7 @@ struct ReplCtx
669 * GNUNET_NO to delete the item and continue (if supported) 669 * GNUNET_NO to delete the item and continue (if supported)
670 */ 670 */
671static int 671static int
672repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 672repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
673 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 673 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
674 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 674 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
675 uint64_t uid) 675 uint64_t uid)
@@ -763,7 +763,7 @@ mysql_plugin_get_keys (void *cls,
763 const char *query = "SELECT hash FROM gn090"; 763 const char *query = "SELECT hash FROM gn090";
764 int ret; 764 int ret;
765 MYSQL_STMT *statement; 765 MYSQL_STMT *statement;
766 GNUNET_HashCode key; 766 struct GNUNET_HashCode key;
767 MYSQL_BIND cbind[1]; 767 MYSQL_BIND cbind[1];
768 unsigned long length; 768 unsigned long length;
769 769
@@ -808,7 +808,7 @@ mysql_plugin_get_keys (void *cls,
808 } 808 }
809 while (0 == (ret = mysql_stmt_fetch (statement))) 809 while (0 == (ret = mysql_stmt_fetch (statement)))
810 { 810 {
811 if (sizeof (GNUNET_HashCode) == length) 811 if (sizeof (struct GNUNET_HashCode) == length)
812 proc (proc_cls, &key, 1); 812 proc (proc_cls, &key, 1);
813 } 813 }
814 if (ret != MYSQL_NO_DATA) 814 if (ret != MYSQL_NO_DATA)
@@ -869,7 +869,7 @@ struct ExpiCtx
869 * GNUNET_NO to delete the item and continue (if supported) 869 * GNUNET_NO to delete the item and continue (if supported)
870 */ 870 */
871static int 871static int
872expi_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 872expi_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
873 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 873 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
874 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 874 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
875 uint64_t uid) 875 uint64_t uid)
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 6dec3146d..83fc423da 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -270,14 +270,14 @@ postgres_plugin_estimate_size (void *cls)
270 * @return GNUNET_OK on success 270 * @return GNUNET_OK on success
271 */ 271 */
272static int 272static int
273postgres_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 273postgres_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
274 const void *data, enum GNUNET_BLOCK_Type type, 274 const void *data, enum GNUNET_BLOCK_Type type,
275 uint32_t priority, uint32_t anonymity, 275 uint32_t priority, uint32_t anonymity,
276 uint32_t replication, 276 uint32_t replication,
277 struct GNUNET_TIME_Absolute expiration, char **msg) 277 struct GNUNET_TIME_Absolute expiration, char **msg)
278{ 278{
279 struct Plugin *plugin = cls; 279 struct Plugin *plugin = cls;
280 GNUNET_HashCode vhash; 280 struct GNUNET_HashCode vhash;
281 PGresult *ret; 281 PGresult *ret;
282 uint32_t btype = htonl (type); 282 uint32_t btype = htonl (type);
283 uint32_t bprio = htonl (priority); 283 uint32_t bprio = htonl (priority);
@@ -301,8 +301,8 @@ postgres_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
301 sizeof (bprio), 301 sizeof (bprio),
302 sizeof (banon), 302 sizeof (banon),
303 sizeof (bexpi), 303 sizeof (bexpi),
304 sizeof (GNUNET_HashCode), 304 sizeof (struct GNUNET_HashCode),
305 sizeof (GNUNET_HashCode), 305 sizeof (struct GNUNET_HashCode),
306 size 306 size
307 }; 307 };
308 const int paramFormats[] = { 1, 1, 1, 1, 1, 1, 1, 1 }; 308 const int paramFormats[] = { 1, 1, 1, 1, 1, 1, 1, 1 };
@@ -345,7 +345,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
345 uint32_t size; 345 uint32_t size;
346 unsigned int rowid; 346 unsigned int rowid;
347 struct GNUNET_TIME_Absolute expiration_time; 347 struct GNUNET_TIME_Absolute expiration_time;
348 GNUNET_HashCode key; 348 struct GNUNET_HashCode key;
349 349
350 if (GNUNET_OK != 350 if (GNUNET_OK !=
351 GNUNET_POSTGRES_check_result_ (plugin->dbh, res, PGRES_TUPLES_OK, "PQexecPrepared", "select", 351 GNUNET_POSTGRES_check_result_ (plugin->dbh, res, PGRES_TUPLES_OK, "PQexecPrepared", "select",
@@ -380,7 +380,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
380 (sizeof (uint32_t) != PQfsize (res, 1)) || 380 (sizeof (uint32_t) != PQfsize (res, 1)) ||
381 (sizeof (uint32_t) != PQfsize (res, 2)) || 381 (sizeof (uint32_t) != PQfsize (res, 2)) ||
382 (sizeof (uint64_t) != PQfsize (res, 3)) || 382 (sizeof (uint64_t) != PQfsize (res, 3)) ||
383 (sizeof (GNUNET_HashCode) != PQgetlength (res, 0, 4))) 383 (sizeof (struct GNUNET_HashCode) != PQgetlength (res, 0, 4)))
384 { 384 {
385 GNUNET_break (0); 385 GNUNET_break (0);
386 PQclear (res); 386 PQclear (res);
@@ -394,7 +394,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
394 anonymity = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); 394 anonymity = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2));
395 expiration_time.abs_value = 395 expiration_time.abs_value =
396 GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3)); 396 GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3));
397 memcpy (&key, PQgetvalue (res, 0, 4), sizeof (GNUNET_HashCode)); 397 memcpy (&key, PQgetvalue (res, 0, 4), sizeof (struct GNUNET_HashCode));
398 size = PQgetlength (res, 0, 5); 398 size = PQgetlength (res, 0, 5);
399 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "datastore-postgres", 399 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "datastore-postgres",
400 "Found result of size %u bytes and type %u in database\n", 400 "Found result of size %u bytes and type %u in database\n",
@@ -443,8 +443,8 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
443 */ 443 */
444static void 444static void
445postgres_plugin_get_key (void *cls, uint64_t offset, 445postgres_plugin_get_key (void *cls, uint64_t offset,
446 const GNUNET_HashCode * key, 446 const struct GNUNET_HashCode * key,
447 const GNUNET_HashCode * vhash, 447 const struct GNUNET_HashCode * vhash,
448 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 448 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
449 void *proc_cls) 449 void *proc_cls)
450{ 450{
@@ -461,14 +461,14 @@ postgres_plugin_get_key (void *cls, uint64_t offset,
461 461
462 GNUNET_assert (key != NULL); 462 GNUNET_assert (key != NULL);
463 paramValues[0] = (const char *) key; 463 paramValues[0] = (const char *) key;
464 paramLengths[0] = sizeof (GNUNET_HashCode); 464 paramLengths[0] = sizeof (struct GNUNET_HashCode);
465 btype = htonl (type); 465 btype = htonl (type);
466 if (type != 0) 466 if (type != 0)
467 { 467 {
468 if (vhash != NULL) 468 if (vhash != NULL)
469 { 469 {
470 paramValues[1] = (const char *) vhash; 470 paramValues[1] = (const char *) vhash;
471 paramLengths[1] = sizeof (GNUNET_HashCode); 471 paramLengths[1] = sizeof (struct GNUNET_HashCode);
472 paramValues[2] = (const char *) &btype; 472 paramValues[2] = (const char *) &btype;
473 paramLengths[2] = sizeof (btype); 473 paramLengths[2] = sizeof (btype);
474 paramValues[3] = (const char *) &blimit_off; 474 paramValues[3] = (const char *) &blimit_off;
@@ -499,7 +499,7 @@ postgres_plugin_get_key (void *cls, uint64_t offset,
499 if (vhash != NULL) 499 if (vhash != NULL)
500 { 500 {
501 paramValues[1] = (const char *) vhash; 501 paramValues[1] = (const char *) vhash;
502 paramLengths[1] = sizeof (GNUNET_HashCode); 502 paramLengths[1] = sizeof (struct GNUNET_HashCode);
503 paramValues[2] = (const char *) &blimit_off; 503 paramValues[2] = (const char *) &blimit_off;
504 paramLengths[2] = sizeof (blimit_off); 504 paramLengths[2] = sizeof (blimit_off);
505 nparams = 3; 505 nparams = 3;
@@ -628,7 +628,7 @@ struct ReplCtx
628 * GNUNET_NO to delete the item and continue (if supported) 628 * GNUNET_NO to delete the item and continue (if supported)
629 */ 629 */
630static int 630static int
631repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 631repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
632 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 632 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
633 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 633 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
634 uint64_t uid) 634 uint64_t uid)
@@ -792,16 +792,16 @@ postgres_plugin_get_keys (void *cls,
792 struct Plugin *plugin = cls; 792 struct Plugin *plugin = cls;
793 int ret; 793 int ret;
794 int i; 794 int i;
795 GNUNET_HashCode key; 795 struct GNUNET_HashCode key;
796 PGresult * res; 796 PGresult * res;
797 797
798 res = PQexecPrepared (plugin->dbh, "get_keys", 0, NULL, NULL, NULL, 1); 798 res = PQexecPrepared (plugin->dbh, "get_keys", 0, NULL, NULL, NULL, 1);
799 ret = PQntuples (res); 799 ret = PQntuples (res);
800 for (i=0;i<ret;i++) 800 for (i=0;i<ret;i++)
801 { 801 {
802 if (sizeof (GNUNET_HashCode) != PQgetlength (res, i, 0)) 802 if (sizeof (struct GNUNET_HashCode) != PQgetlength (res, i, 0))
803 { 803 {
804 memcpy (&key, PQgetvalue (res, i, 0), sizeof (GNUNET_HashCode)); 804 memcpy (&key, PQgetvalue (res, i, 0), sizeof (struct GNUNET_HashCode));
805 proc (proc_cls, &key, 1); 805 proc (proc_cls, &key, 1);
806 } 806 }
807 } 807 }
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 00195fb13..40b4de33e 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -480,7 +480,7 @@ delete_by_rowid (struct Plugin *plugin, unsigned long long rid)
480 * @return GNUNET_OK on success 480 * @return GNUNET_OK on success
481 */ 481 */
482static int 482static int
483sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 483sqlite_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
484 const void *data, enum GNUNET_BLOCK_Type type, 484 const void *data, enum GNUNET_BLOCK_Type type,
485 uint32_t priority, uint32_t anonymity, uint32_t replication, 485 uint32_t priority, uint32_t anonymity, uint32_t replication,
486 struct GNUNET_TIME_Absolute expiration, char **msg) 486 struct GNUNET_TIME_Absolute expiration, char **msg)
@@ -489,7 +489,7 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
489 int n; 489 int n;
490 int ret; 490 int ret;
491 sqlite3_stmt *stmt; 491 sqlite3_stmt *stmt;
492 GNUNET_HashCode vhash; 492 struct GNUNET_HashCode vhash;
493 uint64_t rvalue; 493 uint64_t rvalue;
494 494
495 if (size > MAX_ITEM_SIZE) 495 if (size > MAX_ITEM_SIZE)
@@ -510,10 +510,10 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
510 (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value)) || 510 (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value)) ||
511 (SQLITE_OK != sqlite3_bind_int64 (stmt, 6, rvalue)) || 511 (SQLITE_OK != sqlite3_bind_int64 (stmt, 6, rvalue)) ||
512 (SQLITE_OK != 512 (SQLITE_OK !=
513 sqlite3_bind_blob (stmt, 7, key, sizeof (GNUNET_HashCode), 513 sqlite3_bind_blob (stmt, 7, key, sizeof (struct GNUNET_HashCode),
514 SQLITE_TRANSIENT)) || 514 SQLITE_TRANSIENT)) ||
515 (SQLITE_OK != 515 (SQLITE_OK !=
516 sqlite3_bind_blob (stmt, 8, &vhash, sizeof (GNUNET_HashCode), 516 sqlite3_bind_blob (stmt, 8, &vhash, sizeof (struct GNUNET_HashCode),
517 SQLITE_TRANSIENT)) || 517 SQLITE_TRANSIENT)) ||
518 (SQLITE_OK != sqlite3_bind_blob (stmt, 9, data, size, SQLITE_TRANSIENT))) 518 (SQLITE_OK != sqlite3_bind_blob (stmt, 9, data, size, SQLITE_TRANSIENT)))
519 { 519 {
@@ -648,7 +648,7 @@ execute_get (struct Plugin *plugin, sqlite3_stmt * stmt,
648 case SQLITE_ROW: 648 case SQLITE_ROW:
649 size = sqlite3_column_bytes (stmt, 5); 649 size = sqlite3_column_bytes (stmt, 5);
650 rowid = sqlite3_column_int64 (stmt, 6); 650 rowid = sqlite3_column_int64 (stmt, 6);
651 if (sqlite3_column_bytes (stmt, 4) != sizeof (GNUNET_HashCode)) 651 if (sqlite3_column_bytes (stmt, 4) != sizeof (struct GNUNET_HashCode))
652 { 652 {
653 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "sqlite", 653 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "sqlite",
654 _ 654 _
@@ -768,8 +768,8 @@ sqlite_plugin_get_zero_anonymity (void *cls, uint64_t offset,
768 * @param proc_cls closure for proc 768 * @param proc_cls closure for proc
769 */ 769 */
770static void 770static void
771sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key, 771sqlite_plugin_get_key (void *cls, uint64_t offset, const struct GNUNET_HashCode * key,
772 const GNUNET_HashCode * vhash, 772 const struct GNUNET_HashCode * vhash,
773 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 773 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
774 void *proc_cls) 774 void *proc_cls)
775{ 775{
@@ -796,11 +796,11 @@ sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
796 } 796 }
797 sqoff = 1; 797 sqoff = 1;
798 ret = 798 ret =
799 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (GNUNET_HashCode), 799 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (struct GNUNET_HashCode),
800 SQLITE_TRANSIENT); 800 SQLITE_TRANSIENT);
801 if ((vhash != NULL) && (ret == SQLITE_OK)) 801 if ((vhash != NULL) && (ret == SQLITE_OK))
802 ret = 802 ret =
803 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (GNUNET_HashCode), 803 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (struct GNUNET_HashCode),
804 SQLITE_TRANSIENT); 804 SQLITE_TRANSIENT);
805 if ((type != 0) && (ret == SQLITE_OK)) 805 if ((type != 0) && (ret == SQLITE_OK))
806 ret = sqlite3_bind_int (stmt, sqoff++, type); 806 ret = sqlite3_bind_int (stmt, sqoff++, type);
@@ -845,11 +845,11 @@ sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
845 } 845 }
846 sqoff = 1; 846 sqoff = 1;
847 ret = 847 ret =
848 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (GNUNET_HashCode), 848 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (struct GNUNET_HashCode),
849 SQLITE_TRANSIENT); 849 SQLITE_TRANSIENT);
850 if ((vhash != NULL) && (ret == SQLITE_OK)) 850 if ((vhash != NULL) && (ret == SQLITE_OK))
851 ret = 851 ret =
852 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (GNUNET_HashCode), 852 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (struct GNUNET_HashCode),
853 SQLITE_TRANSIENT); 853 SQLITE_TRANSIENT);
854 if ((type != 0) && (ret == SQLITE_OK)) 854 if ((type != 0) && (ret == SQLITE_OK))
855 ret = sqlite3_bind_int (stmt, sqoff++, type); 855 ret = sqlite3_bind_int (stmt, sqoff++, type);
@@ -916,7 +916,7 @@ struct ReplCtx
916 * GNUNET_NO to delete the item 916 * GNUNET_NO to delete the item
917 */ 917 */
918static int 918static int
919repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 919repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
920 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 920 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
921 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 921 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
922 uint64_t uid) 922 uint64_t uid)
@@ -1076,7 +1076,7 @@ sqlite_plugin_get_keys (void *cls,
1076 void *proc_cls) 1076 void *proc_cls)
1077{ 1077{
1078 struct Plugin *plugin = cls; 1078 struct Plugin *plugin = cls;
1079 const GNUNET_HashCode *key; 1079 const struct GNUNET_HashCode *key;
1080 sqlite3_stmt *stmt; 1080 sqlite3_stmt *stmt;
1081 int ret; 1081 int ret;
1082 1082
@@ -1090,7 +1090,7 @@ sqlite_plugin_get_keys (void *cls,
1090 while (SQLITE_ROW == (ret = sqlite3_step (stmt))) 1090 while (SQLITE_ROW == (ret = sqlite3_step (stmt)))
1091 { 1091 {
1092 key = sqlite3_column_blob (stmt, 1); 1092 key = sqlite3_column_blob (stmt, 1);
1093 if (sizeof (GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1)) 1093 if (sizeof (struct GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1))
1094 proc (proc_cls, key, 1); 1094 proc (proc_cls, key, 1);
1095 } 1095 }
1096 if (SQLITE_DONE != ret) 1096 if (SQLITE_DONE != ret)
diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c
index 174d3d255..1e30abe18 100644
--- a/src/datastore/plugin_datastore_template.c
+++ b/src/datastore/plugin_datastore_template.c
@@ -71,7 +71,7 @@ template_plugin_estimate_size (void *cls)
71 * @return GNUNET_OK on success 71 * @return GNUNET_OK on success
72 */ 72 */
73static int 73static int
74template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 74template_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
75 const void *data, enum GNUNET_BLOCK_Type type, 75 const void *data, enum GNUNET_BLOCK_Type type,
76 uint32_t priority, uint32_t anonymity, 76 uint32_t priority, uint32_t anonymity,
77 uint32_t replication, 77 uint32_t replication,
@@ -103,8 +103,8 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
103 */ 103 */
104static void 104static void
105template_plugin_get_key (void *cls, uint64_t offset, 105template_plugin_get_key (void *cls, uint64_t offset,
106 const GNUNET_HashCode * key, 106 const struct GNUNET_HashCode * key,
107 const GNUNET_HashCode * vhash, 107 const struct GNUNET_HashCode * vhash,
108 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 108 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
109 void *proc_cls) 109 void *proc_cls)
110{ 110{
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index 374067ca0..3f8f87cae 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -119,7 +119,7 @@ enum RunPhase
119 119
120struct CpsRunContext 120struct CpsRunContext
121{ 121{
122 GNUNET_HashCode key; 122 struct GNUNET_HashCode key;
123 int i; 123 int i;
124 int rid; 124 int rid;
125 const struct GNUNET_CONFIGURATION_Handle *cfg; 125 const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -171,7 +171,7 @@ get_reserved (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration
171 171
172 172
173static void 173static void
174check_value (void *cls, const GNUNET_HashCode * key, size_t size, 174check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
177 uint64_t uid) 177 uint64_t uid)
@@ -217,7 +217,7 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
217 217
218 218
219static void 219static void
220delete_value (void *cls, const GNUNET_HashCode * key, size_t size, 220delete_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
221 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 221 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
222 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 222 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
223 uint64_t uid) 223 uint64_t uid)
@@ -237,7 +237,7 @@ delete_value (void *cls, const GNUNET_HashCode * key, size_t size,
237 237
238 238
239static void 239static void
240check_nothing (void *cls, const GNUNET_HashCode * key, size_t size, 240check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size,
241 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 241 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
242 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 242 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
243 uint64_t uid) 243 uint64_t uid)
@@ -253,7 +253,7 @@ check_nothing (void *cls, const GNUNET_HashCode * key, size_t size,
253 253
254 254
255static void 255static void
256check_multiple (void *cls, const GNUNET_HashCode * key, size_t size, 256check_multiple (void *cls, const struct GNUNET_HashCode * key, size_t size,
257 const void *data, enum GNUNET_BLOCK_Type type, 257 const void *data, enum GNUNET_BLOCK_Type type,
258 uint32_t priority, uint32_t anonymity, 258 uint32_t priority, uint32_t anonymity,
259 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 259 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -285,7 +285,7 @@ check_multiple (void *cls, const GNUNET_HashCode * key, size_t size,
285 285
286 286
287static void 287static void
288check_update (void *cls, const GNUNET_HashCode * key, size_t size, 288check_update (void *cls, const struct GNUNET_HashCode * key, size_t size,
289 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 289 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
290 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 290 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
291 uint64_t uid) 291 uint64_t uid)
@@ -467,7 +467,7 @@ run (void *cls,
467 const struct GNUNET_CONFIGURATION_Handle *cfg) 467 const struct GNUNET_CONFIGURATION_Handle *cfg)
468{ 468{
469 struct CpsRunContext *crc; 469 struct CpsRunContext *crc;
470 static GNUNET_HashCode zkey; 470 static struct GNUNET_HashCode zkey;
471 471
472 crc = GNUNET_malloc (sizeof (struct CpsRunContext)); 472 crc = GNUNET_malloc (sizeof (struct CpsRunContext));
473 crc->cfg = cfg; 473 crc->cfg = cfg;
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index bbb954304..4766c03eb 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -51,7 +51,7 @@ enum RunPhase
51 51
52struct CpsRunContext 52struct CpsRunContext
53{ 53{
54 GNUNET_HashCode key; 54 struct GNUNET_HashCode key;
55 int i; 55 int i;
56 int found; 56 int found;
57 const struct GNUNET_CONFIGURATION_Handle *cfg; 57 const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -138,7 +138,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiratio
138 138
139 139
140static void 140static void
141check_value (void *cls, const GNUNET_HashCode * key, size_t size, 141check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
142 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 142 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
143 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 143 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
144 uint64_t uid) 144 uint64_t uid)
@@ -170,7 +170,7 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
170 170
171 171
172static void 172static void
173check_nothing (void *cls, const GNUNET_HashCode * key, size_t size, 173check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size,
174 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 174 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
175 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 175 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
176 uint64_t uid) 176 uint64_t uid)
@@ -262,7 +262,7 @@ run (void *cls,
262 const struct GNUNET_CONFIGURATION_Handle *cfg) 262 const struct GNUNET_CONFIGURATION_Handle *cfg)
263{ 263{
264 struct CpsRunContext *crc; 264 struct CpsRunContext *crc;
265 static GNUNET_HashCode zkey; 265 static struct GNUNET_HashCode zkey;
266 266
267 crc = GNUNET_malloc (sizeof (struct CpsRunContext)); 267 crc = GNUNET_malloc (sizeof (struct CpsRunContext));
268 crc->cfg = cfg; 268 crc->cfg = cfg;
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c
index a228e1004..96a5aebe5 100644
--- a/src/datastore/test_plugin_datastore.c
+++ b/src/datastore/test_plugin_datastore.c
@@ -84,11 +84,11 @@ disk_utilization_change_cb (void *cls, int delta)
84 84
85 85
86static void 86static void
87gen_key (int i, GNUNET_HashCode * key) 87gen_key (int i, struct GNUNET_HashCode * key)
88{ 88{
89 memset (key, 0, sizeof (GNUNET_HashCode)); 89 memset (key, 0, sizeof (struct GNUNET_HashCode));
90 key->bits[0] = (unsigned int) i; 90 key->bits[0] = (unsigned int) i;
91 GNUNET_CRYPTO_hash (key, sizeof (GNUNET_HashCode), key); 91 GNUNET_CRYPTO_hash (key, sizeof (struct GNUNET_HashCode), key);
92} 92}
93 93
94 94
@@ -97,7 +97,7 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
97{ 97{
98 char value[65536]; 98 char value[65536];
99 size_t size; 99 size_t size;
100 GNUNET_HashCode key; 100 struct GNUNET_HashCode key;
101 char *msg; 101 char *msg;
102 unsigned int prio; 102 unsigned int prio;
103 103
@@ -147,7 +147,7 @@ static uint64_t guid;
147 147
148 148
149static int 149static int
150iterate_one_shot (void *cls, const GNUNET_HashCode * key, uint32_t size, 150iterate_one_shot (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
151 const void *data, enum GNUNET_BLOCK_Type type, 151 const void *data, enum GNUNET_BLOCK_Type type,
152 uint32_t priority, uint32_t anonymity, 152 uint32_t priority, uint32_t anonymity,
153 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 153 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -218,7 +218,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
218 int j; 218 int j;
219 unsigned long long os; 219 unsigned long long os;
220 unsigned long long cs; 220 unsigned long long cs;
221 GNUNET_HashCode key; 221 struct GNUNET_HashCode key;
222 222
223 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 223 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
224 { 224 {
diff --git a/src/dht/dht.h b/src/dht/dht.h
index 8adf49f5c..772471a7c 100644
--- a/src/dht/dht.h
+++ b/src/dht/dht.h
@@ -60,7 +60,7 @@ struct GNUNET_DHT_ClientGetStopMessage
60 /** 60 /**
61 * Key of this request 61 * Key of this request
62 */ 62 */
63 GNUNET_HashCode key; 63 struct GNUNET_HashCode key;
64 64
65}; 65};
66 66
@@ -95,7 +95,7 @@ struct GNUNET_DHT_ClientGetMessage
95 /** 95 /**
96 * The key to search for 96 * The key to search for
97 */ 97 */
98 GNUNET_HashCode key; 98 struct GNUNET_HashCode key;
99 99
100 /** 100 /**
101 * Unique ID identifying this request, if 0 then 101 * Unique ID identifying this request, if 0 then
@@ -148,7 +148,7 @@ struct GNUNET_DHT_ClientResultMessage
148 /** 148 /**
149 * The key that was searched for 149 * The key that was searched for
150 */ 150 */
151 GNUNET_HashCode key; 151 struct GNUNET_HashCode key;
152 152
153 /* put path, get path and actual data are copied to end of this dealy do */ 153 /* put path, get path and actual data are copied to end of this dealy do */
154 154
@@ -193,7 +193,7 @@ struct GNUNET_DHT_ClientPutMessage
193 /** 193 /**
194 * The key to store the value under. 194 * The key to store the value under.
195 */ 195 */
196 GNUNET_HashCode key; 196 struct GNUNET_HashCode key;
197 197
198 /* DATA copied to end of this message */ 198 /* DATA copied to end of this message */
199 199
@@ -268,7 +268,7 @@ struct GNUNET_DHT_MonitorPutMessage
268 /** 268 /**
269 * The key to store the value under. 269 * The key to store the value under.
270 */ 270 */
271 GNUNET_HashCode key; 271 struct GNUNET_HashCode key;
272 272
273 /* put path (if tracked) */ 273 /* put path (if tracked) */
274 274
@@ -315,7 +315,7 @@ struct GNUNET_DHT_MonitorStartStopMessage
315 /** 315 /**
316 * The key to filter messages by. 316 * The key to filter messages by.
317 */ 317 */
318 GNUNET_HashCode key; 318 struct GNUNET_HashCode key;
319}; 319};
320 320
321 321
@@ -358,7 +358,7 @@ struct GNUNET_DHT_MonitorGetMessage
358 /** 358 /**
359 * The key to store the value under. 359 * The key to store the value under.
360 */ 360 */
361 GNUNET_HashCode key; 361 struct GNUNET_HashCode key;
362 362
363 /* get path (if tracked) */ 363 /* get path (if tracked) */
364 364
@@ -397,7 +397,7 @@ struct GNUNET_DHT_MonitorGetRespMessage
397 /** 397 /**
398 * The key of the corresponding GET request. 398 * The key of the corresponding GET request.
399 */ 399 */
400 GNUNET_HashCode key; 400 struct GNUNET_HashCode key;
401 401
402 /* put path (if tracked) */ 402 /* put path (if tracked) */
403 403
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index 420eacbff..53702fd77 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -175,7 +175,7 @@ struct GNUNET_DHT_GetHandle
175 /** 175 /**
176 * Key that this get request is for 176 * Key that this get request is for
177 */ 177 */
178 GNUNET_HashCode key; 178 struct GNUNET_HashCode key;
179 179
180 /** 180 /**
181 * Unique identifier for this request (for key collisions). 181 * Unique identifier for this request (for key collisions).
@@ -213,7 +213,7 @@ struct GNUNET_DHT_MonitorHandle
213 /** 213 /**
214 * Key being looked for, NULL == all. 214 * Key being looked for, NULL == all.
215 */ 215 */
216 GNUNET_HashCode *key; 216 struct GNUNET_HashCode *key;
217 217
218 /** 218 /**
219 * Callback for each received message of type get. 219 * Callback for each received message of type get.
@@ -362,7 +362,7 @@ try_connect (struct GNUNET_DHT_Handle *handle)
362 * @return GNUNET_YES (always) 362 * @return GNUNET_YES (always)
363 */ 363 */
364static int 364static int
365add_request_to_pending (void *cls, const GNUNET_HashCode * key, void *value) 365add_request_to_pending (void *cls, const struct GNUNET_HashCode * key, void *value)
366{ 366{
367 struct GNUNET_DHT_Handle *handle = cls; 367 struct GNUNET_DHT_Handle *handle = cls;
368 struct GNUNET_DHT_GetHandle *rh = value; 368 struct GNUNET_DHT_GetHandle *rh = value;
@@ -577,7 +577,7 @@ transmit_pending (void *cls, size_t size, void *buf)
577 * GNUNET_NO if the reply is malformed 577 * GNUNET_NO if the reply is malformed
578 */ 578 */
579static int 579static int
580process_reply (void *cls, const GNUNET_HashCode * key, void *value) 580process_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
581{ 581{
582 const struct GNUNET_DHT_ClientResultMessage *dht_msg = cls; 582 const struct GNUNET_DHT_ClientResultMessage *dht_msg = cls;
583 struct GNUNET_DHT_GetHandle *get_handle = value; 583 struct GNUNET_DHT_GetHandle *get_handle = value;
@@ -648,7 +648,7 @@ process_monitor_get_message (struct GNUNET_DHT_Handle *handle,
648 648
649 type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type)); 649 type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type));
650 key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key, 650 key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key,
651 sizeof (GNUNET_HashCode))); 651 sizeof (struct GNUNET_HashCode)));
652 if (type_ok && key_ok && (NULL != h->get_cb)) 652 if (type_ok && key_ok && (NULL != h->get_cb))
653 h->get_cb (h->cb_cls, 653 h->get_cb (h->cb_cls,
654 ntohl (msg->options), 654 ntohl (msg->options),
@@ -699,7 +699,7 @@ process_monitor_get_resp_message (struct GNUNET_DHT_Handle *handle,
699 699
700 type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type)); 700 type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type));
701 key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key, 701 key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key,
702 sizeof (GNUNET_HashCode))); 702 sizeof (struct GNUNET_HashCode)));
703 if (type_ok && key_ok && (NULL != h->get_resp_cb)) 703 if (type_ok && key_ok && (NULL != h->get_resp_cb))
704 h->get_resp_cb (h->cb_cls, 704 h->get_resp_cb (h->cb_cls,
705 (enum GNUNET_BLOCK_Type) ntohl(msg->type), 705 (enum GNUNET_BLOCK_Type) ntohl(msg->type),
@@ -749,7 +749,7 @@ process_monitor_put_message (struct GNUNET_DHT_Handle *handle,
749 749
750 type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type)); 750 type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type));
751 key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key, 751 key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key,
752 sizeof (GNUNET_HashCode))); 752 sizeof (struct GNUNET_HashCode)));
753 if (type_ok && key_ok && (NULL != h->put_cb)) 753 if (type_ok && key_ok && (NULL != h->put_cb))
754 h->put_cb (h->cb_cls, 754 h->put_cb (h->cb_cls,
755 ntohl (msg->options), 755 ntohl (msg->options),
@@ -1040,7 +1040,7 @@ mark_put_message_gone (void *cls,
1040 * @param cont_cls closure for cont 1040 * @param cont_cls closure for cont
1041 */ 1041 */
1042struct GNUNET_DHT_PutHandle * 1042struct GNUNET_DHT_PutHandle *
1043GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const GNUNET_HashCode * key, 1043GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const struct GNUNET_HashCode * key,
1044 uint32_t desired_replication_level, 1044 uint32_t desired_replication_level,
1045 enum GNUNET_DHT_RouteOption options, 1045 enum GNUNET_DHT_RouteOption options,
1046 enum GNUNET_BLOCK_Type type, size_t size, const char *data, 1046 enum GNUNET_BLOCK_Type type, size_t size, const char *data,
@@ -1148,7 +1148,7 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph)
1148 */ 1148 */
1149struct GNUNET_DHT_GetHandle * 1149struct GNUNET_DHT_GetHandle *
1150GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle, 1150GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
1151 enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key, 1151 enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode * key,
1152 uint32_t desired_replication_level, 1152 uint32_t desired_replication_level,
1153 enum GNUNET_DHT_RouteOption options, const void *xquery, 1153 enum GNUNET_DHT_RouteOption options, const void *xquery,
1154 size_t xquery_size, GNUNET_DHT_GetIterator iter, 1154 size_t xquery_size, GNUNET_DHT_GetIterator iter,
@@ -1266,7 +1266,7 @@ GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle)
1266struct GNUNET_DHT_MonitorHandle * 1266struct GNUNET_DHT_MonitorHandle *
1267GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle, 1267GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
1268 enum GNUNET_BLOCK_Type type, 1268 enum GNUNET_BLOCK_Type type,
1269 const GNUNET_HashCode *key, 1269 const struct GNUNET_HashCode *key,
1270 GNUNET_DHT_MonitorGetCB get_cb, 1270 GNUNET_DHT_MonitorGetCB get_cb,
1271 GNUNET_DHT_MonitorGetRespCB get_resp_cb, 1271 GNUNET_DHT_MonitorGetRespCB get_resp_cb,
1272 GNUNET_DHT_MonitorPutCB put_cb, 1272 GNUNET_DHT_MonitorPutCB put_cb,
@@ -1287,8 +1287,8 @@ GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
1287 h->dht_handle = handle; 1287 h->dht_handle = handle;
1288 if (NULL != key) 1288 if (NULL != key)
1289 { 1289 {
1290 h->key = GNUNET_malloc (sizeof(GNUNET_HashCode)); 1290 h->key = GNUNET_malloc (sizeof(struct GNUNET_HashCode));
1291 memcpy (h->key, key, sizeof(GNUNET_HashCode)); 1291 memcpy (h->key, key, sizeof(struct GNUNET_HashCode));
1292 } 1292 }
1293 1293
1294 pending = GNUNET_malloc (sizeof (struct GNUNET_DHT_MonitorStartStopMessage) + 1294 pending = GNUNET_malloc (sizeof (struct GNUNET_DHT_MonitorStartStopMessage) +
@@ -1305,7 +1305,7 @@ GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
1305 m->put = htons(NULL != put_cb); 1305 m->put = htons(NULL != put_cb);
1306 if (NULL != key) { 1306 if (NULL != key) {
1307 m->filter_key = htons(1); 1307 m->filter_key = htons(1);
1308 memcpy (&m->key, key, sizeof(GNUNET_HashCode)); 1308 memcpy (&m->key, key, sizeof(struct GNUNET_HashCode));
1309 } 1309 }
1310 GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail, 1310 GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail,
1311 pending); 1311 pending);
@@ -1347,7 +1347,7 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle)
1347 m->put = htons(NULL != handle->put_cb); 1347 m->put = htons(NULL != handle->put_cb);
1348 if (NULL != handle->key) { 1348 if (NULL != handle->key) {
1349 m->filter_key = htons(1); 1349 m->filter_key = htons(1);
1350 memcpy (&m->key, handle->key, sizeof(GNUNET_HashCode)); 1350 memcpy (&m->key, handle->key, sizeof(struct GNUNET_HashCode));
1351 } 1351 }
1352 GNUNET_CONTAINER_DLL_insert (handle->dht_handle->pending_head, 1352 GNUNET_CONTAINER_DLL_insert (handle->dht_handle->pending_head,
1353 handle->dht_handle->pending_tail, 1353 handle->dht_handle->pending_tail,
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c
index 7555f9009..959f0b847 100644
--- a/src/dht/gnunet-dht-get.c
+++ b/src/dht/gnunet-dht-get.c
@@ -122,7 +122,7 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
122 */ 122 */
123static void 123static void
124get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 124get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
125 const GNUNET_HashCode * key, 125 const struct GNUNET_HashCode * key,
126 const struct GNUNET_PeerIdentity *get_path, 126 const struct GNUNET_PeerIdentity *get_path,
127 unsigned int get_path_length, 127 unsigned int get_path_length,
128 const struct GNUNET_PeerIdentity *put_path, 128 const struct GNUNET_PeerIdentity *put_path,
@@ -148,7 +148,7 @@ run (void *cls, char *const *args, const char *cfgfile,
148 const struct GNUNET_CONFIGURATION_Handle *c) 148 const struct GNUNET_CONFIGURATION_Handle *c)
149{ 149{
150 struct GNUNET_TIME_Relative timeout; 150 struct GNUNET_TIME_Relative timeout;
151 GNUNET_HashCode key; 151 struct GNUNET_HashCode key;
152 152
153 cfg = c; 153 cfg = c;
154 154
diff --git a/src/dht/gnunet-dht-monitor.c b/src/dht/gnunet-dht-monitor.c
index 088874a53..d8f25e58b 100644
--- a/src/dht/gnunet-dht-monitor.c
+++ b/src/dht/gnunet-dht-monitor.c
@@ -131,7 +131,7 @@ get_callback (void *cls,
131 uint32_t desired_replication_level, 131 uint32_t desired_replication_level,
132 unsigned int path_length, 132 unsigned int path_length,
133 const struct GNUNET_PeerIdentity *path, 133 const struct GNUNET_PeerIdentity *path,
134 const GNUNET_HashCode * key) 134 const struct GNUNET_HashCode * key)
135{ 135{
136 FPRINTF (stdout, "Result %d, operation: %s, type %d\n Key: %s", 136 FPRINTF (stdout, "Result %d, operation: %s, type %d\n Key: %s",
137 result_count, 137 result_count,
@@ -163,7 +163,7 @@ get_resp_callback (void *cls,
163 const struct GNUNET_PeerIdentity *put_path, 163 const struct GNUNET_PeerIdentity *put_path,
164 unsigned int put_path_length, 164 unsigned int put_path_length,
165 struct GNUNET_TIME_Absolute exp, 165 struct GNUNET_TIME_Absolute exp,
166 const GNUNET_HashCode * key, 166 const struct GNUNET_HashCode * key,
167 const void *data, 167 const void *data,
168 size_t size) 168 size_t size)
169{ 169{
@@ -201,7 +201,7 @@ put_callback (void *cls,
201 unsigned int path_length, 201 unsigned int path_length,
202 const struct GNUNET_PeerIdentity *path, 202 const struct GNUNET_PeerIdentity *path,
203 struct GNUNET_TIME_Absolute exp, 203 struct GNUNET_TIME_Absolute exp,
204 const GNUNET_HashCode * key, 204 const struct GNUNET_HashCode * key,
205 const void *data, 205 const void *data,
206 size_t size) 206 size_t size)
207{ 207{
@@ -228,7 +228,7 @@ run (void *cls, char *const *args, const char *cfgfile,
228 const struct GNUNET_CONFIGURATION_Handle *c) 228 const struct GNUNET_CONFIGURATION_Handle *c)
229{ 229{
230 struct GNUNET_TIME_Relative timeout; 230 struct GNUNET_TIME_Relative timeout;
231 GNUNET_HashCode *key; 231 struct GNUNET_HashCode *key;
232 232
233 cfg = c; 233 cfg = c;
234 234
@@ -248,7 +248,7 @@ run (void *cls, char *const *args, const char *cfgfile,
248 block_type = GNUNET_BLOCK_TYPE_TEST; 248 block_type = GNUNET_BLOCK_TYPE_TEST;
249 249
250 if (query_key != NULL) { 250 if (query_key != NULL) {
251 key = GNUNET_malloc (sizeof(GNUNET_HashCode)); 251 key = GNUNET_malloc (sizeof(struct GNUNET_HashCode));
252 GNUNET_CRYPTO_hash (query_key, strlen (query_key), key); 252 GNUNET_CRYPTO_hash (query_key, strlen (query_key), key);
253 } 253 }
254 else 254 else
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c
index f6409bdff..155e1f7d3 100644
--- a/src/dht/gnunet-dht-put.c
+++ b/src/dht/gnunet-dht-put.c
@@ -135,7 +135,7 @@ run (void *cls, char *const *args, const char *cfgfile,
135{ 135{
136 struct GNUNET_TIME_Relative timeout; 136 struct GNUNET_TIME_Relative timeout;
137 struct GNUNET_TIME_Absolute expiration; 137 struct GNUNET_TIME_Absolute expiration;
138 GNUNET_HashCode key; 138 struct GNUNET_HashCode key;
139 139
140 cfg = c; 140 cfg = c;
141 141
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index d897d1fd6..173a1c3ef 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -111,7 +111,7 @@ struct ClientQueryRecord
111 /** 111 /**
112 * The key this request was about 112 * The key this request was about
113 */ 113 */
114 GNUNET_HashCode key; 114 struct GNUNET_HashCode key;
115 115
116 /** 116 /**
117 * Client responsible for the request. 117 * Client responsible for the request.
@@ -126,7 +126,7 @@ struct ClientQueryRecord
126 /** 126 /**
127 * Replies we have already seen for this request. 127 * Replies we have already seen for this request.
128 */ 128 */
129 GNUNET_HashCode *seen_replies; 129 struct GNUNET_HashCode *seen_replies;
130 130
131 /** 131 /**
132 * Pointer to this nodes heap location in the retry-heap (for fast removal) 132 * Pointer to this nodes heap location in the retry-heap (for fast removal)
@@ -201,7 +201,7 @@ struct ClientMonitorRecord
201 /** 201 /**
202 * Key of data of interest, NULL for all. 202 * Key of data of interest, NULL for all.
203 */ 203 */
204 GNUNET_HashCode *key; 204 struct GNUNET_HashCode *key;
205 205
206 /** 206 /**
207 * Flag whether to notify about GET messages. 207 * Flag whether to notify about GET messages.
@@ -322,7 +322,7 @@ find_active_client (struct GNUNET_SERVER_Client *client)
322 * @return GNUNET_YES (we should continue to iterate) 322 * @return GNUNET_YES (we should continue to iterate)
323 */ 323 */
324static int 324static int
325remove_client_records (void *cls, const GNUNET_HashCode * key, void *value) 325remove_client_records (void *cls, const struct GNUNET_HashCode * key, void *value)
326{ 326{
327 struct ClientList *client = cls; 327 struct ClientList *client = cls;
328 struct ClientQueryRecord *record = value; 328 struct ClientQueryRecord *record = value;
@@ -646,7 +646,7 @@ struct RemoveByUniqueIdContext
646 * @return GNUNET_YES (we should continue to iterate) 646 * @return GNUNET_YES (we should continue to iterate)
647 */ 647 */
648static int 648static int
649remove_by_unique_id (void *cls, const GNUNET_HashCode * key, void *value) 649remove_by_unique_id (void *cls, const struct GNUNET_HashCode * key, void *value)
650{ 650{
651 const struct RemoveByUniqueIdContext *ctx = cls; 651 const struct RemoveByUniqueIdContext *ctx = cls;
652 struct ClientQueryRecord *record = value; 652 struct ClientQueryRecord *record = value;
@@ -718,8 +718,8 @@ handle_dht_local_monitor (void *cls, struct GNUNET_SERVER_Client *client,
718 r->key = NULL; 718 r->key = NULL;
719 else 719 else
720 { 720 {
721 r->key = GNUNET_malloc (sizeof (GNUNET_HashCode)); 721 r->key = GNUNET_malloc (sizeof (struct GNUNET_HashCode));
722 memcpy (r->key, &msg->key, sizeof (GNUNET_HashCode)); 722 memcpy (r->key, &msg->key, sizeof (struct GNUNET_HashCode));
723 } 723 }
724 GNUNET_CONTAINER_DLL_insert (monitor_head, monitor_tail, r); 724 GNUNET_CONTAINER_DLL_insert (monitor_head, monitor_tail, r);
725 GNUNET_SERVER_receive_done (client, GNUNET_OK); 725 GNUNET_SERVER_receive_done (client, GNUNET_OK);
@@ -751,7 +751,7 @@ handle_dht_local_monitor_stop (void *cls, struct GNUNET_SERVER_Client *client,
751 else 751 else
752 { 752 {
753 keys_match = (0 != ntohs(msg->filter_key) 753 keys_match = (0 != ntohs(msg->filter_key)
754 && !memcmp(r->key, &msg->key, sizeof(GNUNET_HashCode))); 754 && !memcmp(r->key, &msg->key, sizeof(struct GNUNET_HashCode)));
755 } 755 }
756 if (find_active_client(client) == r->client 756 if (find_active_client(client) == r->client
757 && ntohl(msg->type) == r->type 757 && ntohl(msg->type) == r->type
@@ -898,7 +898,7 @@ struct ForwardReplyContext
898 * if the result is mal-formed, GNUNET_NO 898 * if the result is mal-formed, GNUNET_NO
899 */ 899 */
900static int 900static int
901forward_reply (void *cls, const GNUNET_HashCode * key, void *value) 901forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
902{ 902{
903 struct ForwardReplyContext *frc = cls; 903 struct ForwardReplyContext *frc = cls;
904 struct ClientQueryRecord *record = value; 904 struct ClientQueryRecord *record = value;
@@ -906,7 +906,7 @@ forward_reply (void *cls, const GNUNET_HashCode * key, void *value)
906 struct GNUNET_DHT_ClientResultMessage *reply; 906 struct GNUNET_DHT_ClientResultMessage *reply;
907 enum GNUNET_BLOCK_EvaluationResult eval; 907 enum GNUNET_BLOCK_EvaluationResult eval;
908 int do_free; 908 int do_free;
909 GNUNET_HashCode ch; 909 struct GNUNET_HashCode ch;
910 unsigned int i; 910 unsigned int i;
911 911
912 if ((record->type != GNUNET_BLOCK_TYPE_ANY) && (record->type != frc->type)) 912 if ((record->type != GNUNET_BLOCK_TYPE_ANY) && (record->type != frc->type))
@@ -922,7 +922,7 @@ forward_reply (void *cls, const GNUNET_HashCode * key, void *value)
922 } 922 }
923 GNUNET_CRYPTO_hash (frc->data, frc->data_size, &ch); 923 GNUNET_CRYPTO_hash (frc->data, frc->data_size, &ch);
924 for (i = 0; i < record->seen_replies_count; i++) 924 for (i = 0; i < record->seen_replies_count; i++)
925 if (0 == memcmp (&record->seen_replies[i], &ch, sizeof (GNUNET_HashCode))) 925 if (0 == memcmp (&record->seen_replies[i], &ch, sizeof (struct GNUNET_HashCode)))
926 { 926 {
927 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 927 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
928 "Duplicate reply, not passing request for key %s to local client\n", 928 "Duplicate reply, not passing request for key %s to local client\n",
@@ -1017,7 +1017,7 @@ forward_reply (void *cls, const GNUNET_HashCode * key, void *value)
1017 */ 1017 */
1018void 1018void
1019GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration, 1019GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration,
1020 const GNUNET_HashCode * key, 1020 const struct GNUNET_HashCode * key,
1021 unsigned int get_path_length, 1021 unsigned int get_path_length,
1022 const struct GNUNET_PeerIdentity *get_path, 1022 const struct GNUNET_PeerIdentity *get_path,
1023 unsigned int put_path_length, 1023 unsigned int put_path_length,
@@ -1104,7 +1104,7 @@ GDS_CLIENTS_process_get (uint32_t options,
1104 uint32_t desired_replication_level, 1104 uint32_t desired_replication_level,
1105 unsigned int path_length, 1105 unsigned int path_length,
1106 const struct GNUNET_PeerIdentity *path, 1106 const struct GNUNET_PeerIdentity *path,
1107 const GNUNET_HashCode * key) 1107 const struct GNUNET_HashCode * key)
1108{ 1108{
1109 struct ClientMonitorRecord *m; 1109 struct ClientMonitorRecord *m;
1110 struct ClientList **cl; 1110 struct ClientList **cl;
@@ -1116,7 +1116,7 @@ GDS_CLIENTS_process_get (uint32_t options,
1116 { 1116 {
1117 if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) && 1117 if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
1118 (NULL == m->key || 1118 (NULL == m->key ||
1119 memcmp (key, m->key, sizeof(GNUNET_HashCode)) == 0)) 1119 memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
1120 { 1120 {
1121 struct PendingMessage *pm; 1121 struct PendingMessage *pm;
1122 struct GNUNET_DHT_MonitorGetMessage *mmsg; 1122 struct GNUNET_DHT_MonitorGetMessage *mmsg;
@@ -1145,7 +1145,7 @@ GDS_CLIENTS_process_get (uint32_t options,
1145 mmsg->hop_count = htonl(hop_count); 1145 mmsg->hop_count = htonl(hop_count);
1146 mmsg->desired_replication_level = htonl(desired_replication_level); 1146 mmsg->desired_replication_level = htonl(desired_replication_level);
1147 mmsg->get_path_length = htonl(path_length); 1147 mmsg->get_path_length = htonl(path_length);
1148 memcpy (&mmsg->key, key, sizeof (GNUNET_HashCode)); 1148 memcpy (&mmsg->key, key, sizeof (struct GNUNET_HashCode));
1149 msg_path = (struct GNUNET_PeerIdentity *) &mmsg[1]; 1149 msg_path = (struct GNUNET_PeerIdentity *) &mmsg[1];
1150 if (path_length > 0) 1150 if (path_length > 0)
1151 memcpy (msg_path, path, 1151 memcpy (msg_path, path,
@@ -1178,7 +1178,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
1178 const struct GNUNET_PeerIdentity *put_path, 1178 const struct GNUNET_PeerIdentity *put_path,
1179 unsigned int put_path_length, 1179 unsigned int put_path_length,
1180 struct GNUNET_TIME_Absolute exp, 1180 struct GNUNET_TIME_Absolute exp,
1181 const GNUNET_HashCode * key, 1181 const struct GNUNET_HashCode * key,
1182 const void *data, 1182 const void *data,
1183 size_t size) 1183 size_t size)
1184{ 1184{
@@ -1192,7 +1192,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
1192 { 1192 {
1193 if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) && 1193 if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
1194 (NULL == m->key || 1194 (NULL == m->key ||
1195 memcmp (key, m->key, sizeof(GNUNET_HashCode)) == 0)) 1195 memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
1196 { 1196 {
1197 struct PendingMessage *pm; 1197 struct PendingMessage *pm;
1198 struct GNUNET_DHT_MonitorGetRespMessage *mmsg; 1198 struct GNUNET_DHT_MonitorGetRespMessage *mmsg;
@@ -1232,7 +1232,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
1232 memcpy (path, get_path, 1232 memcpy (path, get_path,
1233 get_path_length * sizeof (struct GNUNET_PeerIdentity)); 1233 get_path_length * sizeof (struct GNUNET_PeerIdentity));
1234 mmsg->expiration_time = GNUNET_TIME_absolute_hton(exp); 1234 mmsg->expiration_time = GNUNET_TIME_absolute_hton(exp);
1235 memcpy (&mmsg->key, key, sizeof (GNUNET_HashCode)); 1235 memcpy (&mmsg->key, key, sizeof (struct GNUNET_HashCode));
1236 if (size > 0) 1236 if (size > 0)
1237 memcpy (&path[get_path_length], data, size); 1237 memcpy (&path[get_path_length], data, size);
1238 add_pending_message (m->client, pm); 1238 add_pending_message (m->client, pm);
@@ -1265,7 +1265,7 @@ GDS_CLIENTS_process_put (uint32_t options,
1265 unsigned int path_length, 1265 unsigned int path_length,
1266 const struct GNUNET_PeerIdentity *path, 1266 const struct GNUNET_PeerIdentity *path,
1267 struct GNUNET_TIME_Absolute exp, 1267 struct GNUNET_TIME_Absolute exp,
1268 const GNUNET_HashCode * key, 1268 const struct GNUNET_HashCode * key,
1269 const void *data, 1269 const void *data,
1270 size_t size) 1270 size_t size)
1271{ 1271{
@@ -1279,7 +1279,7 @@ GDS_CLIENTS_process_put (uint32_t options,
1279 { 1279 {
1280 if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) && 1280 if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
1281 (NULL == m->key || 1281 (NULL == m->key ||
1282 memcmp (key, m->key, sizeof(GNUNET_HashCode)) == 0)) 1282 memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
1283 { 1283 {
1284 struct PendingMessage *pm; 1284 struct PendingMessage *pm;
1285 struct GNUNET_DHT_MonitorPutMessage *mmsg; 1285 struct GNUNET_DHT_MonitorPutMessage *mmsg;
@@ -1316,7 +1316,7 @@ GDS_CLIENTS_process_put (uint32_t options,
1316 path_length * sizeof (struct GNUNET_PeerIdentity)); 1316 path_length * sizeof (struct GNUNET_PeerIdentity));
1317 } 1317 }
1318 mmsg->expiration_time = GNUNET_TIME_absolute_hton(exp); 1318 mmsg->expiration_time = GNUNET_TIME_absolute_hton(exp);
1319 memcpy (&mmsg->key, key, sizeof (GNUNET_HashCode)); 1319 memcpy (&mmsg->key, key, sizeof (struct GNUNET_HashCode));
1320 if (size > 0) 1320 if (size > 0)
1321 memcpy (&msg_path[path_length], data, size); 1321 memcpy (&msg_path[path_length], data, size);
1322 add_pending_message (m->client, pm); 1322 add_pending_message (m->client, pm);
diff --git a/src/dht/gnunet-service-dht_clients.h b/src/dht/gnunet-service-dht_clients.h
index 9f3d2dd83..f6d4253d5 100644
--- a/src/dht/gnunet-service-dht_clients.h
+++ b/src/dht/gnunet-service-dht_clients.h
@@ -47,7 +47,7 @@
47 */ 47 */
48void 48void
49GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration, 49GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration,
50 const GNUNET_HashCode * key, 50 const struct GNUNET_HashCode * key,
51 unsigned int get_path_length, 51 unsigned int get_path_length,
52 const struct GNUNET_PeerIdentity *get_path, 52 const struct GNUNET_PeerIdentity *get_path,
53 unsigned int put_path_length, 53 unsigned int put_path_length,
@@ -75,7 +75,7 @@ GDS_CLIENTS_process_get (uint32_t options,
75 uint32_t desired_replication_level, 75 uint32_t desired_replication_level,
76 unsigned int path_length, 76 unsigned int path_length,
77 const struct GNUNET_PeerIdentity *path, 77 const struct GNUNET_PeerIdentity *path,
78 const GNUNET_HashCode * key); 78 const struct GNUNET_HashCode * key);
79 79
80/** 80/**
81 * Check if some client is monitoring GET RESP messages and notify 81 * Check if some client is monitoring GET RESP messages and notify
@@ -98,7 +98,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
98 const struct GNUNET_PeerIdentity *put_path, 98 const struct GNUNET_PeerIdentity *put_path,
99 unsigned int put_path_length, 99 unsigned int put_path_length,
100 struct GNUNET_TIME_Absolute exp, 100 struct GNUNET_TIME_Absolute exp,
101 const GNUNET_HashCode * key, 101 const struct GNUNET_HashCode * key,
102 const void *data, 102 const void *data,
103 size_t size); 103 size_t size);
104 104
@@ -125,7 +125,7 @@ GDS_CLIENTS_process_put (uint32_t options,
125 unsigned int path_length, 125 unsigned int path_length,
126 const struct GNUNET_PeerIdentity *path, 126 const struct GNUNET_PeerIdentity *path,
127 struct GNUNET_TIME_Absolute exp, 127 struct GNUNET_TIME_Absolute exp,
128 const GNUNET_HashCode * key, 128 const struct GNUNET_HashCode * key,
129 const void *data, 129 const void *data,
130 size_t size); 130 size_t size);
131 131
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c
index 4d1dd6f68..b2cb93d12 100644
--- a/src/dht/gnunet-service-dht_datacache.c
+++ b/src/dht/gnunet-service-dht_datacache.c
@@ -74,7 +74,7 @@ struct DHTPutEntry
74 */ 74 */
75void 75void
76GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration, 76GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration,
77 const GNUNET_HashCode * key, 77 const struct GNUNET_HashCode * key,
78 unsigned int put_path_length, 78 unsigned int put_path_length,
79 const struct GNUNET_PeerIdentity *put_path, 79 const struct GNUNET_PeerIdentity *put_path,
80 enum GNUNET_BLOCK_Type type, size_t data_size, 80 enum GNUNET_BLOCK_Type type, size_t data_size,
@@ -131,7 +131,7 @@ struct GetRequestContext
131 /** 131 /**
132 * The key this request was about 132 * The key this request was about
133 */ 133 */
134 GNUNET_HashCode key; 134 struct GNUNET_HashCode key;
135 135
136 /** 136 /**
137 * Number of bytes in xquery. 137 * Number of bytes in xquery.
@@ -165,7 +165,7 @@ struct GetRequestContext
165 */ 165 */
166static int 166static int
167datacache_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 167datacache_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
168 const GNUNET_HashCode * key, size_t size, 168 const struct GNUNET_HashCode * key, size_t size,
169 const char *data, enum GNUNET_BLOCK_Type type) 169 const char *data, enum GNUNET_BLOCK_Type type)
170{ 170{
171 struct GetRequestContext *ctx = cls; 171 struct GetRequestContext *ctx = cls;
@@ -255,7 +255,7 @@ datacache_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
255 * @return evaluation result for the local replies 255 * @return evaluation result for the local replies
256 */ 256 */
257enum GNUNET_BLOCK_EvaluationResult 257enum GNUNET_BLOCK_EvaluationResult
258GDS_DATACACHE_handle_get (const GNUNET_HashCode * key, 258GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key,
259 enum GNUNET_BLOCK_Type type, const void *xquery, 259 enum GNUNET_BLOCK_Type type, const void *xquery,
260 size_t xquery_size, 260 size_t xquery_size,
261 struct GNUNET_CONTAINER_BloomFilter **reply_bf, 261 struct GNUNET_CONTAINER_BloomFilter **reply_bf,
diff --git a/src/dht/gnunet-service-dht_datacache.h b/src/dht/gnunet-service-dht_datacache.h
index 926ad5326..3889883b3 100644
--- a/src/dht/gnunet-service-dht_datacache.h
+++ b/src/dht/gnunet-service-dht_datacache.h
@@ -44,7 +44,7 @@
44 */ 44 */
45void 45void
46GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration, 46GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration,
47 const GNUNET_HashCode * key, 47 const struct GNUNET_HashCode * key,
48 unsigned int put_path_length, 48 unsigned int put_path_length,
49 const struct GNUNET_PeerIdentity *put_path, 49 const struct GNUNET_PeerIdentity *put_path,
50 enum GNUNET_BLOCK_Type type, size_t data_size, 50 enum GNUNET_BLOCK_Type type, size_t data_size,
@@ -63,7 +63,7 @@ GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration,
63 * @return evaluation result for the local replies 63 * @return evaluation result for the local replies
64 */ 64 */
65enum GNUNET_BLOCK_EvaluationResult 65enum GNUNET_BLOCK_EvaluationResult
66GDS_DATACACHE_handle_get (const GNUNET_HashCode * key, 66GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key,
67 enum GNUNET_BLOCK_Type type, const void *xquery, 67 enum GNUNET_BLOCK_Type type, const void *xquery,
68 size_t xquery_size, 68 size_t xquery_size,
69 struct GNUNET_CONTAINER_BloomFilter **reply_bf, 69 struct GNUNET_CONTAINER_BloomFilter **reply_bf,
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c
index b9cc45016..b4c5150c9 100644
--- a/src/dht/gnunet-service-dht_hello.c
+++ b/src/dht/gnunet-service-dht_hello.c
@@ -107,7 +107,7 @@ GDS_HELLO_init ()
107 * Free memory occopied by the HELLO. 107 * Free memory occopied by the HELLO.
108 */ 108 */
109static int 109static int
110free_hello (void *cls, const GNUNET_HashCode * key, void *hello) 110free_hello (void *cls, const struct GNUNET_HashCode * key, void *hello)
111{ 111{
112 GNUNET_free (hello); 112 GNUNET_free (hello);
113 return GNUNET_OK; 113 return GNUNET_OK;
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index dc91ac32d..891519314 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -52,7 +52,7 @@
52/** 52/**
53 * How many buckets will we allow total. 53 * How many buckets will we allow total.
54 */ 54 */
55#define MAX_BUCKETS sizeof (GNUNET_HashCode) * 8 55#define MAX_BUCKETS sizeof (struct GNUNET_HashCode) * 8
56 56
57/** 57/**
58 * What is the maximum number of peers in a given bucket. 58 * What is the maximum number of peers in a given bucket.
@@ -140,7 +140,7 @@ struct PeerPutMessage
140 /** 140 /**
141 * The key we are storing under. 141 * The key we are storing under.
142 */ 142 */
143 GNUNET_HashCode key; 143 struct GNUNET_HashCode key;
144 144
145 /* put path (if tracked) */ 145 /* put path (if tracked) */
146 146
@@ -182,7 +182,7 @@ struct PeerResultMessage
182 /** 182 /**
183 * The key of the corresponding GET request. 183 * The key of the corresponding GET request.
184 */ 184 */
185 GNUNET_HashCode key; 185 struct GNUNET_HashCode key;
186 186
187 /* put path (if tracked) */ 187 /* put path (if tracked) */
188 188
@@ -241,7 +241,7 @@ struct PeerGetMessage
241 /** 241 /**
242 * The key we are looking for. 242 * The key we are looking for.
243 */ 243 */
244 GNUNET_HashCode key; 244 struct GNUNET_HashCode key;
245 245
246 /* xquery */ 246 /* xquery */
247 247
@@ -424,7 +424,7 @@ static struct GNUNET_ATS_PerformanceHandle *atsAPI;
424 * on error (same hashcode) 424 * on error (same hashcode)
425 */ 425 */
426static int 426static int
427find_bucket (const GNUNET_HashCode * hc) 427find_bucket (const struct GNUNET_HashCode * hc)
428{ 428{
429 unsigned int bits; 429 unsigned int bits;
430 430
@@ -518,10 +518,10 @@ struct BloomConstructorContext
518 * @return GNUNET_YES (we should continue to iterate) 518 * @return GNUNET_YES (we should continue to iterate)
519 */ 519 */
520static int 520static int
521add_known_to_bloom (void *cls, const GNUNET_HashCode * key, void *value) 521add_known_to_bloom (void *cls, const struct GNUNET_HashCode * key, void *value)
522{ 522{
523 struct BloomConstructorContext *ctx = cls; 523 struct BloomConstructorContext *ctx = cls;
524 GNUNET_HashCode mh; 524 struct GNUNET_HashCode mh;
525 525
526 GNUNET_BLOCK_mingle_hash (key, ctx->bf_mutator, &mh); 526 GNUNET_BLOCK_mingle_hash (key, ctx->bf_mutator, &mh);
527 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 527 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -874,7 +874,7 @@ get_forward_count (uint32_t hop_count, uint32_t target_replication)
874 * the two hash codes increases 874 * the two hash codes increases
875 */ 875 */
876static unsigned int 876static unsigned int
877get_distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have) 877get_distance (const struct GNUNET_HashCode * target, const struct GNUNET_HashCode * have)
878{ 878{
879 unsigned int bucket; 879 unsigned int bucket;
880 unsigned int msb; 880 unsigned int msb;
@@ -911,7 +911,7 @@ get_distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have)
911 * mismatching bit at 'bucket' */ 911 * mismatching bit at 'bucket' */
912 lsb = 0; 912 lsb = 0;
913 for (i = bucket + 1; 913 for (i = bucket + 1;
914 (i < sizeof (GNUNET_HashCode) * 8) && (i < bucket + 1 + 32 - 9); i++) 914 (i < sizeof (struct GNUNET_HashCode) * 8) && (i < bucket + 1 + 32 - 9); i++)
915 { 915 {
916 if (GNUNET_CRYPTO_hash_get_bit (target, i) != 916 if (GNUNET_CRYPTO_hash_get_bit (target, i) !=
917 GNUNET_CRYPTO_hash_get_bit (have, i)) 917 GNUNET_CRYPTO_hash_get_bit (have, i))
@@ -934,7 +934,7 @@ get_distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have)
934 * GNUNET_NO otherwise. 934 * GNUNET_NO otherwise.
935 */ 935 */
936static int 936static int
937am_closest_peer (const GNUNET_HashCode * key, 937am_closest_peer (const struct GNUNET_HashCode * key,
938 const struct GNUNET_CONTAINER_BloomFilter *bloom) 938 const struct GNUNET_CONTAINER_BloomFilter *bloom)
939{ 939{
940 int bits; 940 int bits;
@@ -943,7 +943,7 @@ am_closest_peer (const GNUNET_HashCode * key,
943 int count; 943 int count;
944 struct PeerInfo *pos; 944 struct PeerInfo *pos;
945 945
946 if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (GNUNET_HashCode))) 946 if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (struct GNUNET_HashCode)))
947 return GNUNET_YES; 947 return GNUNET_YES;
948 bucket_num = find_bucket (key); 948 bucket_num = find_bucket (key);
949 GNUNET_assert (bucket_num >= 0); 949 GNUNET_assert (bucket_num >= 0);
@@ -989,7 +989,7 @@ am_closest_peer (const GNUNET_HashCode * key,
989 * @return Peer to route to, or NULL on error 989 * @return Peer to route to, or NULL on error
990 */ 990 */
991static struct PeerInfo * 991static struct PeerInfo *
992select_peer (const GNUNET_HashCode * key, 992select_peer (const struct GNUNET_HashCode * key,
993 const struct GNUNET_CONTAINER_BloomFilter *bloom, uint32_t hops) 993 const struct GNUNET_CONTAINER_BloomFilter *bloom, uint32_t hops)
994{ 994{
995 unsigned int bc; 995 unsigned int bc;
@@ -1115,7 +1115,7 @@ select_peer (const GNUNET_HashCode * key,
1115 * @return number of peers returned in 'targets'. 1115 * @return number of peers returned in 'targets'.
1116 */ 1116 */
1117static unsigned int 1117static unsigned int
1118get_target_peers (const GNUNET_HashCode * key, 1118get_target_peers (const struct GNUNET_HashCode * key,
1119 struct GNUNET_CONTAINER_BloomFilter *bloom, 1119 struct GNUNET_CONTAINER_BloomFilter *bloom,
1120 uint32_t hop_count, uint32_t target_replication, 1120 uint32_t hop_count, uint32_t target_replication,
1121 struct PeerInfo ***targets) 1121 struct PeerInfo ***targets)
@@ -1185,7 +1185,7 @@ GDS_NEIGHBOURS_handle_put (enum GNUNET_BLOCK_Type type,
1185 struct GNUNET_TIME_Absolute expiration_time, 1185 struct GNUNET_TIME_Absolute expiration_time,
1186 uint32_t hop_count, 1186 uint32_t hop_count,
1187 struct GNUNET_CONTAINER_BloomFilter *bf, 1187 struct GNUNET_CONTAINER_BloomFilter *bf,
1188 const GNUNET_HashCode * key, 1188 const struct GNUNET_HashCode * key,
1189 unsigned int put_path_length, 1189 unsigned int put_path_length,
1190 struct GNUNET_PeerIdentity *put_path, 1190 struct GNUNET_PeerIdentity *put_path,
1191 const void *data, size_t data_size) 1191 const void *data, size_t data_size)
@@ -1295,7 +1295,7 @@ void
1295GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type, 1295GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
1296 enum GNUNET_DHT_RouteOption options, 1296 enum GNUNET_DHT_RouteOption options,
1297 uint32_t desired_replication_level, 1297 uint32_t desired_replication_level,
1298 uint32_t hop_count, const GNUNET_HashCode * key, 1298 uint32_t hop_count, const struct GNUNET_HashCode * key,
1299 const void *xquery, size_t xquery_size, 1299 const void *xquery, size_t xquery_size,
1300 const struct GNUNET_CONTAINER_BloomFilter *reply_bf, 1300 const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
1301 uint32_t reply_bf_mutator, 1301 uint32_t reply_bf_mutator,
@@ -1405,7 +1405,7 @@ void
1405GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target, 1405GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target,
1406 enum GNUNET_BLOCK_Type type, 1406 enum GNUNET_BLOCK_Type type,
1407 struct GNUNET_TIME_Absolute expiration_time, 1407 struct GNUNET_TIME_Absolute expiration_time,
1408 const GNUNET_HashCode * key, 1408 const struct GNUNET_HashCode * key,
1409 unsigned int put_path_length, 1409 unsigned int put_path_length,
1410 const struct GNUNET_PeerIdentity *put_path, 1410 const struct GNUNET_PeerIdentity *put_path,
1411 unsigned int get_path_length, 1411 unsigned int get_path_length,
@@ -1508,7 +1508,7 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
1508 size_t payload_size; 1508 size_t payload_size;
1509 enum GNUNET_DHT_RouteOption options; 1509 enum GNUNET_DHT_RouteOption options;
1510 struct GNUNET_CONTAINER_BloomFilter *bf; 1510 struct GNUNET_CONTAINER_BloomFilter *bf;
1511 GNUNET_HashCode test_key; 1511 struct GNUNET_HashCode test_key;
1512 1512
1513 msize = ntohs (message->size); 1513 msize = ntohs (message->size);
1514 if (msize < sizeof (struct PeerPutMessage)) 1514 if (msize < sizeof (struct PeerPutMessage))
@@ -1541,7 +1541,7 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
1541 &test_key)) 1541 &test_key))
1542 { 1542 {
1543 case GNUNET_YES: 1543 case GNUNET_YES:
1544 if (0 != memcmp (&test_key, &put->key, sizeof (GNUNET_HashCode))) 1544 if (0 != memcmp (&test_key, &put->key, sizeof (struct GNUNET_HashCode)))
1545 { 1545 {
1546 GNUNET_break_op (0); 1546 GNUNET_break_op (0);
1547 return GNUNET_YES; 1547 return GNUNET_YES;
@@ -1615,14 +1615,14 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
1615 */ 1615 */
1616static void 1616static void
1617handle_find_peer (const struct GNUNET_PeerIdentity *sender, 1617handle_find_peer (const struct GNUNET_PeerIdentity *sender,
1618 const GNUNET_HashCode * key, 1618 const struct GNUNET_HashCode * key,
1619 struct GNUNET_CONTAINER_BloomFilter *bf, uint32_t bf_mutator) 1619 struct GNUNET_CONTAINER_BloomFilter *bf, uint32_t bf_mutator)
1620{ 1620{
1621 int bucket_idx; 1621 int bucket_idx;
1622 struct PeerBucket *bucket; 1622 struct PeerBucket *bucket;
1623 struct PeerInfo *peer; 1623 struct PeerInfo *peer;
1624 unsigned int choice; 1624 unsigned int choice;
1625 GNUNET_HashCode mhash; 1625 struct GNUNET_HashCode mhash;
1626 const struct GNUNET_HELLO_Message *hello; 1626 const struct GNUNET_HELLO_Message *hello;
1627 1627
1628 /* first, check about our own HELLO */ 1628 /* first, check about our own HELLO */
@@ -1657,7 +1657,7 @@ handle_find_peer (const struct GNUNET_PeerIdentity *sender,
1657 } 1657 }
1658 1658
1659 /* then, also consider sending a random HELLO from the closest bucket */ 1659 /* then, also consider sending a random HELLO from the closest bucket */
1660 if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (GNUNET_HashCode))) 1660 if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (struct GNUNET_HashCode)))
1661 bucket_idx = closest_bucket; 1661 bucket_idx = closest_bucket;
1662 else 1662 else
1663 bucket_idx = GNUNET_MIN (closest_bucket, find_bucket (key)); 1663 bucket_idx = GNUNET_MIN (closest_bucket, find_bucket (key));
diff --git a/src/dht/gnunet-service-dht_neighbours.h b/src/dht/gnunet-service-dht_neighbours.h
index 329763846..b3b33e318 100644
--- a/src/dht/gnunet-service-dht_neighbours.h
+++ b/src/dht/gnunet-service-dht_neighbours.h
@@ -57,7 +57,7 @@ GDS_NEIGHBOURS_handle_put (enum GNUNET_BLOCK_Type type,
57 struct GNUNET_TIME_Absolute expiration_time, 57 struct GNUNET_TIME_Absolute expiration_time,
58 uint32_t hop_count, 58 uint32_t hop_count,
59 struct GNUNET_CONTAINER_BloomFilter *bf, 59 struct GNUNET_CONTAINER_BloomFilter *bf,
60 const GNUNET_HashCode * key, 60 const struct GNUNET_HashCode * key,
61 unsigned int put_path_length, 61 unsigned int put_path_length,
62 struct GNUNET_PeerIdentity *put_path, 62 struct GNUNET_PeerIdentity *put_path,
63 const void *data, size_t data_size); 63 const void *data, size_t data_size);
@@ -84,7 +84,7 @@ void
84GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type, 84GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
85 enum GNUNET_DHT_RouteOption options, 85 enum GNUNET_DHT_RouteOption options,
86 uint32_t desired_replication_level, 86 uint32_t desired_replication_level,
87 uint32_t hop_count, const GNUNET_HashCode * key, 87 uint32_t hop_count, const struct GNUNET_HashCode * key,
88 const void *xquery, size_t xquery_size, 88 const void *xquery, size_t xquery_size,
89 const struct GNUNET_CONTAINER_BloomFilter *reply_bf, 89 const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
90 uint32_t reply_bf_mutator, 90 uint32_t reply_bf_mutator,
@@ -111,7 +111,7 @@ void
111GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target, 111GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target,
112 enum GNUNET_BLOCK_Type type, 112 enum GNUNET_BLOCK_Type type,
113 struct GNUNET_TIME_Absolute expiration_time, 113 struct GNUNET_TIME_Absolute expiration_time,
114 const GNUNET_HashCode * key, 114 const struct GNUNET_HashCode * key,
115 unsigned int put_path_length, 115 unsigned int put_path_length,
116 const struct GNUNET_PeerIdentity *put_path, 116 const struct GNUNET_PeerIdentity *put_path,
117 unsigned int get_path_length, 117 unsigned int get_path_length,
diff --git a/src/dht/gnunet-service-dht_routing.c b/src/dht/gnunet-service-dht_routing.c
index 013d8562f..c1dca4e21 100644
--- a/src/dht/gnunet-service-dht_routing.c
+++ b/src/dht/gnunet-service-dht_routing.c
@@ -50,7 +50,7 @@ struct RecentRequest
50 /** 50 /**
51 * Key of this request. 51 * Key of this request.
52 */ 52 */
53 GNUNET_HashCode key; 53 struct GNUNET_HashCode key;
54 54
55 /** 55 /**
56 * Position of this node in the min heap. 56 * Position of this node in the min heap.
@@ -160,15 +160,15 @@ struct ProcessContext
160 * GNUNET_SYSERR if the result is malformed or type unsupported 160 * GNUNET_SYSERR if the result is malformed or type unsupported
161 */ 161 */
162static int 162static int
163process (void *cls, const GNUNET_HashCode * key, void *value) 163process (void *cls, const struct GNUNET_HashCode * key, void *value)
164{ 164{
165 struct ProcessContext *pc = cls; 165 struct ProcessContext *pc = cls;
166 struct RecentRequest *rr = value; 166 struct RecentRequest *rr = value;
167 enum GNUNET_BLOCK_EvaluationResult eval; 167 enum GNUNET_BLOCK_EvaluationResult eval;
168 unsigned int gpl; 168 unsigned int gpl;
169 unsigned int ppl; 169 unsigned int ppl;
170 GNUNET_HashCode hc; 170 struct GNUNET_HashCode hc;
171 const GNUNET_HashCode *eval_key; 171 const struct GNUNET_HashCode *eval_key;
172 172
173 if ((rr->type != GNUNET_BLOCK_TYPE_ANY) && (rr->type != pc->type)) 173 if ((rr->type != GNUNET_BLOCK_TYPE_ANY) && (rr->type != pc->type))
174 return GNUNET_OK; /* type missmatch */ 174 return GNUNET_OK; /* type missmatch */
@@ -266,7 +266,7 @@ process (void *cls, const GNUNET_HashCode * key, void *value)
266void 266void
267GDS_ROUTING_process (enum GNUNET_BLOCK_Type type, 267GDS_ROUTING_process (enum GNUNET_BLOCK_Type type,
268 struct GNUNET_TIME_Absolute expiration_time, 268 struct GNUNET_TIME_Absolute expiration_time,
269 const GNUNET_HashCode * key, unsigned int put_path_length, 269 const struct GNUNET_HashCode * key, unsigned int put_path_length,
270 const struct GNUNET_PeerIdentity *put_path, 270 const struct GNUNET_PeerIdentity *put_path,
271 unsigned int get_path_length, 271 unsigned int get_path_length,
272 const struct GNUNET_PeerIdentity *get_path, 272 const struct GNUNET_PeerIdentity *get_path,
@@ -339,7 +339,7 @@ void
339GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender, 339GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender,
340 enum GNUNET_BLOCK_Type type, 340 enum GNUNET_BLOCK_Type type,
341 enum GNUNET_DHT_RouteOption options, 341 enum GNUNET_DHT_RouteOption options,
342 const GNUNET_HashCode * key, const void *xquery, 342 const struct GNUNET_HashCode * key, const void *xquery,
343 size_t xquery_size, 343 size_t xquery_size,
344 const struct GNUNET_CONTAINER_BloomFilter *reply_bf, 344 const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
345 uint32_t reply_bf_mutator) 345 uint32_t reply_bf_mutator)
diff --git a/src/dht/gnunet-service-dht_routing.h b/src/dht/gnunet-service-dht_routing.h
index 9b12c71de..56326aa60 100644
--- a/src/dht/gnunet-service-dht_routing.h
+++ b/src/dht/gnunet-service-dht_routing.h
@@ -51,7 +51,7 @@
51void 51void
52GDS_ROUTING_process (enum GNUNET_BLOCK_Type type, 52GDS_ROUTING_process (enum GNUNET_BLOCK_Type type,
53 struct GNUNET_TIME_Absolute expiration_time, 53 struct GNUNET_TIME_Absolute expiration_time,
54 const GNUNET_HashCode * key, unsigned int put_path_length, 54 const struct GNUNET_HashCode * key, unsigned int put_path_length,
55 const struct GNUNET_PeerIdentity *put_path, 55 const struct GNUNET_PeerIdentity *put_path,
56 unsigned int get_path_length, 56 unsigned int get_path_length,
57 const struct GNUNET_PeerIdentity *get_path, 57 const struct GNUNET_PeerIdentity *get_path,
@@ -74,7 +74,7 @@ void
74GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender, 74GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender,
75 enum GNUNET_BLOCK_Type type, 75 enum GNUNET_BLOCK_Type type,
76 enum GNUNET_DHT_RouteOption options, 76 enum GNUNET_DHT_RouteOption options,
77 const GNUNET_HashCode * key, const void *xquery, 77 const struct GNUNET_HashCode * key, const void *xquery,
78 size_t xquery_size, 78 size_t xquery_size,
79 const struct GNUNET_CONTAINER_BloomFilter *reply_bf, 79 const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
80 uint32_t reply_bf_mutator); 80 uint32_t reply_bf_mutator);
diff --git a/src/dht/plugin_block_dht.c b/src/dht/plugin_block_dht.c
index 3c016aedc..ac4732cff 100644
--- a/src/dht/plugin_block_dht.c
+++ b/src/dht/plugin_block_dht.c
@@ -51,13 +51,13 @@
51 */ 51 */
52static enum GNUNET_BLOCK_EvaluationResult 52static enum GNUNET_BLOCK_EvaluationResult
53block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type, 53block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
54 const GNUNET_HashCode * query, 54 const struct GNUNET_HashCode * query,
55 struct GNUNET_CONTAINER_BloomFilter **bf, 55 struct GNUNET_CONTAINER_BloomFilter **bf,
56 int32_t bf_mutator, const void *xquery, 56 int32_t bf_mutator, const void *xquery,
57 size_t xquery_size, const void *reply_block, 57 size_t xquery_size, const void *reply_block,
58 size_t reply_block_size) 58 size_t reply_block_size)
59{ 59{
60 GNUNET_HashCode mhash; 60 struct GNUNET_HashCode mhash;
61 const struct GNUNET_HELLO_Message *hello; 61 const struct GNUNET_HELLO_Message *hello;
62 struct GNUNET_PeerIdentity pid; 62 struct GNUNET_PeerIdentity pid;
63 const struct GNUNET_MessageHeader *msg; 63 const struct GNUNET_MessageHeader *msg;
@@ -122,7 +122,7 @@ block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
122static int 122static int
123block_plugin_dht_get_key (void *cls, enum GNUNET_BLOCK_Type type, 123block_plugin_dht_get_key (void *cls, enum GNUNET_BLOCK_Type type,
124 const void *block, size_t block_size, 124 const void *block, size_t block_size,
125 GNUNET_HashCode * key) 125 struct GNUNET_HashCode * key)
126{ 126{
127 const struct GNUNET_MessageHeader *msg; 127 const struct GNUNET_MessageHeader *msg;
128 const struct GNUNET_HELLO_Message *hello; 128 const struct GNUNET_HELLO_Message *hello;
diff --git a/src/dht/test_dht_api.c b/src/dht/test_dht_api.c
index 000ad3344..40d7f5b77 100644
--- a/src/dht/test_dht_api.c
+++ b/src/dht/test_dht_api.c
@@ -177,7 +177,7 @@ test_get_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
177 177
178static void 178static void
179test_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 179test_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
180 const GNUNET_HashCode * key, 180 const struct GNUNET_HashCode * key,
181 const struct GNUNET_PeerIdentity *get_path, 181 const struct GNUNET_PeerIdentity *get_path,
182 unsigned int get_path_length, 182 unsigned int get_path_length,
183 const struct GNUNET_PeerIdentity *put_path, 183 const struct GNUNET_PeerIdentity *put_path,
@@ -201,9 +201,9 @@ static void
201test_get (void *cls, int success) 201test_get (void *cls, int success)
202{ 202{
203 struct PeerContext *peer = cls; 203 struct PeerContext *peer = cls;
204 GNUNET_HashCode hash; 204 struct GNUNET_HashCode hash;
205 205
206 memset (&hash, 42, sizeof (GNUNET_HashCode)); 206 memset (&hash, 42, sizeof (struct GNUNET_HashCode));
207 207
208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_get!\n"); 208 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_get!\n");
209 209
@@ -238,11 +238,11 @@ static void
238test_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 238test_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
239{ 239{
240 struct PeerContext *peer = cls; 240 struct PeerContext *peer = cls;
241 GNUNET_HashCode hash; 241 struct GNUNET_HashCode hash;
242 char *data; 242 char *data;
243 size_t data_size = 42; 243 size_t data_size = 42;
244 244
245 memset (&hash, 42, sizeof (GNUNET_HashCode)); 245 memset (&hash, 42, sizeof (struct GNUNET_HashCode));
246 data = GNUNET_malloc (data_size); 246 data = GNUNET_malloc (data_size);
247 memset (data, 43, data_size); 247 memset (data, 43, data_size);
248 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_put!\n"); 248 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_put!\n");
diff --git a/src/dht/test_dht_monitor.c b/src/dht/test_dht_monitor.c
index 31c5e7bc4..77fa6609d 100644
--- a/src/dht/test_dht_monitor.c
+++ b/src/dht/test_dht_monitor.c
@@ -184,7 +184,7 @@ disconnect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
184 184
185static void 185static void
186dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 186dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
187 const GNUNET_HashCode * key, 187 const struct GNUNET_HashCode * key,
188 const struct GNUNET_PeerIdentity *get_path, 188 const struct GNUNET_PeerIdentity *get_path,
189 unsigned int get_path_length, 189 unsigned int get_path_length,
190 const struct GNUNET_PeerIdentity *put_path, 190 const struct GNUNET_PeerIdentity *put_path,
@@ -195,9 +195,9 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
195 195
196 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 196 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
197 "test: ************* FOUND!!! ***********\n"); 197 "test: ************* FOUND!!! ***********\n");
198 if (sizeof (GNUNET_HashCode) == size) 198 if (sizeof (struct GNUNET_HashCode) == size)
199 { 199 {
200 const GNUNET_HashCode *h = data; 200 const struct GNUNET_HashCode *h = data;
201 201
202 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Contents: %s\n", 202 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Contents: %s\n",
203 GNUNET_h2s_full (h)); 203 GNUNET_h2s_full (h));
@@ -314,7 +314,7 @@ monitor_get_cb (void *cls,
314 uint32_t desired_replication_level, 314 uint32_t desired_replication_level,
315 unsigned int path_length, 315 unsigned int path_length,
316 const struct GNUNET_PeerIdentity *path, 316 const struct GNUNET_PeerIdentity *path,
317 const GNUNET_HashCode * key) 317 const struct GNUNET_HashCode * key)
318{ 318{
319 const char *s_key; 319 const char *s_key;
320 unsigned int i; 320 unsigned int i;
@@ -355,7 +355,7 @@ monitor_put_cb (void *cls,
355 unsigned int path_length, 355 unsigned int path_length,
356 const struct GNUNET_PeerIdentity *path, 356 const struct GNUNET_PeerIdentity *path,
357 struct GNUNET_TIME_Absolute exp, 357 struct GNUNET_TIME_Absolute exp,
358 const GNUNET_HashCode * key, 358 const struct GNUNET_HashCode * key,
359 const void *data, 359 const void *data,
360 size_t size) 360 size_t size)
361{ 361{
@@ -397,7 +397,7 @@ monitor_res_cb (void *cls,
397 const struct GNUNET_PeerIdentity *put_path, 397 const struct GNUNET_PeerIdentity *put_path,
398 unsigned int put_path_length, 398 unsigned int put_path_length,
399 struct GNUNET_TIME_Absolute exp, 399 struct GNUNET_TIME_Absolute exp,
400 const GNUNET_HashCode * key, 400 const struct GNUNET_HashCode * key,
401 const void *data, 401 const void *data,
402 size_t size) 402 size_t size)
403{ 403{
diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c
index f4f99a633..656b4ac06 100644
--- a/src/dht/test_dht_multipeer.c
+++ b/src/dht/test_dht_multipeer.c
@@ -492,7 +492,7 @@ static void
492get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 492get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
493{ 493{
494 struct TestGetContext *test_get = cls; 494 struct TestGetContext *test_get = cls;
495 GNUNET_HashCode search_key; /* Key stored under */ 495 struct GNUNET_HashCode search_key; /* Key stored under */
496 char original_data[TEST_DATA_SIZE]; /* Made up data to store */ 496 char original_data[TEST_DATA_SIZE]; /* Made up data to store */
497 497
498 test_get->task = GNUNET_SCHEDULER_NO_TASK; 498 test_get->task = GNUNET_SCHEDULER_NO_TASK;
@@ -548,7 +548,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
548 */ 548 */
549static void 549static void
550get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 550get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
551 const GNUNET_HashCode * key, 551 const struct GNUNET_HashCode * key,
552 const struct GNUNET_PeerIdentity *get_path, 552 const struct GNUNET_PeerIdentity *get_path,
553 unsigned int get_path_length, 553 unsigned int get_path_length,
554 const struct GNUNET_PeerIdentity *put_path, 554 const struct GNUNET_PeerIdentity *put_path,
@@ -556,7 +556,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
556 size_t size, const void *data) 556 size_t size, const void *data)
557{ 557{
558 struct TestGetContext *test_get = cls; 558 struct TestGetContext *test_get = cls;
559 GNUNET_HashCode search_key; /* Key stored under */ 559 struct GNUNET_HashCode search_key; /* Key stored under */
560 char original_data[TEST_DATA_SIZE]; /* Made up data to store */ 560 char original_data[TEST_DATA_SIZE]; /* Made up data to store */
561 561
562 memset (original_data, test_get->uid, sizeof (original_data)); 562 memset (original_data, test_get->uid, sizeof (original_data));
@@ -586,7 +586,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
586 } 586 }
587#endif 587#endif
588 588
589 if ((0 != memcmp (&search_key, key, sizeof (GNUNET_HashCode))) || 589 if ((0 != memcmp (&search_key, key, sizeof (struct GNUNET_HashCode))) ||
590 (0 != memcmp (original_data, data, sizeof (original_data)))) 590 (0 != memcmp (original_data, data, sizeof (original_data))))
591 { 591 {
592 FPRINTF (stderr, "%s", "Key or data is not the same as was inserted!\n"); 592 FPRINTF (stderr, "%s", "Key or data is not the same as was inserted!\n");
@@ -606,7 +606,7 @@ static void
606do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 606do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
607{ 607{
608 struct TestGetContext *test_get = cls; 608 struct TestGetContext *test_get = cls;
609 GNUNET_HashCode key; /* Made up key to store data under */ 609 struct GNUNET_HashCode key; /* Made up key to store data under */
610 char data[TEST_DATA_SIZE]; /* Made up data to store */ 610 char data[TEST_DATA_SIZE]; /* Made up data to store */
611 611
612 if (outstanding_gets > MAX_OUTSTANDING_GETS) 612 if (outstanding_gets > MAX_OUTSTANDING_GETS)
@@ -700,7 +700,7 @@ static void
700do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 700do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
701{ 701{
702 struct TestPutContext *test_put = cls; 702 struct TestPutContext *test_put = cls;
703 GNUNET_HashCode key; /* Made up key to store data under */ 703 struct GNUNET_HashCode key; /* Made up key to store data under */
704 char data[TEST_DATA_SIZE]; /* Made up data to store */ 704 char data[TEST_DATA_SIZE]; /* Made up data to store */
705 705
706 test_put->task = GNUNET_SCHEDULER_NO_TASK; 706 test_put->task = GNUNET_SCHEDULER_NO_TASK;
diff --git a/src/dht/test_dht_topo.c b/src/dht/test_dht_topo.c
index 64918fe26..1dd867f2b 100644
--- a/src/dht/test_dht_topo.c
+++ b/src/dht/test_dht_topo.c
@@ -190,7 +190,7 @@ disconnect_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
190 190
191static void 191static void
192dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 192dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
193 const GNUNET_HashCode * key, 193 const struct GNUNET_HashCode * key,
194 const struct GNUNET_PeerIdentity *get_path, 194 const struct GNUNET_PeerIdentity *get_path,
195 unsigned int get_path_length, 195 unsigned int get_path_length,
196 const struct GNUNET_PeerIdentity *put_path, 196 const struct GNUNET_PeerIdentity *put_path,
@@ -199,9 +199,9 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
199{ 199{
200 int i; 200 int i;
201 201
202 if (sizeof (GNUNET_HashCode) == size) 202 if (sizeof (struct GNUNET_HashCode) == size)
203 { 203 {
204 const GNUNET_HashCode *h = data; 204 const struct GNUNET_HashCode *h = data;
205 205
206 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Contents: %s\n", 206 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Contents: %s\n",
207 GNUNET_h2s_full (h)); 207 GNUNET_h2s_full (h));
diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c
index a4664946f..8579013e3 100644
--- a/src/dht/test_dht_twopeer.c
+++ b/src/dht/test_dht_twopeer.c
@@ -169,7 +169,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
169 */ 169 */
170static void 170static void
171get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 171get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
172 const GNUNET_HashCode * key, 172 const struct GNUNET_HashCode * key,
173 const struct GNUNET_PeerIdentity *get_path, 173 const struct GNUNET_PeerIdentity *get_path,
174 unsigned int get_path_length, 174 unsigned int get_path_length,
175 const struct GNUNET_PeerIdentity *put_path, 175 const struct GNUNET_PeerIdentity *put_path,
@@ -179,7 +179,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
179 struct PeerGetContext *get_context = cls; 179 struct PeerGetContext *get_context = cls;
180 180
181 if (0 != 181 if (0 !=
182 memcmp (&get_context->peer->hashPubKey, key, sizeof (GNUNET_HashCode))) 182 memcmp (&get_context->peer->hashPubKey, key, sizeof (struct GNUNET_HashCode)))
183 { 183 {
184 FPRINTF (stderr, "%s", "??\n"); 184 FPRINTF (stderr, "%s", "??\n");
185 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 185 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/dht/test_dht_twopeer_get_put.c b/src/dht/test_dht_twopeer_get_put.c
index 775418fe1..3a27db21b 100644
--- a/src/dht/test_dht_twopeer_get_put.c
+++ b/src/dht/test_dht_twopeer_get_put.c
@@ -214,22 +214,22 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
214 */ 214 */
215void 215void
216get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 216get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
217 const GNUNET_HashCode * key, 217 const struct GNUNET_HashCode * key,
218 const struct GNUNET_PeerIdentity *get_path, 218 const struct GNUNET_PeerIdentity *get_path,
219 unsigned int get_path_size, 219 unsigned int get_path_size,
220 const struct GNUNET_PeerIdentity *put_path, 220 const struct GNUNET_PeerIdentity *put_path,
221 unsigned int put_path_size, enum GNUNET_BLOCK_Type type, 221 unsigned int put_path_size, enum GNUNET_BLOCK_Type type,
222 size_t size, const void *result_data) 222 size_t size, const void *result_data)
223{ 223{
224 GNUNET_HashCode original_key; /* Key data was stored data under */ 224 struct GNUNET_HashCode original_key; /* Key data was stored data under */
225 char original_data[4]; /* Made up data that was stored */ 225 char original_data[4]; /* Made up data that was stored */
226 226
227 memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */ 227 memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */
228 memset (original_data, 43, sizeof (original_data)); 228 memset (original_data, 43, sizeof (original_data));
229 229
230#if DNS 230#if DNS
231 if ((sizeof (original_data) != size) || 231 if ((sizeof (original_data) != size) ||
232 (0 != memcmp (&data.service_descriptor, key, sizeof (GNUNET_HashCode))) || 232 (0 != memcmp (&data.service_descriptor, key, sizeof (struct GNUNET_HashCode))) ||
233 (0 != memcmp ((char *) &data, result_data, sizeof (original_data)))) 233 (0 != memcmp ((char *) &data, result_data, sizeof (original_data))))
234 { 234 {
235 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 235 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -241,7 +241,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
241 } 241 }
242#else 242#else
243 if ((sizeof (original_data) != size) || 243 if ((sizeof (original_data) != size) ||
244 (0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) || 244 (0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) ||
245 (0 != memcmp (original_data, result_data, sizeof (original_data)))) 245 (0 != memcmp (original_data, result_data, sizeof (original_data))))
246 { 246 {
247 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 247 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -264,12 +264,12 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
264static void 264static void
265do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 265do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
266{ 266{
267 GNUNET_HashCode key; /* Key for data lookup */ 267 struct GNUNET_HashCode key; /* Key for data lookup */
268 268
269#if DNS 269#if DNS
270 memcpy (&key, &data.service_descriptor, sizeof (GNUNET_HashCode)); 270 memcpy (&key, &data.service_descriptor, sizeof (struct GNUNET_HashCode));
271#else 271#else
272 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ 272 memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
273#endif 273#endif
274 global_get_handle = 274 global_get_handle =
275 GNUNET_DHT_get_start (peer2dht, 275 GNUNET_DHT_get_start (peer2dht,
@@ -305,10 +305,10 @@ put_finished (void *cls, int success)
305static void 305static void
306do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 306do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
307{ 307{
308 GNUNET_HashCode key; /* Made up key to store data under */ 308 struct GNUNET_HashCode key; /* Made up key to store data under */
309 char data[4]; /* Made up data to store */ 309 char data[4]; /* Made up data to store */
310 310
311 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */ 311 memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
312 memset (data, 43, sizeof (data)); 312 memset (data, 43, sizeof (data));
313 313
314 /* Insert the data at the first peer */ 314 /* Insert the data at the first peer */
diff --git a/src/dht/test_dht_twopeer_path_tracking.c b/src/dht/test_dht_twopeer_path_tracking.c
index f45d3b6b7..86086b806 100644
--- a/src/dht/test_dht_twopeer_path_tracking.c
+++ b/src/dht/test_dht_twopeer_path_tracking.c
@@ -193,23 +193,23 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
193 */ 193 */
194static void 194static void
195get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 195get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
196 const GNUNET_HashCode * key, 196 const struct GNUNET_HashCode * key,
197 const struct GNUNET_PeerIdentity *get_path, 197 const struct GNUNET_PeerIdentity *get_path,
198 unsigned int get_path_length, 198 unsigned int get_path_length,
199 const struct GNUNET_PeerIdentity *put_path, 199 const struct GNUNET_PeerIdentity *put_path,
200 unsigned int put_path_length, enum GNUNET_BLOCK_Type type, 200 unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
201 size_t size, const void *data) 201 size_t size, const void *data)
202{ 202{
203 GNUNET_HashCode original_key; /* Key data was stored data under */ 203 struct GNUNET_HashCode original_key; /* Key data was stored data under */
204 char original_data[4]; /* Made up data that was stored */ 204 char original_data[4]; /* Made up data that was stored */
205 205
206 memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */ 206 memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */
207 memset (original_data, 43, sizeof (original_data)); 207 memset (original_data, 43, sizeof (original_data));
208#if VERBOSE 208#if VERBOSE
209 unsigned int i; 209 unsigned int i;
210#endif 210#endif
211 211
212 if ((0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) || 212 if ((0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) ||
213 (0 != memcmp (original_data, data, sizeof (original_data)))) 213 (0 != memcmp (original_data, data, sizeof (original_data))))
214 { 214 {
215 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 215 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -251,13 +251,13 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
251static void 251static void
252put_finished (void *cls, int success) 252put_finished (void *cls, int success)
253{ 253{
254 GNUNET_HashCode key; /* Key for data lookup */ 254 struct GNUNET_HashCode key; /* Key for data lookup */
255 255
256 GNUNET_SCHEDULER_cancel (die_task); 256 GNUNET_SCHEDULER_cancel (die_task);
257 die_task = 257 die_task =
258 GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly, 258 GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly,
259 "waiting for get response (data not found)"); 259 "waiting for get response (data not found)");
260 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ 260 memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
261 global_get_handle = 261 global_get_handle =
262 GNUNET_DHT_get_start (peer2dht, 262 GNUNET_DHT_get_start (peer2dht,
263 GNUNET_BLOCK_TYPE_TEST, &key, 1, 263 GNUNET_BLOCK_TYPE_TEST, &key, 1,
@@ -271,10 +271,10 @@ put_finished (void *cls, int success)
271static void 271static void
272do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 272do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
273{ 273{
274 GNUNET_HashCode key; /* Made up key to store data under */ 274 struct GNUNET_HashCode key; /* Made up key to store data under */
275 char data[4]; /* Made up data to store */ 275 char data[4]; /* Made up data to store */
276 276
277 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */ 277 memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
278 memset (data, 43, sizeof (data)); 278 memset (data, 43, sizeof (data));
279 279
280 /* Insert the data at the first peer */ 280 /* Insert the data at the first peer */
diff --git a/src/dht/test_dht_twopeer_put_get.c b/src/dht/test_dht_twopeer_put_get.c
index 9419194b9..d577a856a 100644
--- a/src/dht/test_dht_twopeer_put_get.c
+++ b/src/dht/test_dht_twopeer_put_get.c
@@ -217,21 +217,21 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
217 */ 217 */
218static void 218static void
219get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp, 219get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
220 const GNUNET_HashCode * key, 220 const struct GNUNET_HashCode * key,
221 const struct GNUNET_PeerIdentity *get_path, 221 const struct GNUNET_PeerIdentity *get_path,
222 unsigned int get_path_size, 222 unsigned int get_path_size,
223 const struct GNUNET_PeerIdentity *put_path, 223 const struct GNUNET_PeerIdentity *put_path,
224 unsigned int put_path_size, enum GNUNET_BLOCK_Type type, 224 unsigned int put_path_size, enum GNUNET_BLOCK_Type type,
225 size_t size, const void *result_data) 225 size_t size, const void *result_data)
226{ 226{
227 GNUNET_HashCode original_key; /* Key data was stored data under */ 227 struct GNUNET_HashCode original_key; /* Key data was stored data under */
228 char original_data[4]; /* Made up data that was stored */ 228 char original_data[4]; /* Made up data that was stored */
229 229
230 memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */ 230 memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */
231 memset (original_data, 43, sizeof (original_data)); 231 memset (original_data, 43, sizeof (original_data));
232 232
233 if ((sizeof (original_data) != size) || 233 if ((sizeof (original_data) != size) ||
234 (0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) || 234 (0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) ||
235 (0 != memcmp (original_data, result_data, sizeof (original_data)))) 235 (0 != memcmp (original_data, result_data, sizeof (original_data))))
236 { 236 {
237 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 237 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -256,7 +256,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
256static void 256static void
257put_finished (void *cls, int success) 257put_finished (void *cls, int success)
258{ 258{
259 GNUNET_HashCode key; /* Key for data lookup */ 259 struct GNUNET_HashCode key; /* Key for data lookup */
260 260
261 put_op = NULL; 261 put_op = NULL;
262 GNUNET_SCHEDULER_cancel (die_task); 262 GNUNET_SCHEDULER_cancel (die_task);
@@ -264,7 +264,7 @@ put_finished (void *cls, int success)
264 GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly, 264 GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly,
265 "waiting for get response (data not found)"); 265 "waiting for get response (data not found)");
266 266
267 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */ 267 memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
268 global_get_handle = 268 global_get_handle =
269 GNUNET_DHT_get_start (peer2dht, 269 GNUNET_DHT_get_start (peer2dht,
270 GNUNET_BLOCK_TYPE_TEST, &key, 1, GNUNET_DHT_RO_NONE, 270 GNUNET_BLOCK_TYPE_TEST, &key, 1, GNUNET_DHT_RO_NONE,
@@ -278,10 +278,10 @@ put_finished (void *cls, int success)
278static void 278static void
279do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 279do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
280{ 280{
281 GNUNET_HashCode key; /* Made up key to store data under */ 281 struct GNUNET_HashCode key; /* Made up key to store data under */
282 char data[4]; /* Made up data to store */ 282 char data[4]; /* Made up data to store */
283 283
284 memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */ 284 memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
285 memset (data, 43, sizeof (data)); 285 memset (data, 43, sizeof (data));
286 286
287 /* Insert the data at the first peer */ 287 /* Insert the data at the first peer */
diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c
index da8add50c..8ac1ef2b5 100644
--- a/src/dns/plugin_block_dns.c
+++ b/src/dns/plugin_block_dns.c
@@ -48,7 +48,7 @@
48 */ 48 */
49static enum GNUNET_BLOCK_EvaluationResult 49static enum GNUNET_BLOCK_EvaluationResult
50block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, 50block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
51 const GNUNET_HashCode * query, 51 const struct GNUNET_HashCode * query,
52 struct GNUNET_CONTAINER_BloomFilter **bf, 52 struct GNUNET_CONTAINER_BloomFilter **bf,
53 int32_t bf_mutator, const void *xquery, 53 int32_t bf_mutator, const void *xquery,
54 size_t xquery_size, const void *reply_block, 54 size_t xquery_size, const void *reply_block,
@@ -124,13 +124,13 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
124static int 124static int
125block_plugin_dns_get_key (void *cls, enum GNUNET_BLOCK_Type type, 125block_plugin_dns_get_key (void *cls, enum GNUNET_BLOCK_Type type,
126 const void *block, size_t block_size, 126 const void *block, size_t block_size,
127 GNUNET_HashCode * key) 127 struct GNUNET_HashCode * key)
128{ 128{
129 if (type != GNUNET_BLOCK_TYPE_DNS) 129 if (type != GNUNET_BLOCK_TYPE_DNS)
130 return GNUNET_SYSERR; 130 return GNUNET_SYSERR;
131 const struct GNUNET_DNS_Record *rec = block; 131 const struct GNUNET_DNS_Record *rec = block;
132 132
133 memcpy (key, &rec->service_descriptor, sizeof (GNUNET_HashCode)); 133 memcpy (key, &rec->service_descriptor, sizeof (struct GNUNET_HashCode));
134 return GNUNET_OK; 134 return GNUNET_OK;
135} 135}
136 136
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c
index 93891ca17..131503e6e 100644
--- a/src/dv/dv_api.c
+++ b/src/dv/dv_api.c
@@ -154,9 +154,9 @@ struct SendCallbackContext
154 * @param hash set to uid (extended with zeros) 154 * @param hash set to uid (extended with zeros)
155 */ 155 */
156static void 156static void
157hash_from_uid (uint32_t uid, GNUNET_HashCode * hash) 157hash_from_uid (uint32_t uid, struct GNUNET_HashCode * hash)
158{ 158{
159 memset (hash, 0, sizeof (GNUNET_HashCode)); 159 memset (hash, 0, sizeof (struct GNUNET_HashCode));
160 *((uint32_t *) hash) = uid; 160 *((uint32_t *) hash) = uid;
161} 161}
162 162
@@ -351,7 +351,7 @@ handle_message_receipt (void *cls, const struct GNUNET_MessageHeader *msg)
351 char *sender_address; 351 char *sender_address;
352 char *packed_msg; 352 char *packed_msg;
353 char *packed_msg_start; 353 char *packed_msg_start;
354 GNUNET_HashCode uidhash; 354 struct GNUNET_HashCode uidhash;
355 struct SendCallbackContext *send_ctx; 355 struct SendCallbackContext *send_ctx;
356 356
357 if (msg == NULL) 357 if (msg == NULL)
@@ -459,7 +459,7 @@ GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
459 struct GNUNET_DV_SendMessage *msg; 459 struct GNUNET_DV_SendMessage *msg;
460 struct SendCallbackContext *send_ctx; 460 struct SendCallbackContext *send_ctx;
461 char *end_of_message; 461 char *end_of_message;
462 GNUNET_HashCode uidhash; 462 struct GNUNET_HashCode uidhash;
463 int msize; 463 int msize;
464 464
465#if DEBUG_DV_MESSAGES 465#if DEBUG_DV_MESSAGES
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c
index 6ee95c051..5c0b6f5fa 100644
--- a/src/dv/gnunet-service-dv.c
+++ b/src/dv/gnunet-service-dv.c
@@ -681,7 +681,7 @@ find_destination (void *cls, struct GNUNET_CONTAINER_HeapNode *node,
681 * respective neighbor. 681 * respective neighbor.
682 */ 682 */
683static int 683static int
684find_specific_id (void *cls, const GNUNET_HashCode * key, void *value) 684find_specific_id (void *cls, const struct GNUNET_HashCode * key, void *value)
685{ 685{
686 struct FindIDContext *fdc = cls; 686 struct FindIDContext *fdc = cls;
687 struct DistantNeighbor *dn = value; 687 struct DistantNeighbor *dn = value;
@@ -704,7 +704,7 @@ find_specific_id (void *cls, const GNUNET_HashCode * key, void *value)
704 * route. 704 * route.
705 */ 705 */
706static int 706static int
707find_distant_peer (void *cls, const GNUNET_HashCode * key, void *value) 707find_distant_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
708{ 708{
709 struct FindDestinationContext *fdc = cls; 709 struct FindDestinationContext *fdc = cls;
710 struct DistantNeighbor *distant = value; 710 struct DistantNeighbor *distant = value;
@@ -1085,7 +1085,7 @@ send_message_via (const struct GNUNET_PeerIdentity *sender,
1085 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop 1085 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop
1086 */ 1086 */
1087static int 1087static int
1088find_least_cost_peer (void *cls, const GNUNET_HashCode * key, void *value) 1088find_least_cost_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
1089{ 1089{
1090 struct FindLeastCostContext *find_context = cls; 1090 struct FindLeastCostContext *find_context = cls;
1091 struct DistantNeighbor *dn = value; 1091 struct DistantNeighbor *dn = value;
@@ -1264,7 +1264,7 @@ struct CheckPeerContext
1264 * GNUNET_NO if not. 1264 * GNUNET_NO if not.
1265 */ 1265 */
1266int 1266int
1267checkPeerID (void *cls, const GNUNET_HashCode * key, void *value) 1267checkPeerID (void *cls, const struct GNUNET_HashCode * key, void *value)
1268{ 1268{
1269 struct CheckPeerContext *ctx = cls; 1269 struct CheckPeerContext *ctx = cls;
1270 struct DistantNeighbor *distant = value; 1270 struct DistantNeighbor *distant = value;
@@ -1661,7 +1661,7 @@ handle_dv_data_message (void *cls, const struct GNUNET_PeerIdentity *peer,
1661 * GNUNET_NO if not. 1661 * GNUNET_NO if not.
1662 */ 1662 */
1663int 1663int
1664print_neighbors (void *cls, const GNUNET_HashCode * key, void *abs_value) 1664print_neighbors (void *cls, const struct GNUNET_HashCode * key, void *abs_value)
1665{ 1665{
1666 struct DistantNeighbor *distant_neighbor = abs_value; 1666 struct DistantNeighbor *distant_neighbor = abs_value;
1667 char my_shortname[5]; 1667 char my_shortname[5];
@@ -1849,7 +1849,7 @@ handle_start (void *cls, struct GNUNET_SERVER_Client *client,
1849 * GNUNET_NO if not. 1849 * GNUNET_NO if not.
1850 */ 1850 */
1851int 1851int
1852send_iterator (void *cls, const GNUNET_HashCode * key, void *abs_value) 1852send_iterator (void *cls, const struct GNUNET_HashCode * key, void *abs_value)
1853{ 1853{
1854 struct DV_SendContext *send_context = cls; 1854 struct DV_SendContext *send_context = cls;
1855 struct DistantNeighbor *distant_neighbor = abs_value; 1855 struct DistantNeighbor *distant_neighbor = abs_value;
@@ -2174,7 +2174,7 @@ direct_neighbor_free (struct DirectNeighbor *direct)
2174 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop 2174 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop
2175 */ 2175 */
2176static int 2176static int
2177schedule_disconnect_messages (void *cls, const GNUNET_HashCode * key, 2177schedule_disconnect_messages (void *cls, const struct GNUNET_HashCode * key,
2178 void *value) 2178 void *value)
2179{ 2179{
2180 struct DisconnectContext *disconnect_context = cls; 2180 struct DisconnectContext *disconnect_context = cls;
@@ -2222,7 +2222,7 @@ schedule_disconnect_messages (void *cls, const GNUNET_HashCode * key,
2222 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop 2222 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop
2223 */ 2223 */
2224static int 2224static int
2225free_extended_neighbors (void *cls, const GNUNET_HashCode * key, void *value) 2225free_extended_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
2226{ 2226{
2227 struct DistantNeighbor *distant = value; 2227 struct DistantNeighbor *distant = value;
2228 2228
@@ -2240,7 +2240,7 @@ free_extended_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
2240 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop 2240 * @return GNUNET_YES to continue iteration, GNUNET_NO to stop
2241 */ 2241 */
2242static int 2242static int
2243free_direct_neighbors (void *cls, const GNUNET_HashCode * key, void *value) 2243free_direct_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
2244{ 2244{
2245 struct DirectNeighbor *direct = value; 2245 struct DirectNeighbor *direct = value;
2246 2246
@@ -2320,7 +2320,7 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
2320 * GNUNET_NO if not. 2320 * GNUNET_NO if not.
2321 */ 2321 */
2322static int 2322static int
2323add_pkey_to_extended (void *cls, const GNUNET_HashCode * key, void *abs_value) 2323add_pkey_to_extended (void *cls, const struct GNUNET_HashCode * key, void *abs_value)
2324{ 2324{
2325 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey = cls; 2325 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey = cls;
2326 struct DistantNeighbor *distant_neighbor = abs_value; 2326 struct DistantNeighbor *distant_neighbor = abs_value;
@@ -2348,7 +2348,7 @@ add_pkey_to_extended (void *cls, const GNUNET_HashCode * key, void *abs_value)
2348 * GNUNET_NO if not. 2348 * GNUNET_NO if not.
2349 */ 2349 */
2350static int 2350static int
2351update_matching_neighbors (void *cls, const GNUNET_HashCode * key, void *value) 2351update_matching_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
2352{ 2352{
2353 struct NeighborUpdateInfo *update_info = cls; 2353 struct NeighborUpdateInfo *update_info = cls;
2354 struct DistantNeighbor *distant_neighbor = value; 2354 struct DistantNeighbor *distant_neighbor = value;
@@ -2384,7 +2384,7 @@ update_matching_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
2384 * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise 2384 * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise
2385 */ 2385 */
2386static int 2386static int
2387add_distant_all_direct_neighbors (void *cls, const GNUNET_HashCode * key, 2387add_distant_all_direct_neighbors (void *cls, const struct GNUNET_HashCode * key,
2388 void *value) 2388 void *value)
2389{ 2389{
2390 struct DirectNeighbor *direct = (struct DirectNeighbor *) value; 2390 struct DirectNeighbor *direct = (struct DirectNeighbor *) value;
@@ -2837,7 +2837,7 @@ handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer,
2837 * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise 2837 * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise
2838 */ 2838 */
2839static int 2839static int
2840add_all_extended_peers (void *cls, const GNUNET_HashCode * key, void *value) 2840add_all_extended_peers (void *cls, const struct GNUNET_HashCode * key, void *value)
2841{ 2841{
2842 struct NeighborSendContext *send_context = (struct NeighborSendContext *) cls; 2842 struct NeighborSendContext *send_context = (struct NeighborSendContext *) cls;
2843 struct DistantNeighbor *distant = (struct DistantNeighbor *) value; 2843 struct DistantNeighbor *distant = (struct DistantNeighbor *) value;
@@ -2875,7 +2875,7 @@ add_all_extended_peers (void *cls, const GNUNET_HashCode * key, void *value)
2875 * GNUNET_NO if not. 2875 * GNUNET_NO if not.
2876 */ 2876 */
2877static int 2877static int
2878gossip_all_to_all_iterator (void *cls, const GNUNET_HashCode * key, 2878gossip_all_to_all_iterator (void *cls, const struct GNUNET_HashCode * key,
2879 void *abs_value) 2879 void *abs_value)
2880{ 2880{
2881 struct DirectNeighbor *direct = abs_value; 2881 struct DirectNeighbor *direct = abs_value;
@@ -2922,7 +2922,7 @@ gossip_all_to_all (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
2922 * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise 2922 * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise
2923 */ 2923 */
2924static int 2924static int
2925add_all_direct_neighbors (void *cls, const GNUNET_HashCode * key, void *value) 2925add_all_direct_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
2926{ 2926{
2927 struct DirectNeighbor *direct = (struct DirectNeighbor *) value; 2927 struct DirectNeighbor *direct = (struct DirectNeighbor *) value;
2928 struct DirectNeighbor *to = (struct DirectNeighbor *) cls; 2928 struct DirectNeighbor *to = (struct DirectNeighbor *) cls;
diff --git a/src/exit/exit.h b/src/exit/exit.h
index 90df26d7d..ff5e3f54c 100644
--- a/src/exit/exit.h
+++ b/src/exit/exit.h
@@ -49,7 +49,7 @@ struct GNUNET_EXIT_TcpServiceStartMessage
49 /** 49 /**
50 * Identification for the desired service. 50 * Identification for the desired service.
51 */ 51 */
52 GNUNET_HashCode service_descriptor; 52 struct GNUNET_HashCode service_descriptor;
53 53
54 /** 54 /**
55 * Skeleton of the TCP header to send. Port numbers are to 55 * Skeleton of the TCP header to send. Port numbers are to
@@ -142,7 +142,7 @@ struct GNUNET_EXIT_UdpServiceMessage
142 /** 142 /**
143 * Identification for the desired service. 143 * Identification for the desired service.
144 */ 144 */
145 GNUNET_HashCode service_descriptor; 145 struct GNUNET_HashCode service_descriptor;
146 146
147 /* followed by UDP payload */ 147 /* followed by UDP payload */
148}; 148};
@@ -230,7 +230,7 @@ struct GNUNET_EXIT_IcmpServiceMessage
230 /** 230 /**
231 * Identification for the desired service. 231 * Identification for the desired service.
232 */ 232 */
233 GNUNET_HashCode service_descriptor; 233 struct GNUNET_HashCode service_descriptor;
234 234
235 /** 235 /**
236 * ICMP header to use. 236 * ICMP header to use.
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 216625567..f23838776 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -189,7 +189,7 @@ struct TunnelState
189 /** 189 /**
190 * Key this state has in the connections_map. 190 * Key this state has in the connections_map.
191 */ 191 */
192 GNUNET_HashCode state_key; 192 struct GNUNET_HashCode state_key;
193 193
194 /** 194 /**
195 * Associated service record, or NULL for no service. 195 * Associated service record, or NULL for no service.
@@ -325,12 +325,12 @@ static int ipv6_enabled;
325 * @param ri information about the connection 325 * @param ri information about the connection
326 */ 326 */
327static void 327static void
328hash_redirect_info (GNUNET_HashCode *hash, 328hash_redirect_info (struct GNUNET_HashCode *hash,
329 const struct RedirectInformation *ri) 329 const struct RedirectInformation *ri)
330{ 330{
331 char *off; 331 char *off;
332 332
333 memset (hash, 0, sizeof (GNUNET_HashCode)); 333 memset (hash, 0, sizeof (struct GNUNET_HashCode));
334 /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash, 334 /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash,
335 so we put the IP address in there (and hope for few collisions) */ 335 so we put the IP address in there (and hope for few collisions) */
336 off = (char*) hash; 336 off = (char*) hash;
@@ -389,10 +389,10 @@ get_redirect_state (int af,
389 uint16_t destination_port, 389 uint16_t destination_port,
390 const void *local_ip, 390 const void *local_ip,
391 uint16_t local_port, 391 uint16_t local_port,
392 GNUNET_HashCode *state_key) 392 struct GNUNET_HashCode *state_key)
393{ 393{
394 struct RedirectInformation ri; 394 struct RedirectInformation ri;
395 GNUNET_HashCode key; 395 struct GNUNET_HashCode key;
396 struct TunnelState *state; 396 struct TunnelState *state;
397 397
398 if ( ( (af == AF_INET) && (protocol == IPPROTO_ICMP) ) || 398 if ( ( (af == AF_INET) && (protocol == IPPROTO_ICMP) ) ||
@@ -442,15 +442,15 @@ get_redirect_state (int af,
442 */ 442 */
443static struct LocalService * 443static struct LocalService *
444find_service (struct GNUNET_CONTAINER_MultiHashMap *service_map, 444find_service (struct GNUNET_CONTAINER_MultiHashMap *service_map,
445 const GNUNET_HashCode *desc, 445 const struct GNUNET_HashCode *desc,
446 uint16_t destination_port) 446 uint16_t destination_port)
447{ 447{
448 char key[sizeof (GNUNET_HashCode) + sizeof (uint16_t)]; 448 char key[sizeof (struct GNUNET_HashCode) + sizeof (uint16_t)];
449 449
450 memcpy (&key[0], &destination_port, sizeof (uint16_t)); 450 memcpy (&key[0], &destination_port, sizeof (uint16_t));
451 memcpy (&key[sizeof(uint16_t)], desc, sizeof (GNUNET_HashCode)); 451 memcpy (&key[sizeof(uint16_t)], desc, sizeof (struct GNUNET_HashCode));
452 return GNUNET_CONTAINER_multihashmap_get (service_map, 452 return GNUNET_CONTAINER_multihashmap_get (service_map,
453 (GNUNET_HashCode *) key); 453 (struct GNUNET_HashCode *) key);
454} 454}
455 455
456 456
@@ -464,7 +464,7 @@ find_service (struct GNUNET_CONTAINER_MultiHashMap *service_map,
464 */ 464 */
465static int 465static int
466free_service_record (void *cls, 466free_service_record (void *cls,
467 const GNUNET_HashCode *key, 467 const struct GNUNET_HashCode *key,
468 void *value) 468 void *value)
469{ 469{
470 struct LocalService *service = value; 470 struct LocalService *service = value;
@@ -490,20 +490,20 @@ store_service (struct GNUNET_CONTAINER_MultiHashMap *service_map,
490 uint16_t destination_port, 490 uint16_t destination_port,
491 struct LocalService *service) 491 struct LocalService *service)
492{ 492{
493 char key[sizeof (GNUNET_HashCode) + sizeof (uint16_t)]; 493 char key[sizeof (struct GNUNET_HashCode) + sizeof (uint16_t)];
494 GNUNET_HashCode desc; 494 struct GNUNET_HashCode desc;
495 495
496 GNUNET_CRYPTO_hash (name, strlen (name) + 1, &desc); 496 GNUNET_CRYPTO_hash (name, strlen (name) + 1, &desc);
497 service->name = GNUNET_strdup (name); 497 service->name = GNUNET_strdup (name);
498 memcpy (&key[0], &destination_port, sizeof (uint16_t)); 498 memcpy (&key[0], &destination_port, sizeof (uint16_t));
499 memcpy (&key[sizeof(uint16_t)], &desc, sizeof (GNUNET_HashCode)); 499 memcpy (&key[sizeof(uint16_t)], &desc, sizeof (struct GNUNET_HashCode));
500 if (GNUNET_OK != 500 if (GNUNET_OK !=
501 GNUNET_CONTAINER_multihashmap_put (service_map, 501 GNUNET_CONTAINER_multihashmap_put (service_map,
502 (GNUNET_HashCode *) key, 502 (struct GNUNET_HashCode *) key,
503 service, 503 service,
504 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) 504 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY))
505 { 505 {
506 free_service_record (NULL, (GNUNET_HashCode *) key, service); 506 free_service_record (NULL, (struct GNUNET_HashCode *) key, service);
507 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 507 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
508 _("Got duplicate service records for `%s:%u'\n"), 508 _("Got duplicate service records for `%s:%u'\n"),
509 name, 509 name,
@@ -1218,7 +1218,7 @@ setup_fresh_address (int af,
1218static void 1218static void
1219setup_state_record (struct TunnelState *state) 1219setup_state_record (struct TunnelState *state)
1220{ 1220{
1221 GNUNET_HashCode key; 1221 struct GNUNET_HashCode key;
1222 struct TunnelState *s; 1222 struct TunnelState *s;
1223 1223
1224 /* generate fresh, unique address */ 1224 /* generate fresh, unique address */
@@ -2733,7 +2733,7 @@ clean_tunnel (void *cls GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
2733 */ 2733 */
2734static int 2734static int
2735free_iterate (void *cls GNUNET_UNUSED, 2735free_iterate (void *cls GNUNET_UNUSED,
2736 const GNUNET_HashCode * hash GNUNET_UNUSED, void *value) 2736 const struct GNUNET_HashCode * hash GNUNET_UNUSED, void *value)
2737{ 2737{
2738 GNUNET_free (value); 2738 GNUNET_free (value);
2739 return GNUNET_YES; 2739 return GNUNET_YES;
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
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c
index d0c401f69..8f8340207 100644
--- a/src/gns/gnunet-service-gns.c
+++ b/src/gns/gnunet-service-gns.c
@@ -259,9 +259,9 @@ put_gns_record(void *cls,
259 struct GNSNameRecordBlock *nrb; 259 struct GNSNameRecordBlock *nrb;
260 struct GNUNET_CRYPTO_ShortHashCode name_hash; 260 struct GNUNET_CRYPTO_ShortHashCode name_hash;
261 struct GNUNET_CRYPTO_ShortHashCode zhash; 261 struct GNUNET_CRYPTO_ShortHashCode zhash;
262 GNUNET_HashCode xor_hash; 262 struct GNUNET_HashCode xor_hash;
263 GNUNET_HashCode name_hash_double; 263 struct GNUNET_HashCode name_hash_double;
264 GNUNET_HashCode zone_hash_double; 264 struct GNUNET_HashCode zone_hash_double;
265 uint32_t rd_payload_length; 265 uint32_t rd_payload_length;
266 char* nrb_data = NULL; 266 char* nrb_data = NULL;
267 size_t namelen; 267 size_t namelen;
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 15b959fc0..965f995a5 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -242,7 +242,7 @@ handle_auth_discovery_timeout(void *cls,
242static void 242static void
243process_auth_discovery_dht_result(void* cls, 243process_auth_discovery_dht_result(void* cls,
244 struct GNUNET_TIME_Absolute exp, 244 struct GNUNET_TIME_Absolute exp,
245 const GNUNET_HashCode * key, 245 const struct GNUNET_HashCode * key,
246 const struct GNUNET_PeerIdentity *get_path, 246 const struct GNUNET_PeerIdentity *get_path,
247 unsigned int get_path_length, 247 unsigned int get_path_length,
248 const struct GNUNET_PeerIdentity *put_path, 248 const struct GNUNET_PeerIdentity *put_path,
@@ -327,10 +327,10 @@ process_auth_discovery_ns_result(void* cls,
327{ 327{
328 uint32_t xquery; 328 uint32_t xquery;
329 struct GNUNET_CRYPTO_ShortHashCode name_hash; 329 struct GNUNET_CRYPTO_ShortHashCode name_hash;
330 GNUNET_HashCode lookup_key; 330 struct GNUNET_HashCode lookup_key;
331 struct GNUNET_CRYPTO_HashAsciiEncoded lookup_key_string; 331 struct GNUNET_CRYPTO_HashAsciiEncoded lookup_key_string;
332 GNUNET_HashCode name_hash_double; 332 struct GNUNET_HashCode name_hash_double;
333 GNUNET_HashCode zone_hash_double; 333 struct GNUNET_HashCode zone_hash_double;
334 int i; 334 int i;
335 struct GetPseuAuthorityHandle* gph = (struct GetPseuAuthorityHandle*)cls; 335 struct GetPseuAuthorityHandle* gph = (struct GetPseuAuthorityHandle*)cls;
336 336
@@ -692,7 +692,7 @@ dht_lookup_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
692static void 692static void
693process_record_result_dht(void* cls, 693process_record_result_dht(void* cls,
694 struct GNUNET_TIME_Absolute exp, 694 struct GNUNET_TIME_Absolute exp,
695 const GNUNET_HashCode * key, 695 const struct GNUNET_HashCode * key,
696 const struct GNUNET_PeerIdentity *get_path, 696 const struct GNUNET_PeerIdentity *get_path,
697 unsigned int get_path_length, 697 unsigned int get_path_length,
698 const struct GNUNET_PeerIdentity *put_path, 698 const struct GNUNET_PeerIdentity *put_path,
@@ -817,9 +817,9 @@ resolve_record_dht(struct ResolverHandle *rh)
817{ 817{
818 uint32_t xquery; 818 uint32_t xquery;
819 struct GNUNET_CRYPTO_ShortHashCode name_hash; 819 struct GNUNET_CRYPTO_ShortHashCode name_hash;
820 GNUNET_HashCode lookup_key; 820 struct GNUNET_HashCode lookup_key;
821 GNUNET_HashCode name_hash_double; 821 struct GNUNET_HashCode name_hash_double;
822 GNUNET_HashCode zone_hash_double; 822 struct GNUNET_HashCode zone_hash_double;
823 struct GNUNET_CRYPTO_HashAsciiEncoded lookup_key_string; 823 struct GNUNET_CRYPTO_HashAsciiEncoded lookup_key_string;
824 struct RecordLookupHandle *rlh = (struct RecordLookupHandle *)rh->proc_cls; 824 struct RecordLookupHandle *rlh = (struct RecordLookupHandle *)rh->proc_cls;
825 struct ResolverHandle *rh_heap_root; 825 struct ResolverHandle *rh_heap_root;
@@ -1158,7 +1158,7 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh,
1158static void 1158static void
1159process_delegation_result_dht(void* cls, 1159process_delegation_result_dht(void* cls,
1160 struct GNUNET_TIME_Absolute exp, 1160 struct GNUNET_TIME_Absolute exp,
1161 const GNUNET_HashCode * key, 1161 const struct GNUNET_HashCode * key,
1162 const struct GNUNET_PeerIdentity *get_path, 1162 const struct GNUNET_PeerIdentity *get_path,
1163 unsigned int get_path_length, 1163 unsigned int get_path_length,
1164 const struct GNUNET_PeerIdentity *put_path, 1164 const struct GNUNET_PeerIdentity *put_path,
@@ -1174,7 +1174,7 @@ process_delegation_result_dht(void* cls,
1174 int i; 1174 int i;
1175 int rd_size; 1175 int rd_size;
1176 struct GNUNET_CRYPTO_ShortHashCode zone, name_hash; 1176 struct GNUNET_CRYPTO_ShortHashCode zone, name_hash;
1177 GNUNET_HashCode zone_hash_double, name_hash_double; 1177 struct GNUNET_HashCode zone_hash_double, name_hash_double;
1178 1178
1179 rh = (struct ResolverHandle *)cls; 1179 rh = (struct ResolverHandle *)cls;
1180 1180
@@ -1692,9 +1692,9 @@ resolve_delegation_dht(struct ResolverHandle *rh)
1692{ 1692{
1693 uint32_t xquery; 1693 uint32_t xquery;
1694 struct GNUNET_CRYPTO_ShortHashCode name_hash; 1694 struct GNUNET_CRYPTO_ShortHashCode name_hash;
1695 GNUNET_HashCode name_hash_double; 1695 struct GNUNET_HashCode name_hash_double;
1696 GNUNET_HashCode zone_hash_double; 1696 struct GNUNET_HashCode zone_hash_double;
1697 GNUNET_HashCode lookup_key; 1697 struct GNUNET_HashCode lookup_key;
1698 struct ResolverHandle *rh_heap_root; 1698 struct ResolverHandle *rh_heap_root;
1699 1699
1700 pop_tld(rh->name, rh->authority_name); 1700 pop_tld(rh->name, rh->authority_name);
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c
index 5d986ce98..ba1fd56e1 100644
--- a/src/gns/plugin_block_gns.c
+++ b/src/gns/plugin_block_gns.c
@@ -56,18 +56,18 @@
56 */ 56 */
57static enum GNUNET_BLOCK_EvaluationResult 57static enum GNUNET_BLOCK_EvaluationResult
58block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, 58block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
59 const GNUNET_HashCode * query, 59 const struct GNUNET_HashCode * query,
60 struct GNUNET_CONTAINER_BloomFilter **bf, 60 struct GNUNET_CONTAINER_BloomFilter **bf,
61 int32_t bf_mutator, const void *xquery, 61 int32_t bf_mutator, const void *xquery,
62 size_t xquery_size, const void *reply_block, 62 size_t xquery_size, const void *reply_block,
63 size_t reply_block_size) 63 size_t reply_block_size)
64{ 64{
65 char* name; 65 char* name;
66 GNUNET_HashCode pkey_hash_double; 66 struct GNUNET_HashCode pkey_hash_double;
67 GNUNET_HashCode query_key; 67 struct GNUNET_HashCode query_key;
68 GNUNET_HashCode name_hash_double; 68 struct GNUNET_HashCode name_hash_double;
69 GNUNET_HashCode mhash; 69 struct GNUNET_HashCode mhash;
70 GNUNET_HashCode chash; 70 struct GNUNET_HashCode chash;
71 struct GNUNET_CRYPTO_ShortHashCode pkey_hash; 71 struct GNUNET_CRYPTO_ShortHashCode pkey_hash;
72 struct GNUNET_CRYPTO_ShortHashCode name_hash; 72 struct GNUNET_CRYPTO_ShortHashCode name_hash;
73 struct GNSNameRecordBlock *nrb; 73 struct GNSNameRecordBlock *nrb;
@@ -218,14 +218,14 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
218static int 218static int
219block_plugin_gns_get_key (void *cls, enum GNUNET_BLOCK_Type type, 219block_plugin_gns_get_key (void *cls, enum GNUNET_BLOCK_Type type,
220 const void *block, size_t block_size, 220 const void *block, size_t block_size,
221 GNUNET_HashCode * key) 221 struct GNUNET_HashCode * key)
222{ 222{
223 if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD) 223 if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD)
224 return GNUNET_SYSERR; 224 return GNUNET_SYSERR;
225 struct GNUNET_CRYPTO_ShortHashCode name_hash; 225 struct GNUNET_CRYPTO_ShortHashCode name_hash;
226 struct GNUNET_CRYPTO_ShortHashCode pkey_hash; 226 struct GNUNET_CRYPTO_ShortHashCode pkey_hash;
227 GNUNET_HashCode name_hash_double; 227 struct GNUNET_HashCode name_hash_double;
228 GNUNET_HashCode pkey_hash_double; 228 struct GNUNET_HashCode pkey_hash_double;
229 229
230 struct GNSNameRecordBlock *nrb = (struct GNSNameRecordBlock *)block; 230 struct GNSNameRecordBlock *nrb = (struct GNSNameRecordBlock *)block;
231 231
diff --git a/src/gns/test_gns_dht_delegated_lookup.c b/src/gns/test_gns_dht_delegated_lookup.c
index 0ab1c1ecb..e444023c8 100644
--- a/src/gns/test_gns_dht_delegated_lookup.c
+++ b/src/gns/test_gns_dht_delegated_lookup.c
@@ -202,9 +202,9 @@ put_dht(void *cls, int32_t success, const char *emsg)
202 struct GNSNameRecordBlock *nrb; 202 struct GNSNameRecordBlock *nrb;
203 struct GNUNET_CRYPTO_ShortHashCode name_hash; 203 struct GNUNET_CRYPTO_ShortHashCode name_hash;
204 struct GNUNET_CRYPTO_ShortHashCode zone_hash; 204 struct GNUNET_CRYPTO_ShortHashCode zone_hash;
205 GNUNET_HashCode xor_hash; 205 struct GNUNET_HashCode xor_hash;
206 GNUNET_HashCode name_hash_double; 206 struct GNUNET_HashCode name_hash_double;
207 GNUNET_HashCode zone_hash_double; 207 struct GNUNET_HashCode zone_hash_double;
208 uint32_t rd_payload_length; 208 uint32_t rd_payload_length;
209 char* nrb_data = NULL; 209 char* nrb_data = NULL;
210 struct GNUNET_CRYPTO_RsaSignature *sig; 210 struct GNUNET_CRYPTO_RsaSignature *sig;
diff --git a/src/gns/test_gns_pseu_shorten.c b/src/gns/test_gns_pseu_shorten.c
index d5e0cee78..88fe17c29 100644
--- a/src/gns/test_gns_pseu_shorten.c
+++ b/src/gns/test_gns_pseu_shorten.c
@@ -270,9 +270,9 @@ put_pseu_dht(void *cls, int success)
270 struct GNSNameRecordBlock *nrb; 270 struct GNSNameRecordBlock *nrb;
271 struct GNUNET_CRYPTO_ShortHashCode name_hash; 271 struct GNUNET_CRYPTO_ShortHashCode name_hash;
272 struct GNUNET_CRYPTO_ShortHashCode zone_hash; 272 struct GNUNET_CRYPTO_ShortHashCode zone_hash;
273 GNUNET_HashCode xor_hash; 273 struct GNUNET_HashCode xor_hash;
274 GNUNET_HashCode name_hash_double; 274 struct GNUNET_HashCode name_hash_double;
275 GNUNET_HashCode zone_hash_double; 275 struct GNUNET_HashCode zone_hash_double;
276 uint32_t rd_payload_length; 276 uint32_t rd_payload_length;
277 char* nrb_data = NULL; 277 char* nrb_data = NULL;
278 struct GNUNET_CRYPTO_RsaSignature *sig; 278 struct GNUNET_CRYPTO_RsaSignature *sig;
@@ -348,9 +348,9 @@ put_www_dht(void *cls, int success)
348 struct GNSNameRecordBlock *nrb; 348 struct GNSNameRecordBlock *nrb;
349 struct GNUNET_CRYPTO_ShortHashCode name_hash; 349 struct GNUNET_CRYPTO_ShortHashCode name_hash;
350 struct GNUNET_CRYPTO_ShortHashCode zone_hash; 350 struct GNUNET_CRYPTO_ShortHashCode zone_hash;
351 GNUNET_HashCode xor_hash; 351 struct GNUNET_HashCode xor_hash;
352 GNUNET_HashCode name_hash_double; 352 struct GNUNET_HashCode name_hash_double;
353 GNUNET_HashCode zone_hash_double; 353 struct GNUNET_HashCode zone_hash_double;
354 uint32_t rd_payload_length; 354 uint32_t rd_payload_length;
355 char* nrb_data = NULL; 355 char* nrb_data = NULL;
356 struct GNUNET_CRYPTO_RsaSignature *sig; 356 struct GNUNET_CRYPTO_RsaSignature *sig;
@@ -428,9 +428,9 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg)
428 struct GNSNameRecordBlock *nrb; 428 struct GNSNameRecordBlock *nrb;
429 struct GNUNET_CRYPTO_ShortHashCode name_hash; 429 struct GNUNET_CRYPTO_ShortHashCode name_hash;
430 struct GNUNET_CRYPTO_ShortHashCode zone_hash; 430 struct GNUNET_CRYPTO_ShortHashCode zone_hash;
431 GNUNET_HashCode xor_hash; 431 struct GNUNET_HashCode xor_hash;
432 GNUNET_HashCode name_hash_double; 432 struct GNUNET_HashCode name_hash_double;
433 GNUNET_HashCode zone_hash_double; 433 struct GNUNET_HashCode zone_hash_double;
434 uint32_t rd_payload_length; 434 uint32_t rd_payload_length;
435 char* nrb_data = NULL; 435 char* nrb_data = NULL;
436 struct GNUNET_CRYPTO_RsaSignature *sig; 436 struct GNUNET_CRYPTO_RsaSignature *sig;
diff --git a/src/include/block_dns.h b/src/include/block_dns.h
index e047779c5..0ca5a47a5 100644
--- a/src/include/block_dns.h
+++ b/src/include/block_dns.h
@@ -64,7 +64,7 @@ struct GNUNET_DNS_Record
64 * The descriptor for the service 64 * The descriptor for the service
65 * (a peer may provide more than one service) 65 * (a peer may provide more than one service)
66 */ 66 */
67 GNUNET_HashCode service_descriptor; 67 struct GNUNET_HashCode service_descriptor;
68 68
69 /** 69 /**
70 * When does this record expire? 70 * When does this record expire?
diff --git a/src/include/block_fs.h b/src/include/block_fs.h
index aae741e60..0b77adc49 100644
--- a/src/include/block_fs.h
+++ b/src/include/block_fs.h
@@ -78,7 +78,7 @@ struct SBlock
78 * used as the key for decryption; the xor of this identifier 78 * used as the key for decryption; the xor of this identifier
79 * and the hash of the "keyspace" is the datastore-query hash). 79 * and the hash of the "keyspace" is the datastore-query hash).
80 */ 80 */
81 GNUNET_HashCode identifier; 81 struct GNUNET_HashCode identifier;
82 82
83 /** 83 /**
84 * Public key of the namespace. 84 * Public key of the namespace.
@@ -153,7 +153,7 @@ struct OnDemandBlock
153 * file that was indexed (used to uniquely 153 * file that was indexed (used to uniquely
154 * identify the plaintext file). 154 * identify the plaintext file).
155 */ 155 */
156 GNUNET_HashCode file_id; 156 struct GNUNET_HashCode file_id;
157 157
158 /** 158 /**
159 * At which offset should we be able to find 159 * At which offset should we be able to find
diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h
index adc17751d..41001fb0b 100644
--- a/src/include/gnunet_block_lib.h
+++ b/src/include/gnunet_block_lib.h
@@ -160,8 +160,8 @@ struct GNUNET_BLOCK_Context;
160 * @param hc where to store the result. 160 * @param hc where to store the result.
161 */ 161 */
162void 162void
163GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, uint32_t mingle_number, 163GNUNET_BLOCK_mingle_hash (const struct GNUNET_HashCode * in, uint32_t mingle_number,
164 GNUNET_HashCode * hc); 164 struct GNUNET_HashCode * hc);
165 165
166 166
167/** 167/**
@@ -204,7 +204,7 @@ GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
204enum GNUNET_BLOCK_EvaluationResult 204enum GNUNET_BLOCK_EvaluationResult
205GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, 205GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
206 enum GNUNET_BLOCK_Type type, 206 enum GNUNET_BLOCK_Type type,
207 const GNUNET_HashCode * query, 207 const struct GNUNET_HashCode * query,
208 struct GNUNET_CONTAINER_BloomFilter **bf, 208 struct GNUNET_CONTAINER_BloomFilter **bf,
209 int32_t bf_mutator, const void *xquery, 209 int32_t bf_mutator, const void *xquery,
210 size_t xquery_size, const void *reply_block, 210 size_t xquery_size, const void *reply_block,
@@ -227,7 +227,7 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
227int 227int
228GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx, 228GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
229 enum GNUNET_BLOCK_Type type, const void *block, 229 enum GNUNET_BLOCK_Type type, const void *block,
230 size_t block_size, GNUNET_HashCode * key); 230 size_t block_size, struct GNUNET_HashCode * key);
231 231
232 232
233 233
@@ -243,7 +243,7 @@ GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
243 */ 243 */
244struct GNUNET_CONTAINER_BloomFilter * 244struct GNUNET_CONTAINER_BloomFilter *
245GNUNET_BLOCK_construct_bloomfilter (int32_t bf_mutator, 245GNUNET_BLOCK_construct_bloomfilter (int32_t bf_mutator,
246 const GNUNET_HashCode * seen_results, 246 const struct GNUNET_HashCode * seen_results,
247 unsigned int seen_results_count); 247 unsigned int seen_results_count);
248 248
249 249
diff --git a/src/include/gnunet_block_plugin.h b/src/include/gnunet_block_plugin.h
index 0ead4afad..ac549fec7 100644
--- a/src/include/gnunet_block_plugin.h
+++ b/src/include/gnunet_block_plugin.h
@@ -56,7 +56,7 @@ typedef enum
56 GNUNET_BLOCK_Type 56 GNUNET_BLOCK_Type
57 type, 57 type,
58 const 58 const
59 GNUNET_HashCode 59 struct GNUNET_HashCode
60 * query, 60 * query,
61 struct 61 struct
62 GNUNET_CONTAINER_BloomFilter 62 GNUNET_CONTAINER_BloomFilter
@@ -90,7 +90,7 @@ typedef int (*GNUNET_BLOCK_GetKeyFunction) (void *cls,
90 enum GNUNET_BLOCK_Type type, 90 enum GNUNET_BLOCK_Type type,
91 const void *block, 91 const void *block,
92 size_t block_size, 92 size_t block_size,
93 GNUNET_HashCode * key); 93 struct GNUNET_HashCode * key);
94 94
95 95
96 96
diff --git a/src/include/gnunet_chat_service.h b/src/include/gnunet_chat_service.h
index 938b43423..8e77f9b65 100644
--- a/src/include/gnunet_chat_service.h
+++ b/src/include/gnunet_chat_service.h
@@ -111,7 +111,7 @@ typedef int (*GNUNET_CHAT_JoinCallback) (void *cls);
111 */ 111 */
112typedef int (*GNUNET_CHAT_MessageCallback) (void *cls, 112typedef int (*GNUNET_CHAT_MessageCallback) (void *cls,
113 struct GNUNET_CHAT_Room * room, 113 struct GNUNET_CHAT_Room * room,
114 const GNUNET_HashCode * sender, 114 const struct GNUNET_HashCode * sender,
115 const struct 115 const struct
116 GNUNET_CONTAINER_MetaData * 116 GNUNET_CONTAINER_MetaData *
117 member_info, const char *message, 117 member_info, const char *message,
@@ -156,7 +156,7 @@ typedef int (*GNUNET_CHAT_MessageConfirmation) (void *cls,
156 uint32_t orig_seq_number, 156 uint32_t orig_seq_number,
157 struct GNUNET_TIME_Absolute 157 struct GNUNET_TIME_Absolute
158 timestamp, 158 timestamp,
159 const GNUNET_HashCode * 159 const struct GNUNET_HashCode *
160 receiver); 160 receiver);
161 161
162/** 162/**
@@ -195,7 +195,7 @@ GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
195 GNUNET_CHAT_MemberListCallback memberCallback, 195 GNUNET_CHAT_MemberListCallback memberCallback,
196 void *member_cls, 196 void *member_cls,
197 GNUNET_CHAT_MessageConfirmation confirmationCallback, 197 GNUNET_CHAT_MessageConfirmation confirmationCallback,
198 void *confirmation_cls, GNUNET_HashCode * me); 198 void *confirmation_cls, struct GNUNET_HashCode * me);
199 199
200/** 200/**
201 * Send a message. 201 * Send a message.
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 9f776587e..63a154390 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -224,11 +224,10 @@ struct GNUNET_MessageHeader
224/** 224/**
225 * @brief 512-bit hashcode 225 * @brief 512-bit hashcode
226 */ 226 */
227typedef struct GNUNET_HashCode 227struct GNUNET_HashCode
228{ 228{
229 uint32_t bits[512 / 8 / sizeof (uint32_t)]; /* = 16 */ 229 uint32_t bits[512 / 8 / sizeof (uint32_t)]; /* = 16 */
230} 230};
231GNUNET_HashCode;
232 231
233 232
234/** 233/**
@@ -237,7 +236,7 @@ GNUNET_HashCode;
237 */ 236 */
238struct GNUNET_PeerIdentity 237struct GNUNET_PeerIdentity
239{ 238{
240 GNUNET_HashCode hashPubKey; 239 struct GNUNET_HashCode hashPubKey;
241}; 240};
242GNUNET_NETWORK_STRUCT_END 241GNUNET_NETWORK_STRUCT_END
243 242
@@ -428,7 +427,7 @@ GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
428 * @return string 427 * @return string
429 */ 428 */
430const char * 429const char *
431GNUNET_h2s (const GNUNET_HashCode * hc); 430GNUNET_h2s (const struct GNUNET_HashCode * hc);
432 431
433 432
434/** 433/**
@@ -441,7 +440,7 @@ GNUNET_h2s (const GNUNET_HashCode * hc);
441 * @return string 440 * @return string
442 */ 441 */
443const char * 442const char *
444GNUNET_h2s_full (const GNUNET_HashCode * hc); 443GNUNET_h2s_full (const struct GNUNET_HashCode * hc);
445 444
446 445
447/** 446/**
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h
index 771b473e8..93eec8ded 100644
--- a/src/include/gnunet_constants.h
+++ b/src/include/gnunet_constants.h
@@ -116,7 +116,7 @@ extern "C"
116 * Size of the 'struct EncryptedMessage' of the core (which 116 * Size of the 'struct EncryptedMessage' of the core (which
117 * is the per-message overhead of the core). 117 * is the per-message overhead of the core).
118 */ 118 */
119#define GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE (24 + sizeof (GNUNET_HashCode)) 119#define GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE (24 + sizeof (struct GNUNET_HashCode))
120 120
121/** 121/**
122 * Size of the 'struct OutboundMessage' of the transport 122 * Size of the 'struct OutboundMessage' of the transport
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h
index a78d8cc8f..d9f17d6a8 100644
--- a/src/include/gnunet_container_lib.h
+++ b/src/include/gnunet_container_lib.h
@@ -62,7 +62,7 @@ struct GNUNET_CONTAINER_BloomFilter;
62 * @return GNUNET_YES if next was updated 62 * @return GNUNET_YES if next was updated
63 * GNUNET_NO if there are no more entries 63 * GNUNET_NO if there are no more entries
64 */ 64 */
65typedef int (*GNUNET_HashCodeIterator) (void *cls, GNUNET_HashCode * next); 65typedef int (*GNUNET_HashCodeIterator) (void *cls, struct GNUNET_HashCode * next);
66 66
67 67
68/** 68/**
@@ -121,7 +121,7 @@ GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
121 */ 121 */
122int 122int
123GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter 123GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
124 *bf, const GNUNET_HashCode * e); 124 *bf, const struct GNUNET_HashCode * e);
125 125
126 126
127/** 127/**
@@ -131,7 +131,7 @@ GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
131 */ 131 */
132void 132void
133GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf, 133GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
134 const GNUNET_HashCode * e); 134 const struct GNUNET_HashCode * e);
135 135
136 136
137/** 137/**
@@ -141,7 +141,7 @@ GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
141 */ 141 */
142void 142void
143GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf, 143GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf,
144 const GNUNET_HashCode * e); 144 const struct GNUNET_HashCode * e);
145 145
146 146
147/** 147/**
@@ -534,7 +534,7 @@ enum GNUNET_CONTAINER_MultiHashMapOption
534 * GNUNET_NO if not. 534 * GNUNET_NO if not.
535 */ 535 */
536typedef int (*GNUNET_CONTAINER_HashMapIterator) (void *cls, 536typedef int (*GNUNET_CONTAINER_HashMapIterator) (void *cls,
537 const GNUNET_HashCode * key, 537 const struct GNUNET_HashCode * key,
538 void *value); 538 void *value);
539 539
540 540
@@ -571,7 +571,7 @@ GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
571 */ 571 */
572void * 572void *
573GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap 573GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
574 *map, const GNUNET_HashCode * key); 574 *map, const struct GNUNET_HashCode * key);
575 575
576 576
577/** 577/**
@@ -587,7 +587,7 @@ GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
587 */ 587 */
588int 588int
589GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map, 589GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
590 const GNUNET_HashCode * key, void *value); 590 const struct GNUNET_HashCode * key, void *value);
591 591
592/** 592/**
593 * Remove all entries for the given key from the map. 593 * Remove all entries for the given key from the map.
@@ -599,7 +599,7 @@ GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
599 */ 599 */
600int 600int
601GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap 601GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
602 *map, const GNUNET_HashCode * key); 602 *map, const struct GNUNET_HashCode * key);
603 603
604 604
605/** 605/**
@@ -614,7 +614,7 @@ GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
614int 614int
615GNUNET_CONTAINER_multihashmap_contains (const struct 615GNUNET_CONTAINER_multihashmap_contains (const struct
616 GNUNET_CONTAINER_MultiHashMap *map, 616 GNUNET_CONTAINER_MultiHashMap *map,
617 const GNUNET_HashCode * key); 617 const struct GNUNET_HashCode * key);
618 618
619 619
620/** 620/**
@@ -630,7 +630,7 @@ GNUNET_CONTAINER_multihashmap_contains (const struct
630int 630int
631GNUNET_CONTAINER_multihashmap_contains_value (const struct 631GNUNET_CONTAINER_multihashmap_contains_value (const struct
632 GNUNET_CONTAINER_MultiHashMap 632 GNUNET_CONTAINER_MultiHashMap
633 *map, const GNUNET_HashCode * key, 633 *map, const struct GNUNET_HashCode * key,
634 const void *value); 634 const void *value);
635 635
636 636
@@ -648,7 +648,7 @@ GNUNET_CONTAINER_multihashmap_contains_value (const struct
648 */ 648 */
649int 649int
650GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map, 650GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
651 const GNUNET_HashCode * key, void *value, 651 const struct GNUNET_HashCode * key, void *value,
652 enum GNUNET_CONTAINER_MultiHashMapOption 652 enum GNUNET_CONTAINER_MultiHashMapOption
653 opt); 653 opt);
654 654
@@ -692,7 +692,7 @@ GNUNET_CONTAINER_multihashmap_iterate (const struct
692int 692int
693GNUNET_CONTAINER_multihashmap_get_multiple (const struct 693GNUNET_CONTAINER_multihashmap_get_multiple (const struct
694 GNUNET_CONTAINER_MultiHashMap *map, 694 GNUNET_CONTAINER_MultiHashMap *map,
695 const GNUNET_HashCode * key, 695 const struct GNUNET_HashCode * key,
696 GNUNET_CONTAINER_HashMapIterator it, 696 GNUNET_CONTAINER_HashMapIterator it,
697 void *it_cls); 697 void *it_cls);
698 698
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 777ddd97e..879b1cae2 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -129,7 +129,7 @@ GNUNET_NETWORK_STRUCT_END
129 129
130 130
131/** 131/**
132 * @brief 0-terminated ASCII encoding of a GNUNET_HashCode. 132 * @brief 0-terminated ASCII encoding of a struct GNUNET_HashCode.
133 */ 133 */
134struct GNUNET_CRYPTO_HashAsciiEncoded 134struct GNUNET_CRYPTO_HashAsciiEncoded
135{ 135{
@@ -251,7 +251,7 @@ GNUNET_NETWORK_STRUCT_END
251 * @brief IV for sym cipher 251 * @brief IV for sym cipher
252 * 252 *
253 * NOTE: must be smaller (!) in size than the 253 * NOTE: must be smaller (!) in size than the
254 * GNUNET_HashCode. 254 * struct GNUNET_HashCode.
255 */ 255 */
256struct GNUNET_CRYPTO_AesInitializationVector 256struct GNUNET_CRYPTO_AesInitializationVector
257{ 257{
@@ -448,7 +448,7 @@ GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector *iv,
448 * safely cast to char*, a '\\0' termination is set). 448 * safely cast to char*, a '\\0' termination is set).
449 */ 449 */
450void 450void
451GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block, 451GNUNET_CRYPTO_hash_to_enc (const struct GNUNET_HashCode * block,
452 struct GNUNET_CRYPTO_HashAsciiEncoded *result); 452 struct GNUNET_CRYPTO_HashAsciiEncoded *result);
453 453
454 454
@@ -465,7 +465,7 @@ GNUNET_CRYPTO_short_hash_to_enc (const struct GNUNET_CRYPTO_ShortHashCode * bloc
465 465
466 466
467/** 467/**
468 * Convert ASCII encoding back to a 'GNUNET_HashCode' 468 * Convert ASCII encoding back to a 'struct GNUNET_HashCode'
469 * 469 *
470 * @param enc the encoding 470 * @param enc the encoding
471 * @param enclen number of characters in 'enc' (without 0-terminator, which can be missing) 471 * @param enclen number of characters in 'enc' (without 0-terminator, which can be missing)
@@ -474,7 +474,7 @@ GNUNET_CRYPTO_short_hash_to_enc (const struct GNUNET_CRYPTO_ShortHashCode * bloc
474 */ 474 */
475int 475int
476GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen, 476GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen,
477 GNUNET_HashCode * result); 477 struct GNUNET_HashCode * result);
478 478
479 479
480/** 480/**
@@ -491,7 +491,7 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen,
491 491
492 492
493/** 493/**
494 * Convert ASCII encoding back to GNUNET_HashCode 494 * Convert ASCII encoding back to struct GNUNET_HashCode
495 * 495 *
496 * @param enc the encoding 496 * @param enc the encoding
497 * @param result where to store the hash code 497 * @param result where to store the hash code
@@ -536,8 +536,8 @@ GNUNET_CRYPTO_short_hash_cmp (const struct GNUNET_CRYPTO_ShortHashCode * h1,
536 * @return number between 0 and UINT32_MAX 536 * @return number between 0 and UINT32_MAX
537 */ 537 */
538uint32_t 538uint32_t
539GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a, 539GNUNET_CRYPTO_hash_distance_u32 (const struct GNUNET_HashCode * a,
540 const GNUNET_HashCode * b); 540 const struct GNUNET_HashCode * b);
541 541
542 542
543/** 543/**
@@ -548,7 +548,7 @@ GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
548 * @param ret pointer to where to write the hashcode 548 * @param ret pointer to where to write the hashcode
549 */ 549 */
550void 550void
551GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret); 551GNUNET_CRYPTO_hash (const void *block, size_t size, struct GNUNET_HashCode * ret);
552 552
553 553
554/** 554/**
@@ -598,7 +598,7 @@ GNUNET_CRYPTO_short_hash_from_truncation (const struct GNUNET_HashCode *dh,
598void 598void
599GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key, 599GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
600 const void *plaintext, size_t plaintext_len, 600 const void *plaintext, size_t plaintext_len,
601 GNUNET_HashCode * hmac); 601 struct GNUNET_HashCode * hmac);
602 602
603 603
604/** 604/**
@@ -609,7 +609,7 @@ GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
609 * @param res resulting hash, NULL on error 609 * @param res resulting hash, NULL on error
610 */ 610 */
611typedef void (*GNUNET_CRYPTO_HashCompletedCallback) (void *cls, 611typedef void (*GNUNET_CRYPTO_HashCompletedCallback) (void *cls,
612 const GNUNET_HashCode * 612 const struct GNUNET_HashCode *
613 res); 613 res);
614 614
615 615
@@ -652,7 +652,7 @@ GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
652 */ 652 */
653void 653void
654GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode, 654GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
655 GNUNET_HashCode * result); 655 struct GNUNET_HashCode * result);
656 656
657 657
658/** 658/**
@@ -663,9 +663,9 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
663 * @param result set to b - a 663 * @param result set to b - a
664 */ 664 */
665void 665void
666GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a, 666GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a,
667 const GNUNET_HashCode * b, 667 const struct GNUNET_HashCode * b,
668 GNUNET_HashCode * result); 668 struct GNUNET_HashCode * result);
669 669
670 670
671/** 671/**
@@ -676,9 +676,9 @@ GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
676 * @param result set to a + delta 676 * @param result set to a + delta
677 */ 677 */
678void 678void
679GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a, 679GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a,
680 const GNUNET_HashCode * delta, 680 const struct GNUNET_HashCode * delta,
681 GNUNET_HashCode * result); 681 struct GNUNET_HashCode * result);
682 682
683 683
684/** 684/**
@@ -689,8 +689,8 @@ GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
689 * @param result set to a ^ b 689 * @param result set to a ^ b
690 */ 690 */
691void 691void
692GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b, 692GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_HashCode * b,
693 GNUNET_HashCode * result); 693 struct GNUNET_HashCode * result);
694 694
695 695
696/** 696/**
@@ -701,7 +701,7 @@ GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
701 * @param iv set to a valid initialization vector 701 * @param iv set to a valid initialization vector
702 */ 702 */
703void 703void
704GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc, 704GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc,
705 struct GNUNET_CRYPTO_AesSessionKey *skey, 705 struct GNUNET_CRYPTO_AesSessionKey *skey,
706 struct GNUNET_CRYPTO_AesInitializationVector 706 struct GNUNET_CRYPTO_AesInitializationVector
707 *iv); 707 *iv);
@@ -715,11 +715,11 @@ GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
715 * @return Bit \a bit from hashcode \a code, -1 for invalid index 715 * @return Bit \a bit from hashcode \a code, -1 for invalid index
716 */ 716 */
717int 717int
718GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit); 718GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bit);
719 719
720/** 720/**
721 * Determine how many low order bits match in two 721 * Determine how many low order bits match in two
722 * GNUNET_HashCodes. i.e. - 010011 and 011111 share 722 * struct GNUNET_HashCodes. i.e. - 010011 and 011111 share
723 * the first two lowest order bits, and therefore the 723 * the first two lowest order bits, and therefore the
724 * return value is two (NOT XOR distance, nor how many 724 * return value is two (NOT XOR distance, nor how many
725 * bits match absolutely!). 725 * bits match absolutely!).
@@ -730,8 +730,8 @@ GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
730 * @return the number of bits that match 730 * @return the number of bits that match
731 */ 731 */
732unsigned int 732unsigned int
733GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first, 733GNUNET_CRYPTO_hash_matching_bits (const struct GNUNET_HashCode * first,
734 const GNUNET_HashCode * second); 734 const struct GNUNET_HashCode * second);
735 735
736 736
737/** 737/**
@@ -743,7 +743,7 @@ GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
743 * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2. 743 * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
744 */ 744 */
745int 745int
746GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2); 746GNUNET_CRYPTO_hash_cmp (const struct GNUNET_HashCode * h1, const struct GNUNET_HashCode * h2);
747 747
748 748
749/** 749/**
@@ -756,9 +756,9 @@ GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2);
756 * @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2. 756 * @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2.
757 */ 757 */
758int 758int
759GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1, 759GNUNET_CRYPTO_hash_xorcmp (const struct GNUNET_HashCode * h1,
760 const GNUNET_HashCode * h2, 760 const struct GNUNET_HashCode * h2,
761 const GNUNET_HashCode * target); 761 const struct GNUNET_HashCode * target);
762 762
763 763
764/** 764/**
@@ -949,7 +949,7 @@ GNUNET_CRYPTO_setup_hostkey (const char *cfg_name);
949 * @return some private key purely dependent on input 949 * @return some private key purely dependent on input
950 */ 950 */
951struct GNUNET_CRYPTO_RsaPrivateKey * 951struct GNUNET_CRYPTO_RsaPrivateKey *
952GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc); 952GNUNET_CRYPTO_rsa_key_create_from_hash (const struct GNUNET_HashCode * hc);
953 953
954 954
955/** 955/**
diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h
index 84cb4d600..071b304be 100644
--- a/src/include/gnunet_datacache_lib.h
+++ b/src/include/gnunet_datacache_lib.h
@@ -83,7 +83,7 @@ GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
83 */ 83 */
84typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, 84typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
85 struct GNUNET_TIME_Absolute exp, 85 struct GNUNET_TIME_Absolute exp,
86 const GNUNET_HashCode * key, 86 const struct GNUNET_HashCode * key,
87 size_t size, const char *data, 87 size_t size, const char *data,
88 enum GNUNET_BLOCK_Type type); 88 enum GNUNET_BLOCK_Type type);
89 89
@@ -101,7 +101,7 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
101 */ 101 */
102int 102int
103GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, 103GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
104 const GNUNET_HashCode * key, size_t size, 104 const struct GNUNET_HashCode * key, size_t size,
105 const char *data, enum GNUNET_BLOCK_Type type, 105 const char *data, enum GNUNET_BLOCK_Type type,
106 struct GNUNET_TIME_Absolute discard_time); 106 struct GNUNET_TIME_Absolute discard_time);
107 107
@@ -119,7 +119,7 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
119 */ 119 */
120unsigned int 120unsigned int
121GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h, 121GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
122 const GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type, 122 const struct GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
123 GNUNET_DATACACHE_Iterator iter, void *iter_cls); 123 GNUNET_DATACACHE_Iterator iter, void *iter_cls);
124 124
125 125
diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h
index fbfcdf1e8..18268efd7 100644
--- a/src/include/gnunet_datacache_plugin.h
+++ b/src/include/gnunet_datacache_plugin.h
@@ -46,7 +46,7 @@ extern "C"
46 * @param size number of bytes that were made available 46 * @param size number of bytes that were made available
47 */ 47 */
48typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback) (void *cls, 48typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback) (void *cls,
49 const GNUNET_HashCode * 49 const struct GNUNET_HashCode *
50 key, size_t size); 50 key, size_t size);
51 51
52 52
@@ -109,7 +109,7 @@ struct GNUNET_DATACACHE_PluginFunctions
109 * @param discard_time when to discard the value in any case 109 * @param discard_time when to discard the value in any case
110 * @return 0 on error, number of bytes used otherwise 110 * @return 0 on error, number of bytes used otherwise
111 */ 111 */
112 size_t (*put) (void *cls, const GNUNET_HashCode * key, size_t size, 112 size_t (*put) (void *cls, const struct GNUNET_HashCode * key, size_t size,
113 const char *data, enum GNUNET_BLOCK_Type type, 113 const char *data, enum GNUNET_BLOCK_Type type,
114 struct GNUNET_TIME_Absolute discard_time); 114 struct GNUNET_TIME_Absolute discard_time);
115 115
@@ -125,7 +125,7 @@ struct GNUNET_DATACACHE_PluginFunctions
125 * @param iter_cls closure for iter 125 * @param iter_cls closure for iter
126 * @return the number of results found 126 * @return the number of results found
127 */ 127 */
128 unsigned int (*get) (void *cls, const GNUNET_HashCode * key, 128 unsigned int (*get) (void *cls, const struct GNUNET_HashCode * key,
129 enum GNUNET_BLOCK_Type type, 129 enum GNUNET_BLOCK_Type type,
130 GNUNET_DATACACHE_Iterator iter, void *iter_cls); 130 GNUNET_DATACACHE_Iterator iter, void *iter_cls);
131 131
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h
index bbf0ce2aa..efdcf8969 100644
--- a/src/include/gnunet_datastore_plugin.h
+++ b/src/include/gnunet_datastore_plugin.h
@@ -92,7 +92,7 @@ struct GNUNET_DATASTORE_PluginEnvironment
92 * @return GNUNET_OK to keep the item 92 * @return GNUNET_OK to keep the item
93 * GNUNET_NO to delete the item 93 * GNUNET_NO to delete the item
94 */ 94 */
95typedef int (*PluginDatumProcessor) (void *cls, const GNUNET_HashCode * key, 95typedef int (*PluginDatumProcessor) (void *cls, const struct GNUNET_HashCode * key,
96 uint32_t size, const void *data, 96 uint32_t size, const void *data,
97 enum GNUNET_BLOCK_Type type, 97 enum GNUNET_BLOCK_Type type,
98 uint32_t priority, uint32_t anonymity, 98 uint32_t priority, uint32_t anonymity,
@@ -127,7 +127,7 @@ typedef unsigned long long (*PluginEstimateSize) (void *cls);
127 * @return GNUNET_OK on success, 127 * @return GNUNET_OK on success,
128 * GNUNET_SYSERR on failure 128 * GNUNET_SYSERR on failure
129 */ 129 */
130typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, 130typedef int (*PluginPut) (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
131 const void *data, enum GNUNET_BLOCK_Type type, 131 const void *data, enum GNUNET_BLOCK_Type type,
132 uint32_t priority, uint32_t anonymity, 132 uint32_t priority, uint32_t anonymity,
133 uint32_t replication, 133 uint32_t replication,
@@ -142,7 +142,7 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size,
142 * @param count how many values are stored under this key in the datastore 142 * @param count how many values are stored under this key in the datastore
143 */ 143 */
144typedef void (*PluginKeyProcessor) (void *cls, 144typedef void (*PluginKeyProcessor) (void *cls,
145 const GNUNET_HashCode *key, 145 const struct GNUNET_HashCode *key,
146 unsigned int count); 146 unsigned int count);
147 147
148 148
@@ -178,8 +178,8 @@ typedef void (*PluginGetKeys) (void *cls,
178 * @param proc_cls closure for proc 178 * @param proc_cls closure for proc
179 */ 179 */
180typedef void (*PluginGetKey) (void *cls, uint64_t offset, 180typedef void (*PluginGetKey) (void *cls, uint64_t offset,
181 const GNUNET_HashCode * key, 181 const struct GNUNET_HashCode * key,
182 const GNUNET_HashCode * vhash, 182 const struct GNUNET_HashCode * vhash,
183 enum GNUNET_BLOCK_Type type, 183 enum GNUNET_BLOCK_Type type,
184 PluginDatumProcessor proc, void *proc_cls); 184 PluginDatumProcessor proc, void *proc_cls);
185 185
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index 29508329d..721963bdd 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -153,7 +153,7 @@ GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount,
153 */ 153 */
154struct GNUNET_DATASTORE_QueueEntry * 154struct GNUNET_DATASTORE_QueueEntry *
155GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid, 155GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
156 const GNUNET_HashCode * key, size_t size, 156 const struct GNUNET_HashCode * key, size_t size,
157 const void *data, enum GNUNET_BLOCK_Type type, 157 const void *data, enum GNUNET_BLOCK_Type type,
158 uint32_t priority, uint32_t anonymity, 158 uint32_t priority, uint32_t anonymity,
159 uint32_t replication, 159 uint32_t replication,
@@ -245,7 +245,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
245 */ 245 */
246struct GNUNET_DATASTORE_QueueEntry * 246struct GNUNET_DATASTORE_QueueEntry *
247GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h, 247GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
248 const GNUNET_HashCode * key, size_t size, 248 const struct GNUNET_HashCode * key, size_t size,
249 const void *data, unsigned int queue_priority, 249 const void *data, unsigned int queue_priority,
250 unsigned int max_queue_size, 250 unsigned int max_queue_size,
251 struct GNUNET_TIME_Relative timeout, 251 struct GNUNET_TIME_Relative timeout,
@@ -268,7 +268,7 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
268 * maybe 0 if no unique identifier is available 268 * maybe 0 if no unique identifier is available
269 */ 269 */
270typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls, 270typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
271 const GNUNET_HashCode * key, 271 const struct GNUNET_HashCode * key,
272 size_t size, const void *data, 272 size_t size, const void *data,
273 enum GNUNET_BLOCK_Type type, 273 enum GNUNET_BLOCK_Type type,
274 uint32_t priority, 274 uint32_t priority,
@@ -300,7 +300,7 @@ typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
300 */ 300 */
301struct GNUNET_DATASTORE_QueueEntry * 301struct GNUNET_DATASTORE_QueueEntry *
302GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset, 302GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
303 const GNUNET_HashCode * key, 303 const struct GNUNET_HashCode * key,
304 enum GNUNET_BLOCK_Type type, 304 enum GNUNET_BLOCK_Type type,
305 unsigned int queue_priority, 305 unsigned int queue_priority,
306 unsigned int max_queue_size, 306 unsigned int max_queue_size,
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index 6606acb7d..83774826e 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -163,7 +163,7 @@ typedef void (*GNUNET_DHT_PutContinuation)(void *cls,
163 * (size too big) 163 * (size too big)
164 */ 164 */
165struct GNUNET_DHT_PutHandle * 165struct GNUNET_DHT_PutHandle *
166GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const GNUNET_HashCode * key, 166GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const struct GNUNET_HashCode * key,
167 uint32_t desired_replication_level, 167 uint32_t desired_replication_level,
168 enum GNUNET_DHT_RouteOption options, 168 enum GNUNET_DHT_RouteOption options,
169 enum GNUNET_BLOCK_Type type, size_t size, const char *data, 169 enum GNUNET_BLOCK_Type type, size_t size, const char *data,
@@ -205,7 +205,7 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph);
205 */ 205 */
206typedef void (*GNUNET_DHT_GetIterator) (void *cls, 206typedef void (*GNUNET_DHT_GetIterator) (void *cls,
207 struct GNUNET_TIME_Absolute exp, 207 struct GNUNET_TIME_Absolute exp,
208 const GNUNET_HashCode * key, 208 const struct GNUNET_HashCode * key,
209 const struct GNUNET_PeerIdentity * 209 const struct GNUNET_PeerIdentity *
210 get_path, unsigned int get_path_length, 210 get_path, unsigned int get_path_length,
211 const struct GNUNET_PeerIdentity * 211 const struct GNUNET_PeerIdentity *
@@ -234,7 +234,7 @@ typedef void (*GNUNET_DHT_GetIterator) (void *cls,
234 */ 234 */
235struct GNUNET_DHT_GetHandle * 235struct GNUNET_DHT_GetHandle *
236GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle, 236GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
237 enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key, 237 enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode * key,
238 uint32_t desired_replication_level, 238 uint32_t desired_replication_level,
239 enum GNUNET_DHT_RouteOption options, const void *xquery, 239 enum GNUNET_DHT_RouteOption options, const void *xquery,
240 size_t xquery_size, GNUNET_DHT_GetIterator iter, 240 size_t xquery_size, GNUNET_DHT_GetIterator iter,
@@ -279,7 +279,7 @@ typedef void (*GNUNET_DHT_MonitorGetCB) (void *cls,
279 uint32_t desired_replication_level, 279 uint32_t desired_replication_level,
280 unsigned int path_length, 280 unsigned int path_length,
281 const struct GNUNET_PeerIdentity *path, 281 const struct GNUNET_PeerIdentity *path,
282 const GNUNET_HashCode * key); 282 const struct GNUNET_HashCode * key);
283 283
284/** 284/**
285 * Callback called on each GET reply going through the DHT. 285 * Callback called on each GET reply going through the DHT.
@@ -304,7 +304,7 @@ typedef void (*GNUNET_DHT_MonitorGetRespCB) (void *cls,
304 * put_path, 304 * put_path,
305 unsigned int put_path_length, 305 unsigned int put_path_length,
306 struct GNUNET_TIME_Absolute exp, 306 struct GNUNET_TIME_Absolute exp,
307 const GNUNET_HashCode * key, 307 const struct GNUNET_HashCode * key,
308 const void *data, 308 const void *data,
309 size_t size); 309 size_t size);
310 310
@@ -331,7 +331,7 @@ typedef void (*GNUNET_DHT_MonitorPutCB) (void *cls,
331 unsigned int path_length, 331 unsigned int path_length,
332 const struct GNUNET_PeerIdentity *path, 332 const struct GNUNET_PeerIdentity *path,
333 struct GNUNET_TIME_Absolute exp, 333 struct GNUNET_TIME_Absolute exp,
334 const GNUNET_HashCode * key, 334 const struct GNUNET_HashCode * key,
335 const void *data, 335 const void *data,
336 size_t size); 336 size_t size);
337 337
@@ -351,7 +351,7 @@ typedef void (*GNUNET_DHT_MonitorPutCB) (void *cls,
351struct GNUNET_DHT_MonitorHandle * 351struct GNUNET_DHT_MonitorHandle *
352GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle, 352GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
353 enum GNUNET_BLOCK_Type type, 353 enum GNUNET_BLOCK_Type type,
354 const GNUNET_HashCode *key, 354 const struct GNUNET_HashCode *key,
355 GNUNET_DHT_MonitorGetCB get_cb, 355 GNUNET_DHT_MonitorGetCB get_cb,
356 GNUNET_DHT_MonitorGetRespCB get_resp_cb, 356 GNUNET_DHT_MonitorGetRespCB get_resp_cb,
357 GNUNET_DHT_MonitorPutCB put_cb, 357 GNUNET_DHT_MonitorPutCB put_cb,
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index 1f1e60f0f..eaff18320 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -91,7 +91,7 @@ typedef int (*GNUNET_FS_KeywordIterator) (void *cls, const char *keyword,
91 * @param key wherer to store the unique key 91 * @param key wherer to store the unique key
92 */ 92 */
93void 93void
94GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key); 94GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode * key);
95 95
96/** 96/**
97 * Convert a URI to a UTF-8 String. 97 * Convert a URI to a UTF-8 String.
@@ -341,7 +341,7 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, const char *id,
341 * @return an FS URI for the given namespace and identifier 341 * @return an FS URI for the given namespace and identifier
342 */ 342 */
343struct GNUNET_FS_Uri * 343struct GNUNET_FS_Uri *
344GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id); 344GNUNET_FS_uri_sks_create_from_nsid (struct GNUNET_HashCode * nsid, const char *id);
345 345
346 346
347/** 347/**
@@ -354,7 +354,7 @@ GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id);
354 */ 354 */
355int 355int
356GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri, 356GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
357 GNUNET_HashCode * nsid); 357 struct GNUNET_HashCode * nsid);
358 358
359 359
360/** 360/**
@@ -1383,7 +1383,7 @@ struct GNUNET_FS_ProgressInfo
1383 /** 1383 /**
1384 * Hash-identifier for the namespace. 1384 * Hash-identifier for the namespace.
1385 */ 1385 */
1386 GNUNET_HashCode id; 1386 struct GNUNET_HashCode id;
1387 1387
1388 } namespace; 1388 } namespace;
1389 1389
@@ -2112,7 +2112,7 @@ GNUNET_FS_publish_sks_cancel (struct GNUNET_FS_PublishSksContext *psc);
2112 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort 2112 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
2113 */ 2113 */
2114typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename, 2114typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename,
2115 const GNUNET_HashCode * file_id); 2115 const struct GNUNET_HashCode * file_id);
2116 2116
2117 2117
2118/** 2118/**
@@ -2252,7 +2252,7 @@ GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze);
2252 * @param id hash identifier for the namespace 2252 * @param id hash identifier for the namespace
2253 */ 2253 */
2254typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name, 2254typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name,
2255 const GNUNET_HashCode * id); 2255 const struct GNUNET_HashCode * id);
2256 2256
2257 2257
2258/** 2258/**
diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h
index 8fd938da8..6ec51b678 100644
--- a/src/include/gnunet_pseudonym_lib.h
+++ b/src/include/gnunet_pseudonym_lib.h
@@ -51,7 +51,7 @@ extern "C"
51 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort 51 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
52 */ 52 */
53typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls, 53typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls,
54 const GNUNET_HashCode * pseudonym, 54 const struct GNUNET_HashCode * pseudonym,
55 const char *name, 55 const char *name,
56 const char *unique_name, 56 const char *unique_name,
57 const struct GNUNET_CONTAINER_MetaData 57 const struct GNUNET_CONTAINER_MetaData
@@ -67,7 +67,7 @@ typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls,
67 */ 67 */
68int 68int
69GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, 69GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
70 const GNUNET_HashCode * nsid, int delta); 70 const struct GNUNET_HashCode * nsid, int delta);
71 71
72/** 72/**
73 * Add a pseudonym to the set of known pseudonyms. 73 * Add a pseudonym to the set of known pseudonyms.
@@ -80,7 +80,7 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
80 */ 80 */
81void 81void
82GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, 82GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
83 const GNUNET_HashCode * id, 83 const struct GNUNET_HashCode * id,
84 const struct GNUNET_CONTAINER_MetaData *meta); 84 const struct GNUNET_CONTAINER_MetaData *meta);
85 85
86 86
@@ -127,7 +127,7 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
127 */ 127 */
128char * 128char *
129GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg, 129GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
130 const GNUNET_HashCode * nsid, const char *name, unsigned int *suffix); 130 const struct GNUNET_HashCode * nsid, const char *name, unsigned int *suffix);
131 131
132/** 132/**
133 * Get namespace name, metadata and rank 133 * Get namespace name, metadata and rank
@@ -152,7 +152,7 @@ GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
152 */ 152 */
153int 153int
154GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 154GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
155 const GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta, 155 const struct GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta,
156 int32_t *ret_rank, char **ret_name, int *name_is_a_dup); 156 int32_t *ret_rank, char **ret_name, int *name_is_a_dup);
157 157
158 158
@@ -166,7 +166,7 @@ GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
166 */ 166 */
167int 167int
168GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, 168GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
169 const char *ns_uname, GNUNET_HashCode * nsid); 169 const char *ns_uname, struct GNUNET_HashCode * nsid);
170 170
171/** 171/**
172 * Set the pseudonym metadata, rank and name. 172 * Set the pseudonym metadata, rank and name.
@@ -182,7 +182,7 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
182 */ 182 */
183int 183int
184GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 184GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
185 const GNUNET_HashCode * nsid, const char *name, 185 const struct GNUNET_HashCode * nsid, const char *name,
186 const struct GNUNET_CONTAINER_MetaData *md, int rank); 186 const struct GNUNET_CONTAINER_MetaData *md, int rank);
187 187
188 188
diff --git a/src/include/gnunet_regex_lib.h b/src/include/gnunet_regex_lib.h
index 6e0a41275..c9b884291 100644
--- a/src/include/gnunet_regex_lib.h
+++ b/src/include/gnunet_regex_lib.h
@@ -55,7 +55,7 @@ struct GNUNET_REGEX_Edge
55 /** 55 /**
56 * Destionation of the edge. 56 * Destionation of the edge.
57 */ 57 */
58 GNUNET_HashCode destination; 58 struct GNUNET_HashCode destination;
59}; 59};
60 60
61/** 61/**
@@ -134,7 +134,7 @@ GNUNET_REGEX_get_computed_regex (struct GNUNET_REGEX_Automaton *a);
134 */ 134 */
135unsigned int 135unsigned int
136GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len, 136GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
137 GNUNET_HashCode * key); 137 struct GNUNET_HashCode * key);
138 138
139/** 139/**
140 * Check if the given 'proof' matches the given 'key'. 140 * Check if the given 'proof' matches the given 'key'.
@@ -146,7 +146,7 @@ GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
146 */ 146 */
147int 147int
148GNUNET_REGEX_check_proof (const char *proof, 148GNUNET_REGEX_check_proof (const char *proof,
149 const GNUNET_HashCode *key); 149 const struct GNUNET_HashCode *key);
150 150
151/** 151/**
152 * Iterator callback function. 152 * Iterator callback function.
@@ -159,7 +159,7 @@ GNUNET_REGEX_check_proof (const char *proof,
159 * @param edges edges leaving current state. 159 * @param edges edges leaving current state.
160 */ 160 */
161typedef void (*GNUNET_REGEX_KeyIterator)(void *cls, 161typedef void (*GNUNET_REGEX_KeyIterator)(void *cls,
162 const GNUNET_HashCode *key, 162 const struct GNUNET_HashCode *key,
163 const char *proof, 163 const char *proof,
164 int accepting, 164 int accepting,
165 unsigned int num_edges, 165 unsigned int num_edges,
diff --git a/src/include/gnunet_vpn_service.h b/src/include/gnunet_vpn_service.h
index ecf6cf5f0..77944c9c0 100644
--- a/src/include/gnunet_vpn_service.h
+++ b/src/include/gnunet_vpn_service.h
@@ -97,7 +97,7 @@ GNUNET_VPN_redirect_to_peer (struct GNUNET_VPN_Handle *vh,
97 int result_af, 97 int result_af,
98 uint8_t protocol, 98 uint8_t protocol,
99 const struct GNUNET_PeerIdentity *peer, 99 const struct GNUNET_PeerIdentity *peer,
100 const GNUNET_HashCode *serv, 100 const struct GNUNET_HashCode *serv,
101 int nac, 101 int nac,
102 struct GNUNET_TIME_Absolute expiration_time, 102 struct GNUNET_TIME_Absolute expiration_time,
103 GNUNET_VPN_AllocationCallback cb, 103 GNUNET_VPN_AllocationCallback cb,
diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c
index bcf9d0379..2a3862876 100644
--- a/src/integration-tests/connection_watchdog.c
+++ b/src/integration-tests/connection_watchdog.c
@@ -121,7 +121,7 @@ struct TransportPlugin *ptail;
121 121
122static int 122static int
123map_check_it (void *cls, 123map_check_it (void *cls,
124 const GNUNET_HashCode * key, 124 const struct GNUNET_HashCode * key,
125 void *value) 125 void *value)
126{ 126{
127 int *fail = cls; 127 int *fail = cls;
@@ -142,7 +142,7 @@ map_check_it (void *cls,
142 142
143static int 143static int
144map_cleanup_it (void *cls, 144map_cleanup_it (void *cls,
145 const GNUNET_HashCode * key, 145 const struct GNUNET_HashCode * key,
146 void *value) 146 void *value)
147{ 147{
148 struct PeerContainer *pc = value; 148 struct PeerContainer *pc = value;
@@ -451,7 +451,7 @@ return mlen;
451 451
452 452
453int map_ping_it (void *cls, 453int map_ping_it (void *cls,
454 const GNUNET_HashCode * key, 454 const struct GNUNET_HashCode * key,
455 void *value) 455 void *value)
456{ 456{
457 struct PeerContainer *pc = value; 457 struct PeerContainer *pc = value;
diff --git a/src/lockmanager/gnunet-service-lockmanager.c b/src/lockmanager/gnunet-service-lockmanager.c
index 8ec988978..b5126ba20 100644
--- a/src/lockmanager/gnunet-service-lockmanager.c
+++ b/src/lockmanager/gnunet-service-lockmanager.c
@@ -229,7 +229,7 @@ get_key (const char *domain_name,
229 * GNUNET_NO if not. 229 * GNUNET_NO if not.
230 */ 230 */
231static int 231static int
232match_iterator (void *cls, const GNUNET_HashCode *key, void *value) 232match_iterator (void *cls, const struct GNUNET_HashCode *key, void *value)
233{ 233{
234 struct LockMatch *match = cls; 234 struct LockMatch *match = cls;
235 struct Lock *lock = value; 235 struct Lock *lock = value;
@@ -803,7 +803,7 @@ client_disconnect_cb (void *cls, struct GNUNET_SERVER_Client *client)
803 */ 803 */
804static int 804static int
805lock_delete_iterator (void *cls, 805lock_delete_iterator (void *cls,
806 const GNUNET_HashCode * key, 806 const struct GNUNET_HashCode * key,
807 void *value) 807 void *value)
808{ 808{
809 struct Lock *lock = value; 809 struct Lock *lock = value;
diff --git a/src/lockmanager/lockmanager_api.c b/src/lockmanager/lockmanager_api.c
index 99f5ab503..bfc4d1c1a 100644
--- a/src/lockmanager/lockmanager_api.c
+++ b/src/lockmanager/lockmanager_api.c
@@ -275,7 +275,7 @@ get_key (const char *domain_name,
275 * GNUNET_NO if not. 275 * GNUNET_NO if not.
276 */ 276 */
277static int 277static int
278match_iterator (void *cls, const GNUNET_HashCode *key, void *value) 278match_iterator (void *cls, const struct GNUNET_HashCode *key, void *value)
279{ 279{
280 struct LockingRequestMatch *match = cls; 280 struct LockingRequestMatch *match = cls;
281 struct GNUNET_LOCKMANAGER_LockingRequest *lr = value; 281 struct GNUNET_LOCKMANAGER_LockingRequest *lr = value;
@@ -355,7 +355,7 @@ call_status_cb_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
355 */ 355 */
356static int 356static int
357release_iterator(void *cls, 357release_iterator(void *cls,
358 const GNUNET_HashCode * key, 358 const struct GNUNET_HashCode * key,
359 void *value) 359 void *value)
360{ 360{
361 struct GNUNET_LOCKMANAGER_Handle *h = cls; 361 struct GNUNET_LOCKMANAGER_Handle *h = cls;
@@ -472,7 +472,7 @@ handle_replies (void *cls,
472 */ 472 */
473static int 473static int
474free_iterator(void *cls, 474free_iterator(void *cls,
475 const GNUNET_HashCode * key, 475 const struct GNUNET_HashCode * key,
476 void *value) 476 void *value)
477{ 477{
478 struct GNUNET_LOCKMANAGER_Handle *h = cls; 478 struct GNUNET_LOCKMANAGER_Handle *h = cls;
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 26984836e..3c3cd3d87 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -639,7 +639,7 @@ unsigned int next_client_id;
639 * GNUNET_NO if not. 639 * GNUNET_NO if not.
640 */ 640 */
641static int 641static int
642announce_application (void *cls, const GNUNET_HashCode * key, void *value) 642announce_application (void *cls, const struct GNUNET_HashCode * key, void *value)
643{ 643{
644 /* FIXME are hashes in multihash map equal on all aquitectures? */ 644 /* FIXME are hashes in multihash map equal on all aquitectures? */
645 /* FIXME: keep return value of 'put' to possibly cancel!? */ 645 /* FIXME: keep return value of 'put' to possibly cancel!? */
@@ -733,7 +733,7 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
733 */ 733 */
734static void 734static void
735dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 735dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
736 const GNUNET_HashCode * key, 736 const struct GNUNET_HashCode * key,
737 const struct GNUNET_PeerIdentity *get_path, 737 const struct GNUNET_PeerIdentity *get_path,
738 unsigned int get_path_length, 738 unsigned int get_path_length,
739 const struct GNUNET_PeerIdentity *put_path, 739 const struct GNUNET_PeerIdentity *put_path,
@@ -818,7 +818,7 @@ client_get (struct GNUNET_SERVER_Client *client)
818static int 818static int
819client_is_subscribed (uint16_t message_type, struct MeshClient *c) 819client_is_subscribed (uint16_t message_type, struct MeshClient *c)
820{ 820{
821 GNUNET_HashCode hc; 821 struct GNUNET_HashCode hc;
822 822
823 GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc); 823 GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc);
824 return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc); 824 return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc);
@@ -907,7 +907,7 @@ client_knows_tunnel (struct MeshClient *c, struct MeshTunnel *t)
907static void 907static void
908client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t) 908client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
909{ 909{
910 GNUNET_HashCode hash; 910 struct GNUNET_HashCode hash;
911 911
912 GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash); 912 GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash);
913 GNUNET_break (GNUNET_YES == 913 GNUNET_break (GNUNET_YES ==
@@ -931,7 +931,7 @@ client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
931static void 931static void
932client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t) 932client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t)
933{ 933{
934 GNUNET_HashCode hash; 934 struct GNUNET_HashCode hash;
935 935
936 if (c == t->owner) 936 if (c == t->owner)
937 { 937 {
@@ -1031,7 +1031,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg,
1031 { 1031 {
1032 /* This client doesn't know the tunnel */ 1032 /* This client doesn't know the tunnel */
1033 struct GNUNET_MESH_TunnelNotification tmsg; 1033 struct GNUNET_MESH_TunnelNotification tmsg;
1034 GNUNET_HashCode hash; 1034 struct GNUNET_HashCode hash;
1035 1035
1036 tmsg.header.size = htons (sizeof (tmsg)); 1036 tmsg.header.size = htons (sizeof (tmsg));
1037 tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE); 1037 tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
@@ -1232,7 +1232,7 @@ peer_info_get_short (const GNUNET_PEER_Id peer)
1232 * @return always GNUNET_YES, to keep iterating 1232 * @return always GNUNET_YES, to keep iterating
1233 */ 1233 */
1234static int 1234static int
1235peer_info_delete_tunnel (void *cls, const GNUNET_HashCode * key, void *value) 1235peer_info_delete_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
1236{ 1236{
1237 struct MeshTunnel *t = cls; 1237 struct MeshTunnel *t = cls;
1238 struct MeshPeerInfo *peer = value; 1238 struct MeshPeerInfo *peer = value;
@@ -1476,7 +1476,7 @@ peer_info_connect (struct MeshPeerInfo *peer, struct MeshTunnel *t)
1476 } 1476 }
1477 else 1477 else
1478 { 1478 {
1479 GNUNET_HashCode hash; 1479 struct GNUNET_HashCode hash;
1480 1480
1481 path_destroy (p); 1481 path_destroy (p);
1482 send_client_peer_connected (t, myid); 1482 send_client_peer_connected (t, myid);
@@ -1913,7 +1913,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
1913static struct MeshTunnel * 1913static struct MeshTunnel *
1914tunnel_get_incoming (MESH_TunnelNumber tid) 1914tunnel_get_incoming (MESH_TunnelNumber tid)
1915{ 1915{
1916 GNUNET_HashCode hash; 1916 struct GNUNET_HashCode hash;
1917 1917
1918 GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV); 1918 GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV);
1919 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash); 1919 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
@@ -1938,7 +1938,7 @@ tunnel_get_by_local_id (struct MeshClient *c, MESH_TunnelNumber tid)
1938 } 1938 }
1939 else 1939 else
1940 { 1940 {
1941 GNUNET_HashCode hash; 1941 struct GNUNET_HashCode hash;
1942 1942
1943 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash); 1943 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
1944 return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash); 1944 return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash);
@@ -1958,7 +1958,7 @@ static struct MeshTunnel *
1958tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid) 1958tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid)
1959{ 1959{
1960 struct MESH_TunnelID id; 1960 struct MESH_TunnelID id;
1961 GNUNET_HashCode hash; 1961 struct GNUNET_HashCode hash;
1962 1962
1963 id.oid = pi; 1963 id.oid = pi;
1964 id.tid = tid; 1964 id.tid = tid;
@@ -2334,7 +2334,7 @@ static int
2334tunnel_destroy (struct MeshTunnel *t) 2334tunnel_destroy (struct MeshTunnel *t)
2335{ 2335{
2336 struct MeshClient *c; 2336 struct MeshClient *c;
2337 GNUNET_HashCode hash; 2337 struct GNUNET_HashCode hash;
2338 unsigned int i; 2338 unsigned int i;
2339 int r; 2339 int r;
2340 2340
@@ -2498,7 +2498,7 @@ tunnel_delete_peer (struct MeshTunnel *t, GNUNET_PEER_Id peer)
2498 * @return GNUNET_OK on success 2498 * @return GNUNET_OK on success
2499 */ 2499 */
2500static int 2500static int
2501tunnel_destroy_iterator (void *cls, const GNUNET_HashCode * key, void *value) 2501tunnel_destroy_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
2502{ 2502{
2503 struct MeshTunnel *t = value; 2503 struct MeshTunnel *t = value;
2504 struct MeshClient *c = cls; 2504 struct MeshClient *c = cls;
@@ -2916,7 +2916,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
2916 MESH_TunnelNumber tid; 2916 MESH_TunnelNumber tid;
2917 struct GNUNET_MESH_ManipulatePath *msg; 2917 struct GNUNET_MESH_ManipulatePath *msg;
2918 struct GNUNET_PeerIdentity *pi; 2918 struct GNUNET_PeerIdentity *pi;
2919 GNUNET_HashCode hash; 2919 struct GNUNET_HashCode hash;
2920 struct MeshPeerPath *path; 2920 struct MeshPeerPath *path;
2921 struct MeshPeerInfo *dest_peer_info; 2921 struct MeshPeerInfo *dest_peer_info;
2922 struct MeshPeerInfo *orig_peer_info; 2922 struct MeshPeerInfo *orig_peer_info;
@@ -3574,7 +3574,7 @@ static struct GNUNET_CORE_MessageHandler core_handlers[] = {
3574 * @return GNUNET_OK on success 3574 * @return GNUNET_OK on success
3575 */ 3575 */
3576static int 3576static int
3577deregister_app (void *cls, const GNUNET_HashCode * key, void *value) 3577deregister_app (void *cls, const struct GNUNET_HashCode * key, void *value)
3578{ 3578{
3579 GNUNET_break (GNUNET_YES == 3579 GNUNET_break (GNUNET_YES ==
3580 GNUNET_CONTAINER_multihashmap_remove (applications, key, 3580 GNUNET_CONTAINER_multihashmap_remove (applications, key,
@@ -3689,7 +3689,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
3689 */ 3689 */
3690static void 3690static void
3691dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 3691dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3692 const GNUNET_HashCode * key, 3692 const struct GNUNET_HashCode * key,
3693 const struct GNUNET_PeerIdentity *get_path, 3693 const struct GNUNET_PeerIdentity *get_path,
3694 unsigned int get_path_length, 3694 unsigned int get_path_length,
3695 const struct GNUNET_PeerIdentity *put_path, 3695 const struct GNUNET_PeerIdentity *put_path,
@@ -3737,7 +3737,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3737 */ 3737 */
3738static void 3738static void
3739dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, 3739dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3740 const GNUNET_HashCode * key, 3740 const struct GNUNET_HashCode * key,
3741 const struct GNUNET_PeerIdentity *get_path, 3741 const struct GNUNET_PeerIdentity *get_path,
3742 unsigned int get_path_length, 3742 unsigned int get_path_length,
3743 const struct GNUNET_PeerIdentity *put_path, 3743 const struct GNUNET_PeerIdentity *put_path,
@@ -3888,7 +3888,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
3888 if (napps > 0) 3888 if (napps > 0)
3889 { 3889 {
3890 GNUNET_MESH_ApplicationType at; 3890 GNUNET_MESH_ApplicationType at;
3891 GNUNET_HashCode hc; 3891 struct GNUNET_HashCode hc;
3892 3892
3893 c->apps = GNUNET_CONTAINER_multihashmap_create (napps); 3893 c->apps = GNUNET_CONTAINER_multihashmap_create (napps);
3894 for (i = 0; i < napps; i++) 3894 for (i = 0; i < napps; i++)
@@ -3911,7 +3911,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
3911 if (ntypes > 0) 3911 if (ntypes > 0)
3912 { 3912 {
3913 uint16_t u16; 3913 uint16_t u16;
3914 GNUNET_HashCode hc; 3914 struct GNUNET_HashCode hc;
3915 3915
3916 t = (uint16_t *) & a[napps]; 3916 t = (uint16_t *) & a[napps];
3917 c->types = GNUNET_CONTAINER_multihashmap_create (ntypes); 3917 c->types = GNUNET_CONTAINER_multihashmap_create (ntypes);
@@ -4238,7 +4238,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client,
4238 struct GNUNET_MESH_ConnectPeerByType *connect_msg; 4238 struct GNUNET_MESH_ConnectPeerByType *connect_msg;
4239 struct MeshClient *c; 4239 struct MeshClient *c;
4240 struct MeshTunnel *t; 4240 struct MeshTunnel *t;
4241 GNUNET_HashCode hash; 4241 struct GNUNET_HashCode hash;
4242 MESH_TunnelNumber tid; 4242 MESH_TunnelNumber tid;
4243 4243
4244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got connect by type request\n"); 4244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got connect by type request\n");
@@ -4717,7 +4717,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
4717 * GNUNET_NO if not. 4717 * GNUNET_NO if not.
4718 */ 4718 */
4719static int 4719static int
4720shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value) 4720shutdown_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
4721{ 4721{
4722 struct MeshTunnel *t = value; 4722 struct MeshTunnel *t = value;
4723 4723
@@ -4735,7 +4735,7 @@ shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
4735 * GNUNET_NO if not. 4735 * GNUNET_NO if not.
4736 */ 4736 */
4737static int 4737static int
4738shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value) 4738shutdown_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
4739{ 4739{
4740 struct MeshPeerInfo *p = value; 4740 struct MeshPeerInfo *p = value;
4741 struct MeshPeerQueue *q; 4741 struct MeshPeerQueue *q;
diff --git a/src/mesh/gnunet-service-mesh_new.c b/src/mesh/gnunet-service-mesh_new.c
index 26984836e..3c3cd3d87 100644
--- a/src/mesh/gnunet-service-mesh_new.c
+++ b/src/mesh/gnunet-service-mesh_new.c
@@ -639,7 +639,7 @@ unsigned int next_client_id;
639 * GNUNET_NO if not. 639 * GNUNET_NO if not.
640 */ 640 */
641static int 641static int
642announce_application (void *cls, const GNUNET_HashCode * key, void *value) 642announce_application (void *cls, const struct GNUNET_HashCode * key, void *value)
643{ 643{
644 /* FIXME are hashes in multihash map equal on all aquitectures? */ 644 /* FIXME are hashes in multihash map equal on all aquitectures? */
645 /* FIXME: keep return value of 'put' to possibly cancel!? */ 645 /* FIXME: keep return value of 'put' to possibly cancel!? */
@@ -733,7 +733,7 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
733 */ 733 */
734static void 734static void
735dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 735dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
736 const GNUNET_HashCode * key, 736 const struct GNUNET_HashCode * key,
737 const struct GNUNET_PeerIdentity *get_path, 737 const struct GNUNET_PeerIdentity *get_path,
738 unsigned int get_path_length, 738 unsigned int get_path_length,
739 const struct GNUNET_PeerIdentity *put_path, 739 const struct GNUNET_PeerIdentity *put_path,
@@ -818,7 +818,7 @@ client_get (struct GNUNET_SERVER_Client *client)
818static int 818static int
819client_is_subscribed (uint16_t message_type, struct MeshClient *c) 819client_is_subscribed (uint16_t message_type, struct MeshClient *c)
820{ 820{
821 GNUNET_HashCode hc; 821 struct GNUNET_HashCode hc;
822 822
823 GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc); 823 GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc);
824 return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc); 824 return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc);
@@ -907,7 +907,7 @@ client_knows_tunnel (struct MeshClient *c, struct MeshTunnel *t)
907static void 907static void
908client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t) 908client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
909{ 909{
910 GNUNET_HashCode hash; 910 struct GNUNET_HashCode hash;
911 911
912 GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash); 912 GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash);
913 GNUNET_break (GNUNET_YES == 913 GNUNET_break (GNUNET_YES ==
@@ -931,7 +931,7 @@ client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
931static void 931static void
932client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t) 932client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t)
933{ 933{
934 GNUNET_HashCode hash; 934 struct GNUNET_HashCode hash;
935 935
936 if (c == t->owner) 936 if (c == t->owner)
937 { 937 {
@@ -1031,7 +1031,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg,
1031 { 1031 {
1032 /* This client doesn't know the tunnel */ 1032 /* This client doesn't know the tunnel */
1033 struct GNUNET_MESH_TunnelNotification tmsg; 1033 struct GNUNET_MESH_TunnelNotification tmsg;
1034 GNUNET_HashCode hash; 1034 struct GNUNET_HashCode hash;
1035 1035
1036 tmsg.header.size = htons (sizeof (tmsg)); 1036 tmsg.header.size = htons (sizeof (tmsg));
1037 tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE); 1037 tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
@@ -1232,7 +1232,7 @@ peer_info_get_short (const GNUNET_PEER_Id peer)
1232 * @return always GNUNET_YES, to keep iterating 1232 * @return always GNUNET_YES, to keep iterating
1233 */ 1233 */
1234static int 1234static int
1235peer_info_delete_tunnel (void *cls, const GNUNET_HashCode * key, void *value) 1235peer_info_delete_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
1236{ 1236{
1237 struct MeshTunnel *t = cls; 1237 struct MeshTunnel *t = cls;
1238 struct MeshPeerInfo *peer = value; 1238 struct MeshPeerInfo *peer = value;
@@ -1476,7 +1476,7 @@ peer_info_connect (struct MeshPeerInfo *peer, struct MeshTunnel *t)
1476 } 1476 }
1477 else 1477 else
1478 { 1478 {
1479 GNUNET_HashCode hash; 1479 struct GNUNET_HashCode hash;
1480 1480
1481 path_destroy (p); 1481 path_destroy (p);
1482 send_client_peer_connected (t, myid); 1482 send_client_peer_connected (t, myid);
@@ -1913,7 +1913,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
1913static struct MeshTunnel * 1913static struct MeshTunnel *
1914tunnel_get_incoming (MESH_TunnelNumber tid) 1914tunnel_get_incoming (MESH_TunnelNumber tid)
1915{ 1915{
1916 GNUNET_HashCode hash; 1916 struct GNUNET_HashCode hash;
1917 1917
1918 GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV); 1918 GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV);
1919 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash); 1919 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
@@ -1938,7 +1938,7 @@ tunnel_get_by_local_id (struct MeshClient *c, MESH_TunnelNumber tid)
1938 } 1938 }
1939 else 1939 else
1940 { 1940 {
1941 GNUNET_HashCode hash; 1941 struct GNUNET_HashCode hash;
1942 1942
1943 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash); 1943 GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
1944 return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash); 1944 return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash);
@@ -1958,7 +1958,7 @@ static struct MeshTunnel *
1958tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid) 1958tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid)
1959{ 1959{
1960 struct MESH_TunnelID id; 1960 struct MESH_TunnelID id;
1961 GNUNET_HashCode hash; 1961 struct GNUNET_HashCode hash;
1962 1962
1963 id.oid = pi; 1963 id.oid = pi;
1964 id.tid = tid; 1964 id.tid = tid;
@@ -2334,7 +2334,7 @@ static int
2334tunnel_destroy (struct MeshTunnel *t) 2334tunnel_destroy (struct MeshTunnel *t)
2335{ 2335{
2336 struct MeshClient *c; 2336 struct MeshClient *c;
2337 GNUNET_HashCode hash; 2337 struct GNUNET_HashCode hash;
2338 unsigned int i; 2338 unsigned int i;
2339 int r; 2339 int r;
2340 2340
@@ -2498,7 +2498,7 @@ tunnel_delete_peer (struct MeshTunnel *t, GNUNET_PEER_Id peer)
2498 * @return GNUNET_OK on success 2498 * @return GNUNET_OK on success
2499 */ 2499 */
2500static int 2500static int
2501tunnel_destroy_iterator (void *cls, const GNUNET_HashCode * key, void *value) 2501tunnel_destroy_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
2502{ 2502{
2503 struct MeshTunnel *t = value; 2503 struct MeshTunnel *t = value;
2504 struct MeshClient *c = cls; 2504 struct MeshClient *c = cls;
@@ -2916,7 +2916,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
2916 MESH_TunnelNumber tid; 2916 MESH_TunnelNumber tid;
2917 struct GNUNET_MESH_ManipulatePath *msg; 2917 struct GNUNET_MESH_ManipulatePath *msg;
2918 struct GNUNET_PeerIdentity *pi; 2918 struct GNUNET_PeerIdentity *pi;
2919 GNUNET_HashCode hash; 2919 struct GNUNET_HashCode hash;
2920 struct MeshPeerPath *path; 2920 struct MeshPeerPath *path;
2921 struct MeshPeerInfo *dest_peer_info; 2921 struct MeshPeerInfo *dest_peer_info;
2922 struct MeshPeerInfo *orig_peer_info; 2922 struct MeshPeerInfo *orig_peer_info;
@@ -3574,7 +3574,7 @@ static struct GNUNET_CORE_MessageHandler core_handlers[] = {
3574 * @return GNUNET_OK on success 3574 * @return GNUNET_OK on success
3575 */ 3575 */
3576static int 3576static int
3577deregister_app (void *cls, const GNUNET_HashCode * key, void *value) 3577deregister_app (void *cls, const struct GNUNET_HashCode * key, void *value)
3578{ 3578{
3579 GNUNET_break (GNUNET_YES == 3579 GNUNET_break (GNUNET_YES ==
3580 GNUNET_CONTAINER_multihashmap_remove (applications, key, 3580 GNUNET_CONTAINER_multihashmap_remove (applications, key,
@@ -3689,7 +3689,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
3689 */ 3689 */
3690static void 3690static void
3691dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, 3691dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3692 const GNUNET_HashCode * key, 3692 const struct GNUNET_HashCode * key,
3693 const struct GNUNET_PeerIdentity *get_path, 3693 const struct GNUNET_PeerIdentity *get_path,
3694 unsigned int get_path_length, 3694 unsigned int get_path_length,
3695 const struct GNUNET_PeerIdentity *put_path, 3695 const struct GNUNET_PeerIdentity *put_path,
@@ -3737,7 +3737,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3737 */ 3737 */
3738static void 3738static void
3739dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp, 3739dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp,
3740 const GNUNET_HashCode * key, 3740 const struct GNUNET_HashCode * key,
3741 const struct GNUNET_PeerIdentity *get_path, 3741 const struct GNUNET_PeerIdentity *get_path,
3742 unsigned int get_path_length, 3742 unsigned int get_path_length,
3743 const struct GNUNET_PeerIdentity *put_path, 3743 const struct GNUNET_PeerIdentity *put_path,
@@ -3888,7 +3888,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
3888 if (napps > 0) 3888 if (napps > 0)
3889 { 3889 {
3890 GNUNET_MESH_ApplicationType at; 3890 GNUNET_MESH_ApplicationType at;
3891 GNUNET_HashCode hc; 3891 struct GNUNET_HashCode hc;
3892 3892
3893 c->apps = GNUNET_CONTAINER_multihashmap_create (napps); 3893 c->apps = GNUNET_CONTAINER_multihashmap_create (napps);
3894 for (i = 0; i < napps; i++) 3894 for (i = 0; i < napps; i++)
@@ -3911,7 +3911,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
3911 if (ntypes > 0) 3911 if (ntypes > 0)
3912 { 3912 {
3913 uint16_t u16; 3913 uint16_t u16;
3914 GNUNET_HashCode hc; 3914 struct GNUNET_HashCode hc;
3915 3915
3916 t = (uint16_t *) & a[napps]; 3916 t = (uint16_t *) & a[napps];
3917 c->types = GNUNET_CONTAINER_multihashmap_create (ntypes); 3917 c->types = GNUNET_CONTAINER_multihashmap_create (ntypes);
@@ -4238,7 +4238,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client,
4238 struct GNUNET_MESH_ConnectPeerByType *connect_msg; 4238 struct GNUNET_MESH_ConnectPeerByType *connect_msg;
4239 struct MeshClient *c; 4239 struct MeshClient *c;
4240 struct MeshTunnel *t; 4240 struct MeshTunnel *t;
4241 GNUNET_HashCode hash; 4241 struct GNUNET_HashCode hash;
4242 MESH_TunnelNumber tid; 4242 MESH_TunnelNumber tid;
4243 4243
4244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got connect by type request\n"); 4244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got connect by type request\n");
@@ -4717,7 +4717,7 @@ core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
4717 * GNUNET_NO if not. 4717 * GNUNET_NO if not.
4718 */ 4718 */
4719static int 4719static int
4720shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value) 4720shutdown_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
4721{ 4721{
4722 struct MeshTunnel *t = value; 4722 struct MeshTunnel *t = value;
4723 4723
@@ -4735,7 +4735,7 @@ shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
4735 * GNUNET_NO if not. 4735 * GNUNET_NO if not.
4736 */ 4736 */
4737static int 4737static int
4738shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value) 4738shutdown_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
4739{ 4739{
4740 struct MeshPeerInfo *p = value; 4740 struct MeshPeerInfo *p = value;
4741 struct MeshPeerQueue *q; 4741 struct MeshPeerQueue *q;
diff --git a/src/mesh/mesh_tunnel_tree.c b/src/mesh/mesh_tunnel_tree.c
index 287eefc7b..a754d9c42 100644
--- a/src/mesh/mesh_tunnel_tree.c
+++ b/src/mesh/mesh_tunnel_tree.c
@@ -1050,7 +1050,7 @@ tree_debug (struct MeshTunnelTree *t)
1050 * @return GNUNET_YES if we should continue to iterate, GNUNET_NO if not. 1050 * @return GNUNET_YES if we should continue to iterate, GNUNET_NO if not.
1051 */ 1051 */
1052static int 1052static int
1053iterate_free (void *cls, const GNUNET_HashCode * key, void *value) 1053iterate_free (void *cls, const struct GNUNET_HashCode * key, void *value)
1054{ 1054{
1055 GNUNET_free (value); 1055 GNUNET_free (value);
1056 return GNUNET_YES; 1056 return GNUNET_YES;
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index d6c299882..4d497c8a1 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -200,7 +200,7 @@ write_key_to_file (const char *filename, struct GNUNET_NAMESTORE_CryptoContainer
200} 200}
201 201
202int zone_to_disk_it (void *cls, 202int zone_to_disk_it (void *cls,
203 const GNUNET_HashCode *key, 203 const struct GNUNET_HashCode *key,
204 void *value) 204 void *value)
205{ 205{
206 struct GNUNET_NAMESTORE_CryptoContainer * c = value; 206 struct GNUNET_NAMESTORE_CryptoContainer * c = value;
@@ -391,7 +391,7 @@ handle_lookup_name_it (void *cls,
391 struct GNUNET_CRYPTO_RsaSignature *signature_new = NULL; 391 struct GNUNET_CRYPTO_RsaSignature *signature_new = NULL;
392 struct GNUNET_TIME_Absolute e; 392 struct GNUNET_TIME_Absolute e;
393 struct GNUNET_CRYPTO_ShortHashCode zone_key_hash; 393 struct GNUNET_CRYPTO_ShortHashCode zone_key_hash;
394 GNUNET_HashCode long_hash; 394 struct GNUNET_HashCode long_hash;
395 char *rd_tmp; 395 char *rd_tmp;
396 char *name_tmp; 396 char *name_tmp;
397 size_t rd_ser_len; 397 size_t rd_ser_len;
@@ -862,7 +862,7 @@ static void handle_record_create (void *cls,
862 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; 862 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
863 struct RecordCreateResponseMessage rcr_msg; 863 struct RecordCreateResponseMessage rcr_msg;
864 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; 864 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
865 GNUNET_HashCode long_hash; 865 struct GNUNET_HashCode long_hash;
866 size_t name_len; 866 size_t name_len;
867 size_t msg_size; 867 size_t msg_size;
868 size_t msg_size_exp; 868 size_t msg_size_exp;
@@ -1116,7 +1116,7 @@ static void handle_record_remove (void *cls,
1116 struct GNUNET_NAMESTORE_CryptoContainer *cc = NULL; 1116 struct GNUNET_NAMESTORE_CryptoContainer *cc = NULL;
1117 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub; 1117 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
1118 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash; 1118 struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
1119 GNUNET_HashCode long_hash; 1119 struct GNUNET_HashCode long_hash;
1120 char * pkey_tmp = NULL; 1120 char * pkey_tmp = NULL;
1121 char * name_tmp = NULL; 1121 char * name_tmp = NULL;
1122 char * rd_ser = NULL; 1122 char * rd_ser = NULL;
@@ -1462,7 +1462,7 @@ void zone_iteraterate_proc (void *cls,
1462 struct GNUNET_CRYPTO_RsaSignature * new_signature; 1462 struct GNUNET_CRYPTO_RsaSignature * new_signature;
1463 struct GNUNET_NAMESTORE_CryptoContainer *cc; 1463 struct GNUNET_NAMESTORE_CryptoContainer *cc;
1464 struct GNUNET_CRYPTO_ShortHashCode hash; 1464 struct GNUNET_CRYPTO_ShortHashCode hash;
1465 GNUNET_HashCode long_hash; 1465 struct GNUNET_HashCode long_hash;
1466 struct GNUNET_TIME_Absolute e; 1466 struct GNUNET_TIME_Absolute e;
1467 unsigned int rd_count_filtered = 0; 1467 unsigned int rd_count_filtered = 0;
1468 int include; 1468 int include;
@@ -1837,7 +1837,7 @@ static void handle_iteration_next (void *cls,
1837 1837
1838int zonekey_file_it (void *cls, const char *filename) 1838int zonekey_file_it (void *cls, const char *filename)
1839{ 1839{
1840 GNUNET_HashCode long_hash; 1840 struct GNUNET_HashCode long_hash;
1841 int *counter = cls; 1841 int *counter = cls;
1842 if ((filename != NULL) && (NULL != strstr(filename, ".zkey"))) 1842 if ((filename != NULL) && (NULL != strstr(filename, ".zkey")))
1843 { 1843 {
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c
index 8c3227874..329602d41 100644
--- a/src/namestore/test_namestore_api_remove_not_existing_record.c
+++ b/src/namestore/test_namestore_api_remove_not_existing_record.c
@@ -48,7 +48,7 @@ static struct GNUNET_OS_Process *arm;
48static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; 48static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
49static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; 49static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
50struct GNUNET_CRYPTO_RsaSignature *s_signature; 50struct GNUNET_CRYPTO_RsaSignature *s_signature;
51static GNUNET_HashCode s_zone; 51static struct GNUNET_HashCode s_zone;
52struct GNUNET_NAMESTORE_RecordData *s_rd; 52struct GNUNET_NAMESTORE_RecordData *s_rd;
53static char *s_name; 53static char *s_name;
54 54
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index 066554187..f18aad93f 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -38,11 +38,11 @@ static struct GNUNET_OS_Process *arm;
38 38
39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; 39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; 40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
41static GNUNET_HashCode zone; 41static struct GNUNET_HashCode zone;
42 42
43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; 43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2;
44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; 44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2;
45static GNUNET_HashCode zone2; 45static struct GNUNET_HashCode zone2;
46 46
47static struct GNUNET_NAMESTORE_ZoneIterator *zi; 47static struct GNUNET_NAMESTORE_ZoneIterator *zi;
48static int res; 48static int res;
@@ -222,7 +222,7 @@ void zone_proc (void *cls,
222 /* verify signature returned from name store */ 222 /* verify signature returned from name store */
223 if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature)) 223 if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature))
224 { 224 {
225 GNUNET_HashCode zone_key_hash; 225 struct GNUNET_HashCode zone_key_hash;
226 GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone_key_hash); 226 GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone_key_hash);
227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value); 227 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Verifying signature for `%s' in zone `%s' with %u records and expiration %llu failed\n", name, GNUNET_h2s(&zone_key_hash), rd_count, expire.abs_value);
228 228
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index 9f62c73b6..90031edc7 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -38,11 +38,11 @@ static struct GNUNET_OS_Process *arm;
38 38
39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey; 39static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey; 40static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
41static GNUNET_HashCode zone; 41static struct GNUNET_HashCode zone;
42 42
43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2; 43static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2;
44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2; 44static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2;
45static GNUNET_HashCode zone2; 45static struct GNUNET_HashCode zone2;
46 46
47static struct GNUNET_NAMESTORE_ZoneIterator *zi; 47static struct GNUNET_NAMESTORE_ZoneIterator *zi;
48static int res; 48static int res;
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index af8c7c081..3031e6853 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -477,7 +477,7 @@ static uint32_t
477get_matching_bits (struct GNUNET_TIME_Absolute timestamp, 477get_matching_bits (struct GNUNET_TIME_Absolute timestamp,
478 const struct GNUNET_PeerIdentity *id) 478 const struct GNUNET_PeerIdentity *id)
479{ 479{
480 GNUNET_HashCode timestamp_hash; 480 struct GNUNET_HashCode timestamp_hash;
481 481
482 GNUNET_CRYPTO_hash (&timestamp.abs_value, sizeof (timestamp.abs_value), 482 GNUNET_CRYPTO_hash (&timestamp.abs_value, sizeof (timestamp.abs_value),
483 &timestamp_hash); 483 &timestamp_hash);
@@ -699,7 +699,7 @@ setup_flood_message (unsigned int slot, struct GNUNET_TIME_Absolute ts)
699 * @return GNUNET_OK (continue to iterate) 699 * @return GNUNET_OK (continue to iterate)
700 */ 700 */
701static int 701static int
702schedule_current_round (void *cls, const GNUNET_HashCode * key, void *value) 702schedule_current_round (void *cls, const struct GNUNET_HashCode * key, void *value)
703{ 703{
704 struct NSEPeerEntry *peer_entry = value; 704 struct NSEPeerEntry *peer_entry = value;
705 struct GNUNET_TIME_Relative delay; 705 struct GNUNET_TIME_Relative delay;
@@ -791,7 +791,7 @@ update_flood_message (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
791 * @return the number of leading zero bits. 791 * @return the number of leading zero bits.
792 */ 792 */
793static unsigned int 793static unsigned int
794count_leading_zeroes (const GNUNET_HashCode * hash) 794count_leading_zeroes (const struct GNUNET_HashCode * hash)
795{ 795{
796 unsigned int hash_count; 796 unsigned int hash_count;
797 797
@@ -817,7 +817,7 @@ check_proof_of_work (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey,
817{ 817{
818 char buf[sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) + 818 char buf[sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) +
819 sizeof (val)] GNUNET_ALIGN; 819 sizeof (val)] GNUNET_ALIGN;
820 GNUNET_HashCode result; 820 struct GNUNET_HashCode result;
821 821
822 memcpy (buf, &val, sizeof (val)); 822 memcpy (buf, &val, sizeof (val));
823 memcpy (&buf[sizeof (val)], pkey, 823 memcpy (&buf[sizeof (val)], pkey,
@@ -862,7 +862,7 @@ find_proof (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
862 uint64_t counter; 862 uint64_t counter;
863 char buf[sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) + 863 char buf[sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) +
864 sizeof (uint64_t)] GNUNET_ALIGN; 864 sizeof (uint64_t)] GNUNET_ALIGN;
865 GNUNET_HashCode result; 865 struct GNUNET_HashCode result;
866 unsigned int i; 866 unsigned int i;
867 867
868 proof_task = GNUNET_SCHEDULER_NO_TASK; 868 proof_task = GNUNET_SCHEDULER_NO_TASK;
@@ -952,7 +952,7 @@ verify_message_crypto (const struct GNUNET_NSE_FloodMessage *incoming_flood)
952 * @return GNUNET_OK (continue to iterate) 952 * @return GNUNET_OK (continue to iterate)
953 */ 953 */
954static int 954static int
955update_flood_times (void *cls, const GNUNET_HashCode * key, void *value) 955update_flood_times (void *cls, const struct GNUNET_HashCode * key, void *value)
956{ 956{
957 struct NSEPeerEntry *exclude = cls; 957 struct NSEPeerEntry *exclude = cls;
958 struct NSEPeerEntry *peer_entry = value; 958 struct NSEPeerEntry *peer_entry = value;
@@ -1382,7 +1382,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1382 GNUNET_SCHEDULER_shutdown (); 1382 GNUNET_SCHEDULER_shutdown ();
1383 return; 1383 return;
1384 } 1384 }
1385 if (nse_work_required >= sizeof (GNUNET_HashCode) * 8) 1385 if (nse_work_required >= sizeof (struct GNUNET_HashCode) * 8)
1386 { 1386 {
1387 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1387 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1388 _("Invalid work requirement for NSE service. Exiting.\n")); 1388 _("Invalid work requirement for NSE service. Exiting.\n"));
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index df3486ea0..59f9a9b6e 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -419,7 +419,7 @@ bind_address (const struct GNUNET_PeerIdentity *peer,
419 * @return GNUNET_YES (continue to iterate) 419 * @return GNUNET_YES (continue to iterate)
420 */ 420 */
421static int 421static int
422add_to_tc (void *cls, const GNUNET_HashCode * key, void *value) 422add_to_tc (void *cls, const struct GNUNET_HashCode * key, void *value)
423{ 423{
424 struct GNUNET_SERVER_TransmitContext *tc = cls; 424 struct GNUNET_SERVER_TransmitContext *tc = cls;
425 struct HostEntry *pos = value; 425 struct HostEntry *pos = value;
@@ -594,7 +594,7 @@ handle_get_all (void *cls, struct GNUNET_SERVER_Client *client,
594 * FIXME. 594 * FIXME.
595 */ 595 */
596static int 596static int
597do_notify_entry (void *cls, const GNUNET_HashCode * key, void *value) 597do_notify_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
598{ 598{
599 struct GNUNET_SERVER_Client *client = cls; 599 struct GNUNET_SERVER_Client *client = cls;
600 struct HostEntry *he = value; 600 struct HostEntry *he = value;
@@ -631,7 +631,7 @@ handle_notify (void *cls, struct GNUNET_SERVER_Client *client,
631 * FIXME. 631 * FIXME.
632 */ 632 */
633static int 633static int
634free_host_entry (void *cls, const GNUNET_HashCode * key, void *value) 634free_host_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
635{ 635{
636 struct HostEntry *he = value; 636 struct HostEntry *he = value;
637 637
diff --git a/src/regex/regex.c b/src/regex/regex.c
index d697aee89..80eb01b9c 100644
--- a/src/regex/regex.c
+++ b/src/regex/regex.c
@@ -192,7 +192,7 @@ struct GNUNET_REGEX_State
192 /** 192 /**
193 * Hash of the state. 193 * Hash of the state.
194 */ 194 */
195 GNUNET_HashCode hash; 195 struct GNUNET_HashCode hash;
196 196
197 /** 197 /**
198 * Proof for this state. 198 * Proof for this state.
@@ -2435,7 +2435,7 @@ GNUNET_REGEX_get_computed_regex (struct GNUNET_REGEX_Automaton *a)
2435 */ 2435 */
2436unsigned int 2436unsigned int
2437GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len, 2437GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
2438 GNUNET_HashCode * key) 2438 struct GNUNET_HashCode * key)
2439{ 2439{
2440 unsigned int size; 2440 unsigned int size;
2441 2441
@@ -2461,7 +2461,7 @@ GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
2461 * @return GNUNET_OK if the proof is valid for the given key 2461 * @return GNUNET_OK if the proof is valid for the given key
2462 */ 2462 */
2463int 2463int
2464GNUNET_REGEX_check_proof (const char *proof, const GNUNET_HashCode * key) 2464GNUNET_REGEX_check_proof (const char *proof, const struct GNUNET_HashCode * key)
2465{ 2465{
2466 return GNUNET_OK; 2466 return GNUNET_OK;
2467} 2467}
diff --git a/src/regex/test_regex_iterate_api.c b/src/regex/test_regex_iterate_api.c
index 90907baee..a4cef5a51 100644
--- a/src/regex/test_regex_iterate_api.c
+++ b/src/regex/test_regex_iterate_api.c
@@ -28,7 +28,7 @@
28#include "gnunet_regex_lib.h" 28#include "gnunet_regex_lib.h"
29 29
30void 30void
31key_iterator (void *cls, const GNUNET_HashCode * key, const char *proof, 31key_iterator (void *cls, const struct GNUNET_HashCode * key, const char *proof,
32 int accepting, unsigned int num_edges, 32 int accepting, unsigned int num_edges,
33 const struct GNUNET_REGEX_Edge *edges) 33 const struct GNUNET_REGEX_Edge *edges)
34{ 34{
diff --git a/src/testing_old/testing_group.c b/src/testing_old/testing_group.c
index b9bdc66c2..086ce2720 100644
--- a/src/testing_old/testing_group.c
+++ b/src/testing_old/testing_group.c
@@ -1037,9 +1037,9 @@ struct ProgressMeter
1037 * @param hash set to uid (extended with zeros) 1037 * @param hash set to uid (extended with zeros)
1038 */ 1038 */
1039static void 1039static void
1040hash_from_uid (uint32_t uid, GNUNET_HashCode * hash) 1040hash_from_uid (uint32_t uid, struct GNUNET_HashCode * hash)
1041{ 1041{
1042 memset (hash, 0, sizeof (GNUNET_HashCode)); 1042 memset (hash, 0, sizeof (struct GNUNET_HashCode));
1043 *((uint32_t *) hash) = uid; 1043 *((uint32_t *) hash) = uid;
1044} 1044}
1045 1045
@@ -1050,7 +1050,7 @@ hash_from_uid (uint32_t uid, GNUNET_HashCode * hash)
1050 * @param hash set to uid (extended with zeros) 1050 * @param hash set to uid (extended with zeros)
1051 */ 1051 */
1052static void 1052static void
1053uid_from_hash (const GNUNET_HashCode * hash, uint32_t * uid) 1053uid_from_hash (const struct GNUNET_HashCode * hash, uint32_t * uid)
1054{ 1054{
1055 memcpy (uid, hash, sizeof (uint32_t)); 1055 memcpy (uid, hash, sizeof (uint32_t));
1056} 1056}
@@ -1579,8 +1579,8 @@ remove_connections (struct GNUNET_TESTING_PeerGroup *pg, unsigned int first,
1579 struct PeerConnection **second_tail; 1579 struct PeerConnection **second_tail;
1580 1580
1581#else 1581#else
1582 GNUNET_HashCode hash_first; 1582 struct GNUNET_HashCode hash_first;
1583 GNUNET_HashCode hash_second; 1583 struct GNUNET_HashCode hash_second;
1584 1584
1585 hash_from_uid (first, &hash_first); 1585 hash_from_uid (first, &hash_first);
1586 hash_from_uid (second, &hash_second); 1586 hash_from_uid (second, &hash_second);
@@ -2470,7 +2470,7 @@ create_clique (struct GNUNET_TESTING_PeerGroup *pg,
2470 * GNUNET_NO if not. 2470 * GNUNET_NO if not.
2471 */ 2471 */
2472static int 2472static int
2473unblacklist_iterator (void *cls, const GNUNET_HashCode * key, void *value) 2473unblacklist_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
2474{ 2474{
2475 struct UnblacklistContext *un_ctx = cls; 2475 struct UnblacklistContext *un_ctx = cls;
2476 uint32_t second_pos; 2476 uint32_t second_pos;
@@ -2760,7 +2760,7 @@ create_ring (struct GNUNET_TESTING_PeerGroup *pg,
2760 * "fixing" now. 2760 * "fixing" now.
2761 */ 2761 */
2762static int 2762static int
2763friend_file_iterator (void *cls, const GNUNET_HashCode * key, void *value) 2763friend_file_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
2764{ 2764{
2765 FILE *temp_friend_handle = cls; 2765 FILE *temp_friend_handle = cls;
2766 struct GNUNET_TESTING_Daemon *peer = value; 2766 struct GNUNET_TESTING_Daemon *peer = value;
@@ -2797,7 +2797,7 @@ struct BlacklistContext
2797 * @return GNUNET_YES to continue iteration 2797 * @return GNUNET_YES to continue iteration
2798 */ 2798 */
2799static int 2799static int
2800blacklist_file_iterator (void *cls, const GNUNET_HashCode * key, void *value) 2800blacklist_file_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
2801{ 2801{
2802 struct BlacklistContext *blacklist_ctx = cls; 2802 struct BlacklistContext *blacklist_ctx = cls;
2803 struct GNUNET_TESTING_Daemon *peer = value; 2803 struct GNUNET_TESTING_Daemon *peer = value;
@@ -3682,7 +3682,7 @@ schedule_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
3682 * @return GNUNET_YES to continue iteration 3682 * @return GNUNET_YES to continue iteration
3683 */ 3683 */
3684static int 3684static int
3685connect_iterator (void *cls, const GNUNET_HashCode * key, void *value) 3685connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
3686{ 3686{
3687 struct ConnectTopologyContext *ct_ctx = cls; 3687 struct ConnectTopologyContext *ct_ctx = cls;
3688 struct PeerData *first = ct_ctx->first; 3688 struct PeerData *first = ct_ctx->first;
@@ -3713,7 +3713,7 @@ connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
3713 * @return GNUNET_YES to continue iteration 3713 * @return GNUNET_YES to continue iteration
3714 */ 3714 */
3715static int 3715static int
3716copy_topology_iterator (void *cls, const GNUNET_HashCode * key, void *value) 3716copy_topology_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
3717{ 3717{
3718 struct PeerData *first = cls; 3718 struct PeerData *first = cls;
3719 3719
@@ -4108,12 +4108,12 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg,
4108 * @return GNUNET_YES to continue iteration 4108 * @return GNUNET_YES to continue iteration
4109 */ 4109 */
4110static int 4110static int
4111random_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value) 4111random_connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
4112{ 4112{
4113 struct RandomContext *random_ctx = cls; 4113 struct RandomContext *random_ctx = cls;
4114 double random_number; 4114 double random_number;
4115 uint32_t second_pos; 4115 uint32_t second_pos;
4116 GNUNET_HashCode first_hash; 4116 struct GNUNET_HashCode first_hash;
4117 4117
4118 random_number = 4118 random_number =
4119 ((double) 4119 ((double)
@@ -4153,11 +4153,11 @@ random_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
4153 * @return GNUNET_YES to continue iteration 4153 * @return GNUNET_YES to continue iteration
4154 */ 4154 */
4155static int 4155static int
4156minimum_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value) 4156minimum_connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
4157{ 4157{
4158 struct MinimumContext *min_ctx = cls; 4158 struct MinimumContext *min_ctx = cls;
4159 uint32_t second_pos; 4159 uint32_t second_pos;
4160 GNUNET_HashCode first_hash; 4160 struct GNUNET_HashCode first_hash;
4161 unsigned int i; 4161 unsigned int i;
4162 4162
4163 if (GNUNET_CONTAINER_multihashmap_size 4163 if (GNUNET_CONTAINER_multihashmap_size
@@ -4211,10 +4211,10 @@ minimum_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
4211 * @return GNUNET_YES to continue iteration 4211 * @return GNUNET_YES to continue iteration
4212 */ 4212 */
4213static int 4213static int
4214dfs_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value) 4214dfs_connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
4215{ 4215{
4216 struct DFSContext *dfs_ctx = cls; 4216 struct DFSContext *dfs_ctx = cls;
4217 GNUNET_HashCode first_hash; 4217 struct GNUNET_HashCode first_hash;
4218 4218
4219 if (dfs_ctx->current == dfs_ctx->chosen) 4219 if (dfs_ctx->current == dfs_ctx->chosen)
4220 { 4220 {
@@ -4538,7 +4538,7 @@ struct FindClosestContext
4538 * GNUNET_NO if not. 4538 * GNUNET_NO if not.
4539 */ 4539 */
4540static int 4540static int
4541find_closest_peers (void *cls, const GNUNET_HashCode * key, void *value) 4541find_closest_peers (void *cls, const struct GNUNET_HashCode * key, void *value)
4542{ 4542{
4543 struct FindClosestContext *closest_ctx = cls; 4543 struct FindClosestContext *closest_ctx = cls;
4544 struct GNUNET_TESTING_Daemon *daemon = value; 4544 struct GNUNET_TESTING_Daemon *daemon = value;
@@ -4627,7 +4627,7 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
4627 struct PeerConnection *peer_iter; 4627 struct PeerConnection *peer_iter;
4628#else 4628#else
4629 struct DFSContext dfs_ctx; 4629 struct DFSContext dfs_ctx;
4630 GNUNET_HashCode second_hash; 4630 struct GNUNET_HashCode second_hash;
4631#endif 4631#endif
4632 4632
4633#if OLD 4633#if OLD
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index 356e2c963..3578b9e9b 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -316,7 +316,7 @@ is_connection_allowed (struct Peer *peer)
316 * @return GNUNET_YES (always: continue to iterate) 316 * @return GNUNET_YES (always: continue to iterate)
317 */ 317 */
318static int 318static int
319free_peer (void *cls, const GNUNET_HashCode * pid, void *value) 319free_peer (void *cls, const struct GNUNET_HashCode * pid, void *value)
320{ 320{
321 struct Peer *pos = value; 321 struct Peer *pos = value;
322 322
@@ -573,7 +573,7 @@ struct FindAdvHelloContext
573 * @return GNUNET_YES (continue iteration) 573 * @return GNUNET_YES (continue iteration)
574 */ 574 */
575static int 575static int
576find_advertisable_hello (void *cls, const GNUNET_HashCode * pid, void *value) 576find_advertisable_hello (void *cls, const struct GNUNET_HashCode * pid, void *value)
577{ 577{
578 struct FindAdvHelloContext *fah = cls; 578 struct FindAdvHelloContext *fah = cls;
579 struct Peer *pos = value; 579 struct Peer *pos = value;
@@ -659,7 +659,7 @@ schedule_next_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
659 * @return GNUNET_YES (always) 659 * @return GNUNET_YES (always)
660 */ 660 */
661static int 661static int
662reschedule_hellos (void *cls, const GNUNET_HashCode * pid, void *value) 662reschedule_hellos (void *cls, const struct GNUNET_HashCode * pid, void *value)
663{ 663{
664 struct Peer *peer = value; 664 struct Peer *peer = value;
665 struct Peer *skip = cls; 665 struct Peer *skip = cls;
@@ -743,7 +743,7 @@ connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
743 * @return GNUNET_YES (continue to iterate) 743 * @return GNUNET_YES (continue to iterate)
744 */ 744 */
745static int 745static int
746try_add_peers (void *cls, const GNUNET_HashCode * pid, void *value) 746try_add_peers (void *cls, const struct GNUNET_HashCode * pid, void *value)
747{ 747{
748 struct Peer *pos = value; 748 struct Peer *pos = value;
749 749
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index 8c368886b..c71ecdfd8 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -395,7 +395,7 @@ GST_blacklist_start (struct GNUNET_SERVER_Handle *server)
395 * @return GNUNET_OK (continue to iterate) 395 * @return GNUNET_OK (continue to iterate)
396 */ 396 */
397static int 397static int
398free_blacklist_entry (void *cls, const GNUNET_HashCode * key, void *value) 398free_blacklist_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
399{ 399{
400 char *be = value; 400 char *be = value;
401 401
@@ -701,7 +701,7 @@ GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
701 * @return GNUNET_OK if the entry does not match, GNUNET_NO if it matches 701 * @return GNUNET_OK if the entry does not match, GNUNET_NO if it matches
702 */ 702 */
703static int 703static int
704test_blacklisted (void *cls, const GNUNET_HashCode * key, void *value) 704test_blacklisted (void *cls, const struct GNUNET_HashCode * key, void *value)
705{ 705{
706 const char *transport_name = cls; 706 const char *transport_name = cls;
707 char *be = value; 707 char *be = value;
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index c5801685a..e49550364 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -2888,7 +2888,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity
2888{ 2888{
2889 struct NeighbourMapEntry *n; 2889 struct NeighbourMapEntry *n;
2890 const struct SessionDisconnectMessage *sdm; 2890 const struct SessionDisconnectMessage *sdm;
2891 GNUNET_HashCode hc; 2891 struct GNUNET_HashCode hc;
2892 2892
2893 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2893 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2894 "Received DISCONNECT message from peer `%s'\n", 2894 "Received DISCONNECT message from peer `%s'\n",
@@ -2972,7 +2972,7 @@ struct IteratorContext
2972 * @return GNUNET_OK (continue to iterate) 2972 * @return GNUNET_OK (continue to iterate)
2973 */ 2973 */
2974static int 2974static int
2975neighbours_iterate (void *cls, const GNUNET_HashCode * key, void *value) 2975neighbours_iterate (void *cls, const struct GNUNET_HashCode * key, void *value)
2976{ 2976{
2977 struct IteratorContext *ic = cls; 2977 struct IteratorContext *ic = cls;
2978 struct NeighbourMapEntry *n = value; 2978 struct NeighbourMapEntry *n = value;
@@ -3111,7 +3111,7 @@ GST_neighbours_start (void *cls,
3111 * @return GNUNET_OK (continue to iterate) 3111 * @return GNUNET_OK (continue to iterate)
3112 */ 3112 */
3113static int 3113static int
3114disconnect_all_neighbours (void *cls, const GNUNET_HashCode * key, void *value) 3114disconnect_all_neighbours (void *cls, const struct GNUNET_HashCode * key, void *value)
3115{ 3115{
3116 struct NeighbourMapEntry *n = value; 3116 struct NeighbourMapEntry *n = value;
3117 3117
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 842196965..89977eac4 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -334,7 +334,7 @@ struct ValidationEntryMatchContext
334 * GNUNET_NO if the entry does match 334 * GNUNET_NO if the entry does match
335 */ 335 */
336static int 336static int
337validation_entry_match (void *cls, const GNUNET_HashCode * key, void *value) 337validation_entry_match (void *cls, const struct GNUNET_HashCode * key, void *value)
338{ 338{
339 struct ValidationEntryMatchContext *vemc = cls; 339 struct ValidationEntryMatchContext *vemc = cls;
340 struct ValidationEntry *ve = value; 340 struct ValidationEntry *ve = value;
@@ -357,7 +357,7 @@ validation_entry_match (void *cls, const GNUNET_HashCode * key, void *value)
357 * @return GNUNET_YES (continue to iterate) 357 * @return GNUNET_YES (continue to iterate)
358 */ 358 */
359static int 359static int
360cleanup_validation_entry (void *cls, const GNUNET_HashCode * key, void *value) 360cleanup_validation_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
361{ 361{
362 struct ValidationEntry *ve = value; 362 struct ValidationEntry *ve = value;
363 363
@@ -1171,7 +1171,7 @@ struct IteratorContext
1171 * @return GNUNET_OK (continue to iterate) 1171 * @return GNUNET_OK (continue to iterate)
1172 */ 1172 */
1173static int 1173static int
1174iterate_addresses (void *cls, const GNUNET_HashCode * key, void *value) 1174iterate_addresses (void *cls, const struct GNUNET_HashCode * key, void *value)
1175{ 1175{
1176 struct IteratorContext *ic = cls; 1176 struct IteratorContext *ic = cls;
1177 struct ValidationEntry *ve = value; 1177 struct ValidationEntry *ve = value;
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index af5c71540..450209aff 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -684,7 +684,7 @@ struct SessionClientCtx
684 684
685static int 685static int
686session_lookup_by_client_it (void *cls, 686session_lookup_by_client_it (void *cls,
687 const GNUNET_HashCode * key, 687 const struct GNUNET_HashCode * key,
688 void *value) 688 void *value)
689{ 689{
690 struct SessionClientCtx *sc_ctx = cls; 690 struct SessionClientCtx *sc_ctx = cls;
@@ -1129,7 +1129,7 @@ struct SessionItCtx
1129 1129
1130static int 1130static int
1131session_lookup_it (void *cls, 1131session_lookup_it (void *cls,
1132 const GNUNET_HashCode *key, 1132 const struct GNUNET_HashCode *key,
1133 void *value) 1133 void *value)
1134{ 1134{
1135 struct SessionItCtx * si_ctx = cls; 1135 struct SessionItCtx * si_ctx = cls;
@@ -1391,7 +1391,7 @@ tcp_plugin_get_session (void *cls,
1391 1391
1392static int 1392static int
1393session_disconnect_it (void *cls, 1393session_disconnect_it (void *cls,
1394 const GNUNET_HashCode * key, 1394 const struct GNUNET_HashCode * key,
1395 void *value) 1395 void *value)
1396{ 1396{
1397 struct Session *session = value; 1397 struct Session *session = value;
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index ad87ea68d..9bfe9f0c2 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -764,7 +764,7 @@ disconnect_session (struct Session *s)
764 * @return GNUNET_OK (continue to iterate) 764 * @return GNUNET_OK (continue to iterate)
765 */ 765 */
766static int 766static int
767disconnect_and_free_it (void *cls, const GNUNET_HashCode * key, void *value) 767disconnect_and_free_it (void *cls, const struct GNUNET_HashCode * key, void *value)
768{ 768{
769 disconnect_session(value); 769 disconnect_session(value);
770 return GNUNET_OK; 770 return GNUNET_OK;
@@ -857,7 +857,7 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target,
857 857
858static int 858static int
859session_cmp_it (void *cls, 859session_cmp_it (void *cls,
860 const GNUNET_HashCode * key, 860 const struct GNUNET_HashCode * key,
861 void *value) 861 void *value)
862{ 862{
863 struct SessionCompareContext * cctx = cls; 863 struct SessionCompareContext * cctx = cls;
@@ -1461,7 +1461,7 @@ struct LookupContext
1461 1461
1462 1462
1463static int 1463static int
1464lookup_session_by_addr_it (void *cls, const GNUNET_HashCode * key, void *value) 1464lookup_session_by_addr_it (void *cls, const struct GNUNET_HashCode * key, void *value)
1465{ 1465{
1466 struct LookupContext *l_ctx = cls; 1466 struct LookupContext *l_ctx = cls;
1467 struct Session * s = value; 1467 struct Session * s = value;
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 057479d53..289fea0b6 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -310,7 +310,7 @@ struct LookupCtx
310}; 310};
311 311
312int lookup_session_it (void *cls, 312int lookup_session_it (void *cls,
313 const GNUNET_HashCode * key, 313 const struct GNUNET_HashCode * key,
314 void *value) 314 void *value)
315{ 315{
316 struct LookupCtx *lctx = cls; 316 struct LookupCtx *lctx = cls;
@@ -394,7 +394,7 @@ disconnect_session (struct Session *s)
394} 394}
395 395
396static int 396static int
397get_session_delete_it (void *cls, const GNUNET_HashCode * key, void *value) 397get_session_delete_it (void *cls, const struct GNUNET_HashCode * key, void *value)
398{ 398{
399 struct Session *s = value; 399 struct Session *s = value;
400 disconnect_session (s); 400 disconnect_session (s);
@@ -630,7 +630,7 @@ struct gsi_ctx
630 630
631 631
632static int 632static int
633get_session_it (void *cls, const GNUNET_HashCode * key, void *value) 633get_session_it (void *cls, const struct GNUNET_HashCode * key, void *value)
634{ 634{
635 struct gsi_ctx *gsi = cls; 635 struct gsi_ctx *gsi = cls;
636 struct Session *s = value; 636 struct Session *s = value;
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index b97a24596..3a1068cd1 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -370,7 +370,7 @@ neighbour_add (struct GNUNET_TRANSPORT_Handle *h,
370 * GNUNET_NO if not. 370 * GNUNET_NO if not.
371 */ 371 */
372static int 372static int
373neighbour_delete (void *cls, const GNUNET_HashCode * key, void *value) 373neighbour_delete (void *cls, const struct GNUNET_HashCode * key, void *value)
374{ 374{
375 struct GNUNET_TRANSPORT_Handle *handle = cls; 375 struct GNUNET_TRANSPORT_Handle *handle = cls;
376 struct Neighbour *n = value; 376 struct Neighbour *n = value;
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 2c0fd57a8..82878a02a 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -903,7 +903,7 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind)
903 * @return string form; will be overwritten by next call to GNUNET_h2s. 903 * @return string form; will be overwritten by next call to GNUNET_h2s.
904 */ 904 */
905const char * 905const char *
906GNUNET_h2s (const GNUNET_HashCode * hc) 906GNUNET_h2s (const struct GNUNET_HashCode * hc)
907{ 907{
908 static struct GNUNET_CRYPTO_HashAsciiEncoded ret; 908 static struct GNUNET_CRYPTO_HashAsciiEncoded ret;
909 909
@@ -921,7 +921,7 @@ GNUNET_h2s (const GNUNET_HashCode * hc)
921 * @return string form; will be overwritten by next call to GNUNET_h2s_full. 921 * @return string form; will be overwritten by next call to GNUNET_h2s_full.
922 */ 922 */
923const char * 923const char *
924GNUNET_h2s_full (const GNUNET_HashCode * hc) 924GNUNET_h2s_full (const struct GNUNET_HashCode * hc)
925{ 925{
926 static struct GNUNET_CRYPTO_HashAsciiEncoded ret; 926 static struct GNUNET_CRYPTO_HashAsciiEncoded ret;
927 927
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c
index 8c226f67d..8d0852fc9 100644
--- a/src/util/container_bloomfilter.c
+++ b/src/util/container_bloomfilter.c
@@ -340,9 +340,9 @@ typedef int (*BitIterator) (void *cls,
340 */ 340 */
341static void 341static void
342iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf, 342iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf,
343 BitIterator callback, void *arg, const GNUNET_HashCode * key) 343 BitIterator callback, void *arg, const struct GNUNET_HashCode * key)
344{ 344{
345 GNUNET_HashCode tmp[2]; 345 struct GNUNET_HashCode tmp[2];
346 int bitCount; 346 int bitCount;
347 unsigned int round; 347 unsigned int round;
348 unsigned int slot = 0; 348 unsigned int slot = 0;
@@ -354,7 +354,7 @@ iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf,
354 GNUNET_assert (bf->bitArraySize * 8LL > bf->bitArraySize); 354 GNUNET_assert (bf->bitArraySize * 8LL > bf->bitArraySize);
355 while (bitCount > 0) 355 while (bitCount > 0)
356 { 356 {
357 while (slot < (sizeof (GNUNET_HashCode) / sizeof (uint32_t))) 357 while (slot < (sizeof (struct GNUNET_HashCode) / sizeof (uint32_t)))
358 { 358 {
359 if (GNUNET_YES != 359 if (GNUNET_YES !=
360 callback (arg, bf, 360 callback (arg, bf,
@@ -368,7 +368,7 @@ iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf,
368 } 368 }
369 if (bitCount > 0) 369 if (bitCount > 0)
370 { 370 {
371 GNUNET_CRYPTO_hash (&tmp[round & 1], sizeof (GNUNET_HashCode), 371 GNUNET_CRYPTO_hash (&tmp[round & 1], sizeof (struct GNUNET_HashCode),
372 &tmp[(round + 1) & 1]); 372 &tmp[(round + 1) & 1]);
373 round++; 373 round++;
374 slot = 0; 374 slot = 0;
@@ -696,7 +696,7 @@ GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf)
696 */ 696 */
697int 697int
698GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter 698GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
699 *bf, const GNUNET_HashCode * e) 699 *bf, const struct GNUNET_HashCode * e)
700{ 700{
701 int res; 701 int res;
702 702
@@ -716,7 +716,7 @@ GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
716 */ 716 */
717void 717void
718GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf, 718GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
719 const GNUNET_HashCode * e) 719 const struct GNUNET_HashCode * e)
720{ 720{
721 if (NULL == bf) 721 if (NULL == bf)
722 return; 722 return;
@@ -801,7 +801,7 @@ GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
801 */ 801 */
802void 802void
803GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf, 803GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf,
804 const GNUNET_HashCode * e) 804 const struct GNUNET_HashCode * e)
805{ 805{
806 if (NULL == bf) 806 if (NULL == bf)
807 return; 807 return;
@@ -827,7 +827,7 @@ GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf,
827 void *iterator_cls, size_t size, 827 void *iterator_cls, size_t size,
828 unsigned int k) 828 unsigned int k)
829{ 829{
830 GNUNET_HashCode hc; 830 struct GNUNET_HashCode hc;
831 unsigned int i; 831 unsigned int i;
832 832
833 GNUNET_free (bf->bitArray); 833 GNUNET_free (bf->bitArray);
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c
index 7e53a6440..ada98251c 100644
--- a/src/util/container_multihashmap.c
+++ b/src/util/container_multihashmap.c
@@ -39,7 +39,7 @@ struct MapEntry
39 /** 39 /**
40 * Key for the entry. 40 * Key for the entry.
41 */ 41 */
42 GNUNET_HashCode key; 42 struct GNUNET_HashCode key;
43 43
44 /** 44 /**
45 * Value of the entry. 45 * Value of the entry.
@@ -130,7 +130,7 @@ GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
130 */ 130 */
131static unsigned int 131static unsigned int
132idx_of (const struct GNUNET_CONTAINER_MultiHashMap *m, 132idx_of (const struct GNUNET_CONTAINER_MultiHashMap *m,
133 const GNUNET_HashCode * key) 133 const struct GNUNET_HashCode * key)
134{ 134{
135 GNUNET_assert (m != NULL); 135 GNUNET_assert (m != NULL);
136 return (*(unsigned int *) key) % m->map_length; 136 return (*(unsigned int *) key) % m->map_length;
@@ -163,14 +163,14 @@ GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap
163 */ 163 */
164void * 164void *
165GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap 165GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
166 *map, const GNUNET_HashCode * key) 166 *map, const struct GNUNET_HashCode * key)
167{ 167{
168 struct MapEntry *e; 168 struct MapEntry *e;
169 169
170 e = map->map[idx_of (map, key)]; 170 e = map->map[idx_of (map, key)];
171 while (e != NULL) 171 while (e != NULL)
172 { 172 {
173 if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) 173 if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
174 return e->value; 174 return e->value;
175 e = e->next; 175 e = e->next;
176 } 176 }
@@ -197,7 +197,7 @@ GNUNET_CONTAINER_multihashmap_iterate (const struct
197 unsigned int i; 197 unsigned int i;
198 struct MapEntry *e; 198 struct MapEntry *e;
199 struct MapEntry *n; 199 struct MapEntry *n;
200 GNUNET_HashCode kc; 200 struct GNUNET_HashCode kc;
201 201
202 count = 0; 202 count = 0;
203 GNUNET_assert (map != NULL); 203 GNUNET_assert (map != NULL);
@@ -233,7 +233,7 @@ GNUNET_CONTAINER_multihashmap_iterate (const struct
233 */ 233 */
234int 234int
235GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map, 235GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
236 const GNUNET_HashCode * key, void *value) 236 const struct GNUNET_HashCode * key, void *value)
237{ 237{
238 struct MapEntry *e; 238 struct MapEntry *e;
239 struct MapEntry *p; 239 struct MapEntry *p;
@@ -244,7 +244,7 @@ GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
244 e = map->map[i]; 244 e = map->map[i];
245 while (e != NULL) 245 while (e != NULL)
246 { 246 {
247 if ((0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) && 247 if ((0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode))) &&
248 (value == e->value)) 248 (value == e->value))
249 { 249 {
250 if (p == NULL) 250 if (p == NULL)
@@ -272,7 +272,7 @@ GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
272 */ 272 */
273int 273int
274GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap 274GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
275 *map, const GNUNET_HashCode * key) 275 *map, const struct GNUNET_HashCode * key)
276{ 276{
277 struct MapEntry *e; 277 struct MapEntry *e;
278 struct MapEntry *p; 278 struct MapEntry *p;
@@ -285,7 +285,7 @@ GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
285 e = map->map[i]; 285 e = map->map[i];
286 while (e != NULL) 286 while (e != NULL)
287 { 287 {
288 if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) 288 if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
289 { 289 {
290 if (p == NULL) 290 if (p == NULL)
291 map->map[i] = e->next; 291 map->map[i] = e->next;
@@ -321,14 +321,14 @@ GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
321int 321int
322GNUNET_CONTAINER_multihashmap_contains (const struct 322GNUNET_CONTAINER_multihashmap_contains (const struct
323 GNUNET_CONTAINER_MultiHashMap *map, 323 GNUNET_CONTAINER_MultiHashMap *map,
324 const GNUNET_HashCode * key) 324 const struct GNUNET_HashCode * key)
325{ 325{
326 struct MapEntry *e; 326 struct MapEntry *e;
327 327
328 e = map->map[idx_of (map, key)]; 328 e = map->map[idx_of (map, key)];
329 while (e != NULL) 329 while (e != NULL)
330 { 330 {
331 if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) 331 if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
332 return GNUNET_YES; 332 return GNUNET_YES;
333 e = e->next; 333 e = e->next;
334 } 334 }
@@ -349,7 +349,7 @@ GNUNET_CONTAINER_multihashmap_contains (const struct
349int 349int
350GNUNET_CONTAINER_multihashmap_contains_value (const struct 350GNUNET_CONTAINER_multihashmap_contains_value (const struct
351 GNUNET_CONTAINER_MultiHashMap 351 GNUNET_CONTAINER_MultiHashMap
352 *map, const GNUNET_HashCode * key, 352 *map, const struct GNUNET_HashCode * key,
353 const void *value) 353 const void *value)
354{ 354{
355 struct MapEntry *e; 355 struct MapEntry *e;
@@ -357,7 +357,7 @@ GNUNET_CONTAINER_multihashmap_contains_value (const struct
357 e = map->map[idx_of (map, key)]; 357 e = map->map[idx_of (map, key)];
358 while (e != NULL) 358 while (e != NULL)
359 { 359 {
360 if ((0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) && 360 if ((0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode))) &&
361 (e->value == value)) 361 (e->value == value))
362 return GNUNET_YES; 362 return GNUNET_YES;
363 e = e->next; 363 e = e->next;
@@ -416,7 +416,7 @@ grow (struct GNUNET_CONTAINER_MultiHashMap *map)
416 */ 416 */
417int 417int
418GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map, 418GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
419 const GNUNET_HashCode * key, void *value, 419 const struct GNUNET_HashCode * key, void *value,
420 enum GNUNET_CONTAINER_MultiHashMapOption opt) 420 enum GNUNET_CONTAINER_MultiHashMapOption opt)
421{ 421{
422 struct MapEntry *e; 422 struct MapEntry *e;
@@ -429,7 +429,7 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
429 e = map->map[i]; 429 e = map->map[i];
430 while (e != NULL) 430 while (e != NULL)
431 { 431 {
432 if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) 432 if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
433 { 433 {
434 if (opt == GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY) 434 if (opt == GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)
435 return GNUNET_SYSERR; 435 return GNUNET_SYSERR;
@@ -467,7 +467,7 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
467int 467int
468GNUNET_CONTAINER_multihashmap_get_multiple (const struct 468GNUNET_CONTAINER_multihashmap_get_multiple (const struct
469 GNUNET_CONTAINER_MultiHashMap *map, 469 GNUNET_CONTAINER_MultiHashMap *map,
470 const GNUNET_HashCode * key, 470 const struct GNUNET_HashCode * key,
471 GNUNET_CONTAINER_HashMapIterator it, 471 GNUNET_CONTAINER_HashMapIterator it,
472 void *it_cls) 472 void *it_cls)
473{ 473{
@@ -480,7 +480,7 @@ GNUNET_CONTAINER_multihashmap_get_multiple (const struct
480 while (NULL != (e = n)) 480 while (NULL != (e = n))
481 { 481 {
482 n = e->next; 482 n = e->next;
483 if (0 != memcmp (key, &e->key, sizeof (GNUNET_HashCode))) 483 if (0 != memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
484 continue; 484 continue;
485 if ((it != NULL) && (GNUNET_OK != it (it_cls, key, e->value))) 485 if ((it != NULL) && (GNUNET_OK != it (it_cls, key, e->value)))
486 return GNUNET_SYSERR; 486 return GNUNET_SYSERR;
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c
index 4d957c00e..04225b3dc 100644
--- a/src/util/crypto_hash.c
+++ b/src/util/crypto_hash.c
@@ -49,7 +49,7 @@
49 * @param ret pointer to where to write the hashcode 49 * @param ret pointer to where to write the hashcode
50 */ 50 */
51void 51void
52GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret) 52GNUNET_CRYPTO_hash (const void *block, size_t size, struct GNUNET_HashCode * ret)
53{ 53{
54 gcry_md_hash_buffer (GCRY_MD_SHA512, ret, block, size); 54 gcry_md_hash_buffer (GCRY_MD_SHA512, ret, block, size);
55} 55}
@@ -140,7 +140,7 @@ struct GNUNET_CRYPTO_FileHashContext
140 */ 140 */
141static void 141static void
142file_hash_finish (struct GNUNET_CRYPTO_FileHashContext *fhc, 142file_hash_finish (struct GNUNET_CRYPTO_FileHashContext *fhc,
143 const GNUNET_HashCode * res) 143 const struct GNUNET_HashCode * res)
144{ 144{
145 fhc->callback (fhc->callback_cls, res); 145 fhc->callback (fhc->callback_cls, res);
146 GNUNET_free (fhc->filename); 146 GNUNET_free (fhc->filename);
@@ -161,7 +161,7 @@ static void
161file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 161file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
162{ 162{
163 struct GNUNET_CRYPTO_FileHashContext *fhc = cls; 163 struct GNUNET_CRYPTO_FileHashContext *fhc = cls;
164 GNUNET_HashCode *res; 164 struct GNUNET_HashCode *res;
165 size_t delta; 165 size_t delta;
166 166
167 fhc->task = GNUNET_SCHEDULER_NO_TASK; 167 fhc->task = GNUNET_SCHEDULER_NO_TASK;
@@ -179,7 +179,7 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
179 fhc->offset += delta; 179 fhc->offset += delta;
180 if (fhc->offset == fhc->fsize) 180 if (fhc->offset == fhc->fsize)
181 { 181 {
182 res = (GNUNET_HashCode *) gcry_md_read (fhc->md, GCRY_MD_SHA512); 182 res = (struct GNUNET_HashCode *) gcry_md_read (fhc->md, GCRY_MD_SHA512);
183 file_hash_finish (fhc, res); 183 file_hash_finish (fhc, res);
184 return; 184 return;
185 } 185 }
@@ -272,7 +272,7 @@ GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc)
272 * safely cast to char*, a '\\0' termination is set). 272 * safely cast to char*, a '\\0' termination is set).
273 */ 273 */
274void 274void
275GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block, 275GNUNET_CRYPTO_hash_to_enc (const struct GNUNET_HashCode * block,
276 struct GNUNET_CRYPTO_HashAsciiEncoded *result) 276 struct GNUNET_CRYPTO_HashAsciiEncoded *result)
277{ 277{
278 char *np; 278 char *np;
@@ -296,7 +296,7 @@ GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
296 */ 296 */
297int 297int
298GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen, 298GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen,
299 GNUNET_HashCode * result) 299 struct GNUNET_HashCode * result)
300{ 300{
301 char upper_enc[enclen]; 301 char upper_enc[enclen];
302 char* up_ptr = upper_enc; 302 char* up_ptr = upper_enc;
@@ -321,8 +321,8 @@ GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen,
321 * hashcode proximity. 321 * hashcode proximity.
322 */ 322 */
323unsigned int 323unsigned int
324GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a, 324GNUNET_CRYPTO_hash_distance_u32 (const struct GNUNET_HashCode * a,
325 const GNUNET_HashCode * b) 325 const struct GNUNET_HashCode * b)
326{ 326{
327 unsigned int x1 = (a->bits[1] - b->bits[1]) >> 16; 327 unsigned int x1 = (a->bits[1] - b->bits[1]) >> 16;
328 unsigned int x2 = (b->bits[1] - a->bits[1]) >> 16; 328 unsigned int x2 = (b->bits[1] - a->bits[1]) >> 16;
@@ -339,11 +339,11 @@ GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
339 */ 339 */
340void 340void
341GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode, 341GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
342 GNUNET_HashCode * result) 342 struct GNUNET_HashCode * result)
343{ 343{
344 int i; 344 int i;
345 345
346 for (i = (sizeof (GNUNET_HashCode) / sizeof (uint32_t)) - 1; i >= 0; i--) 346 for (i = (sizeof (struct GNUNET_HashCode) / sizeof (uint32_t)) - 1; i >= 0; i--)
347 result->bits[i] = GNUNET_CRYPTO_random_u32 (mode, UINT32_MAX); 347 result->bits[i] = GNUNET_CRYPTO_random_u32 (mode, UINT32_MAX);
348} 348}
349 349
@@ -356,13 +356,13 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
356 * @param result set to b - a 356 * @param result set to b - a
357 */ 357 */
358void 358void
359GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a, 359GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a,
360 const GNUNET_HashCode * b, 360 const struct GNUNET_HashCode * b,
361 GNUNET_HashCode * result) 361 struct GNUNET_HashCode * result)
362{ 362{
363 int i; 363 int i;
364 364
365 for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--) 365 for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
366 result->bits[i] = b->bits[i] - a->bits[i]; 366 result->bits[i] = b->bits[i] - a->bits[i];
367} 367}
368 368
@@ -375,12 +375,12 @@ GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
375 * @param result set to a + delta 375 * @param result set to a + delta
376 */ 376 */
377void 377void
378GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a, 378GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a,
379 const GNUNET_HashCode * delta, GNUNET_HashCode * result) 379 const struct GNUNET_HashCode * delta, struct GNUNET_HashCode * result)
380{ 380{
381 int i; 381 int i;
382 382
383 for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--) 383 for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
384 result->bits[i] = delta->bits[i] + a->bits[i]; 384 result->bits[i] = delta->bits[i] + a->bits[i];
385} 385}
386 386
@@ -393,12 +393,12 @@ GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
393 * @param result set to a ^ b 393 * @param result set to a ^ b
394 */ 394 */
395void 395void
396GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b, 396GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_HashCode * b,
397 GNUNET_HashCode * result) 397 struct GNUNET_HashCode * result)
398{ 398{
399 int i; 399 int i;
400 400
401 for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--) 401 for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
402 result->bits[i] = a->bits[i] ^ b->bits[i]; 402 result->bits[i] = a->bits[i] ^ b->bits[i];
403} 403}
404 404
@@ -411,11 +411,11 @@ GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
411 * @param iv set to a valid initialization vector 411 * @param iv set to a valid initialization vector
412 */ 412 */
413void 413void
414GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc, 414GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc,
415 struct GNUNET_CRYPTO_AesSessionKey *skey, 415 struct GNUNET_CRYPTO_AesSessionKey *skey,
416 struct GNUNET_CRYPTO_AesInitializationVector *iv) 416 struct GNUNET_CRYPTO_AesInitializationVector *iv)
417{ 417{
418 GNUNET_assert (sizeof (GNUNET_HashCode) >= 418 GNUNET_assert (sizeof (struct GNUNET_HashCode) >=
419 GNUNET_CRYPTO_AES_KEY_LENGTH + 419 GNUNET_CRYPTO_AES_KEY_LENGTH +
420 sizeof (struct GNUNET_CRYPTO_AesInitializationVector)); 420 sizeof (struct GNUNET_CRYPTO_AesInitializationVector));
421 memcpy (skey, hc, GNUNET_CRYPTO_AES_KEY_LENGTH); 421 memcpy (skey, hc, GNUNET_CRYPTO_AES_KEY_LENGTH);
@@ -433,16 +433,16 @@ GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
433 * @return Bit \a bit from hashcode \a code, -1 for invalid index 433 * @return Bit \a bit from hashcode \a code, -1 for invalid index
434 */ 434 */
435int 435int
436GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit) 436GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bit)
437{ 437{
438 GNUNET_assert (bit < 8 * sizeof (GNUNET_HashCode)); 438 GNUNET_assert (bit < 8 * sizeof (struct GNUNET_HashCode));
439 return (((unsigned char *) code)[bit >> 3] & (1 << (bit & 7))) > 0; 439 return (((unsigned char *) code)[bit >> 3] & (1 << (bit & 7))) > 0;
440} 440}
441 441
442 442
443/** 443/**
444 * Determine how many low order bits match in two 444 * Determine how many low order bits match in two
445 * GNUNET_HashCodes. i.e. - 010011 and 011111 share 445 * struct GNUNET_HashCodes. i.e. - 010011 and 011111 share
446 * the first two lowest order bits, and therefore the 446 * the first two lowest order bits, and therefore the
447 * return value is two (NOT XOR distance, nor how many 447 * return value is two (NOT XOR distance, nor how many
448 * bits match absolutely!). 448 * bits match absolutely!).
@@ -453,16 +453,16 @@ GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit)
453 * @return the number of bits that match 453 * @return the number of bits that match
454 */ 454 */
455unsigned int 455unsigned int
456GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first, 456GNUNET_CRYPTO_hash_matching_bits (const struct GNUNET_HashCode * first,
457 const GNUNET_HashCode * second) 457 const struct GNUNET_HashCode * second)
458{ 458{
459 unsigned int i; 459 unsigned int i;
460 460
461 for (i = 0; i < sizeof (GNUNET_HashCode) * 8; i++) 461 for (i = 0; i < sizeof (struct GNUNET_HashCode) * 8; i++)
462 if (GNUNET_CRYPTO_hash_get_bit (first, i) != 462 if (GNUNET_CRYPTO_hash_get_bit (first, i) !=
463 GNUNET_CRYPTO_hash_get_bit (second, i)) 463 GNUNET_CRYPTO_hash_get_bit (second, i))
464 return i; 464 return i;
465 return sizeof (GNUNET_HashCode) * 8; 465 return sizeof (struct GNUNET_HashCode) * 8;
466} 466}
467 467
468 468
@@ -475,7 +475,7 @@ GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
475 * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2. 475 * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
476 */ 476 */
477int 477int
478GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2) 478GNUNET_CRYPTO_hash_cmp (const struct GNUNET_HashCode * h1, const struct GNUNET_HashCode * h2)
479{ 479{
480 unsigned int *i1; 480 unsigned int *i1;
481 unsigned int *i2; 481 unsigned int *i2;
@@ -483,7 +483,7 @@ GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2)
483 483
484 i1 = (unsigned int *) h1; 484 i1 = (unsigned int *) h1;
485 i2 = (unsigned int *) h2; 485 i2 = (unsigned int *) h2;
486 for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--) 486 for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
487 { 487 {
488 if (i1[i] > i2[i]) 488 if (i1[i] > i2[i])
489 return 1; 489 return 1;
@@ -504,15 +504,15 @@ GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2)
504 * @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2. 504 * @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2.
505 */ 505 */
506int 506int
507GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1, 507GNUNET_CRYPTO_hash_xorcmp (const struct GNUNET_HashCode * h1,
508 const GNUNET_HashCode * h2, 508 const struct GNUNET_HashCode * h2,
509 const GNUNET_HashCode * target) 509 const struct GNUNET_HashCode * target)
510{ 510{
511 int i; 511 int i;
512 unsigned int d1; 512 unsigned int d1;
513 unsigned int d2; 513 unsigned int d2;
514 514
515 for (i = sizeof (GNUNET_HashCode) / sizeof (unsigned int) - 1; i >= 0; i--) 515 for (i = sizeof (struct GNUNET_HashCode) / sizeof (unsigned int) - 1; i >= 0; i--)
516 { 516 {
517 d1 = ((unsigned int *) h1)[i] ^ ((unsigned int *) target)[i]; 517 d1 = ((unsigned int *) h1)[i] ^ ((unsigned int *) target)[i];
518 d2 = ((unsigned int *) h2)[i] ^ ((unsigned int *) target)[i]; 518 d2 = ((unsigned int *) h2)[i] ^ ((unsigned int *) target)[i];
@@ -576,7 +576,7 @@ GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
576void 576void
577GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key, 577GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
578 const void *plaintext, size_t plaintext_len, 578 const void *plaintext, size_t plaintext_len,
579 GNUNET_HashCode * hmac) 579 struct GNUNET_HashCode * hmac)
580{ 580{
581 gcry_md_hd_t md; 581 gcry_md_hd_t md;
582 const unsigned char *mc; 582 const unsigned char *mc;
diff --git a/src/util/crypto_ksk.c b/src/util/crypto_ksk.c
index 274457b61..0c091099e 100644
--- a/src/util/crypto_ksk.c
+++ b/src/util/crypto_ksk.c
@@ -70,11 +70,11 @@ struct GNUNET_CRYPTO_RsaPrivateKey
70 70
71 71
72static void 72static void
73mpz_randomize (gcry_mpi_t n, unsigned int nbits, GNUNET_HashCode * rnd) 73mpz_randomize (gcry_mpi_t n, unsigned int nbits, struct GNUNET_HashCode * rnd)
74{ 74{
75 GNUNET_HashCode hc; 75 struct GNUNET_HashCode hc;
76 GNUNET_HashCode tmp; 76 struct GNUNET_HashCode tmp;
77 int bits_per_hc = sizeof (GNUNET_HashCode) * 8; 77 int bits_per_hc = sizeof (struct GNUNET_HashCode) * 8;
78 int cnt; 78 int cnt;
79 int i; 79 int i;
80 80
@@ -88,8 +88,8 @@ mpz_randomize (gcry_mpi_t n, unsigned int nbits, GNUNET_HashCode * rnd)
88 int j; 88 int j;
89 89
90 if (i > 0) 90 if (i > 0)
91 GNUNET_CRYPTO_hash (&hc, sizeof (GNUNET_HashCode), &tmp); 91 GNUNET_CRYPTO_hash (&hc, sizeof (struct GNUNET_HashCode), &tmp);
92 for (j = 0; j < sizeof (GNUNET_HashCode) / sizeof (uint32_t); j++) 92 for (j = 0; j < sizeof (struct GNUNET_HashCode) / sizeof (uint32_t); j++)
93 { 93 {
94#if HAVE_GCRY_MPI_LSHIFT 94#if HAVE_GCRY_MPI_LSHIFT
95 gcry_mpi_lshift (n, n, sizeof (uint32_t) * 8); 95 gcry_mpi_lshift (n, n, sizeof (uint32_t) * 8);
@@ -101,7 +101,7 @@ mpz_randomize (gcry_mpi_t n, unsigned int nbits, GNUNET_HashCode * rnd)
101 } 101 }
102 hc = tmp; 102 hc = tmp;
103 } 103 }
104 GNUNET_CRYPTO_hash (&hc, sizeof (GNUNET_HashCode), rnd); 104 GNUNET_CRYPTO_hash (&hc, sizeof (struct GNUNET_HashCode), rnd);
105 i = gcry_mpi_get_nbits (n); 105 i = gcry_mpi_get_nbits (n);
106 while (i > nbits) 106 while (i > nbits)
107 gcry_mpi_clear_bit (n, --i); 107 gcry_mpi_clear_bit (n, --i);
@@ -137,7 +137,7 @@ mpz_tdiv_q_2exp (gcry_mpi_t q, gcry_mpi_t n, unsigned int b)
137 * Return true if n is probably a prime 137 * Return true if n is probably a prime
138 */ 138 */
139static int 139static int
140is_prime (gcry_mpi_t n, int steps, GNUNET_HashCode * hc) 140is_prime (gcry_mpi_t n, int steps, struct GNUNET_HashCode * hc)
141{ 141{
142 gcry_mpi_t x; 142 gcry_mpi_t x;
143 gcry_mpi_t y; 143 gcry_mpi_t y;
@@ -218,7 +218,7 @@ adjust (unsigned char *buf, size_t size, size_t target)
218 218
219 219
220static void 220static void
221gen_prime (gcry_mpi_t * ptest, unsigned int nbits, GNUNET_HashCode * hc) 221gen_prime (gcry_mpi_t * ptest, unsigned int nbits, struct GNUNET_HashCode * hc)
222{ 222{
223 /* Note: 2 is not included because it can be tested more easily by 223 /* Note: 2 is not included because it can be tested more easily by
224 * looking at bit 0. The last entry in this list is marked by a zero */ 224 * looking at bit 0. The last entry in this list is marked by a zero */
@@ -400,7 +400,7 @@ gen_prime (gcry_mpi_t * ptest, unsigned int nbits, GNUNET_HashCode * hc)
400 */ 400 */
401static void 401static void
402generate_kblock_key (KBlock_secret_key *sk, unsigned int nbits, 402generate_kblock_key (KBlock_secret_key *sk, unsigned int nbits,
403 GNUNET_HashCode * hc) 403 struct GNUNET_HashCode * hc)
404{ 404{
405 gcry_mpi_t t1, t2; 405 gcry_mpi_t t1, t2;
406 gcry_mpi_t phi; /* helper: (p-1)(q-1) */ 406 gcry_mpi_t phi; /* helper: (p-1)(q-1) */
@@ -490,10 +490,10 @@ GNUNET_NETWORK_STRUCT_END
490 * given HashCode as input to the PRNG. 490 * given HashCode as input to the PRNG.
491 */ 491 */
492static struct KskRsaPrivateKeyBinaryEncoded * 492static struct KskRsaPrivateKeyBinaryEncoded *
493makeKblockKeyInternal (const GNUNET_HashCode * hc) 493makeKblockKeyInternal (const struct GNUNET_HashCode * hc)
494{ 494{
495 KBlock_secret_key sk; 495 KBlock_secret_key sk;
496 GNUNET_HashCode hx; 496 struct GNUNET_HashCode hx;
497 unsigned char *pbu[6]; 497 unsigned char *pbu[6];
498 gcry_mpi_t *pkv[6]; 498 gcry_mpi_t *pkv[6];
499 size_t sizes[6]; 499 size_t sizes[6];
@@ -564,7 +564,7 @@ struct KBlockKeyCacheLine
564 /** 564 /**
565 * Hash from which the key was generated. 565 * Hash from which the key was generated.
566 */ 566 */
567 GNUNET_HashCode hc; 567 struct GNUNET_HashCode hc;
568 568
569 /** 569 /**
570 * The encoded key. 570 * The encoded key.
@@ -594,13 +594,13 @@ static unsigned int cacheSize;
594 * @return corresponding private key; must not be freed! 594 * @return corresponding private key; must not be freed!
595 */ 595 */
596struct GNUNET_CRYPTO_RsaPrivateKey * 596struct GNUNET_CRYPTO_RsaPrivateKey *
597GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc) 597GNUNET_CRYPTO_rsa_key_create_from_hash (const struct GNUNET_HashCode * hc)
598{ 598{
599 struct KBlockKeyCacheLine *line; 599 struct KBlockKeyCacheLine *line;
600 unsigned int i; 600 unsigned int i;
601 601
602 for (i = 0; i < cacheSize; i++) 602 for (i = 0; i < cacheSize; i++)
603 if (0 == memcmp (hc, &cache[i]->hc, sizeof (GNUNET_HashCode))) 603 if (0 == memcmp (hc, &cache[i]->hc, sizeof (struct GNUNET_HashCode)))
604 return GNUNET_CRYPTO_rsa_decode_key ((const char*) cache[i]->pke, 604 return GNUNET_CRYPTO_rsa_decode_key ((const char*) cache[i]->pke,
605 ntohs (cache[i]->pke->len)); 605 ntohs (cache[i]->pke->len));
606 line = GNUNET_malloc (sizeof (struct KBlockKeyCacheLine)); 606 line = GNUNET_malloc (sizeof (struct KBlockKeyCacheLine));
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c
index 0106f43be..bbd73083d 100644
--- a/src/util/crypto_rsa.c
+++ b/src/util/crypto_rsa.c
@@ -838,7 +838,7 @@ GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
838 size_t isize; 838 size_t isize;
839 size_t erroff; 839 size_t erroff;
840 840
841 GNUNET_assert (size <= sizeof (GNUNET_HashCode)); 841 GNUNET_assert (size <= sizeof (struct GNUNET_HashCode));
842 pubkey = public2PrivateKey (publicKey); 842 pubkey = public2PrivateKey (publicKey);
843 if (pubkey == NULL) 843 if (pubkey == NULL)
844 return GNUNET_SYSERR; 844 return GNUNET_SYSERR;
@@ -936,7 +936,7 @@ GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
936 gcry_sexp_t data; 936 gcry_sexp_t data;
937 size_t ssize; 937 size_t ssize;
938 gcry_mpi_t rval; 938 gcry_mpi_t rval;
939 GNUNET_HashCode hc; 939 struct GNUNET_HashCode hc;
940 char *buff; 940 char *buff;
941 int bufSize; 941 int bufSize;
942 942
@@ -949,7 +949,7 @@ GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
949 [bufSize - 949 [bufSize -
950 strlen 950 strlen
951 ("0123456789012345678901234567890123456789012345678901234567890123))") 951 ("0123456789012345678901234567890123456789012345678901234567890123))")
952 - 1], &hc, sizeof (GNUNET_HashCode)); 952 - 1], &hc, sizeof (struct GNUNET_HashCode));
953 GNUNET_assert (0 == gcry_sexp_new (&data, buff, bufSize, 0)); 953 GNUNET_assert (0 == gcry_sexp_new (&data, buff, bufSize, 0));
954 GNUNET_free (buff); 954 GNUNET_free (buff);
955 GNUNET_assert (0 == gcry_pk_sign (&result, data, key->sexp)); 955 GNUNET_assert (0 == gcry_pk_sign (&result, data, key->sexp));
@@ -988,7 +988,7 @@ GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
988 size_t size; 988 size_t size;
989 gcry_mpi_t val; 989 gcry_mpi_t val;
990 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey; 990 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
991 GNUNET_HashCode hc; 991 struct GNUNET_HashCode hc;
992 char *buff; 992 char *buff;
993 int bufSize; 993 int bufSize;
994 size_t erroff; 994 size_t erroff;
@@ -1012,7 +1012,7 @@ GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
1012 [strlen (FORMATSTRING) - 1012 [strlen (FORMATSTRING) -
1013 strlen 1013 strlen
1014 ("0123456789012345678901234567890123456789012345678901234567890123))")], 1014 ("0123456789012345678901234567890123456789012345678901234567890123))")],
1015 &hc, sizeof (GNUNET_HashCode)); 1015 &hc, sizeof (struct GNUNET_HashCode));
1016 GNUNET_assert (0 == gcry_sexp_new (&data, buff, bufSize, 0)); 1016 GNUNET_assert (0 == gcry_sexp_new (&data, buff, bufSize, 0));
1017 GNUNET_free (buff); 1017 GNUNET_free (buff);
1018 hostkey = public2PrivateKey (publicKey); 1018 hostkey = public2PrivateKey (publicKey);
diff --git a/src/util/perf_crypto_hash.c b/src/util/perf_crypto_hash.c
index d883776b4..d1f4c9dc1 100644
--- a/src/util/perf_crypto_hash.c
+++ b/src/util/perf_crypto_hash.c
@@ -32,9 +32,9 @@
32static void 32static void
33perfHash () 33perfHash ()
34{ 34{
35 GNUNET_HashCode hc1; 35 struct GNUNET_HashCode hc1;
36 GNUNET_HashCode hc2; 36 struct GNUNET_HashCode hc2;
37 GNUNET_HashCode hc3; 37 struct GNUNET_HashCode hc3;
38 int i; 38 int i;
39 char *buf; 39 char *buf;
40 40
@@ -43,8 +43,8 @@ perfHash ()
43 GNUNET_CRYPTO_hash ("foo", 3, &hc1); 43 GNUNET_CRYPTO_hash ("foo", 3, &hc1);
44 for (i = 0; i < 1024; i++) 44 for (i = 0; i < 1024; i++)
45 { 45 {
46 GNUNET_CRYPTO_hash (&hc1, sizeof (GNUNET_HashCode), &hc2); 46 GNUNET_CRYPTO_hash (&hc1, sizeof (struct GNUNET_HashCode), &hc2);
47 GNUNET_CRYPTO_hash (&hc2, sizeof (GNUNET_HashCode), &hc1); 47 GNUNET_CRYPTO_hash (&hc2, sizeof (struct GNUNET_HashCode), &hc1);
48 GNUNET_CRYPTO_hash (buf, 1024 * 64, &hc3); 48 GNUNET_CRYPTO_hash (buf, 1024 * 64, &hc3);
49 } 49 }
50 GNUNET_free (buf); 50 GNUNET_free (buf);
diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c
index 016573845..c3964f296 100644
--- a/src/util/pseudonym.c
+++ b/src/util/pseudonym.c
@@ -88,7 +88,7 @@ static struct DiscoveryCallback *head;
88 * @param rating rating of pseudonym 88 * @param rating rating of pseudonym
89 */ 89 */
90static void 90static void
91internal_notify (const GNUNET_HashCode * id, 91internal_notify (const struct GNUNET_HashCode * id,
92 const struct GNUNET_CONTAINER_MetaData *md, int rating) 92 const struct GNUNET_CONTAINER_MetaData *md, int rating)
93{ 93{
94 struct DiscoveryCallback *pos; 94 struct DiscoveryCallback *pos;
@@ -169,7 +169,7 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
169 */ 169 */
170static char * 170static char *
171get_data_filename (const struct GNUNET_CONFIGURATION_Handle *cfg, 171get_data_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
172 const char *prefix, const GNUNET_HashCode * psid) 172 const char *prefix, const struct GNUNET_HashCode * psid)
173{ 173{
174 struct GNUNET_CRYPTO_HashAsciiEncoded enc; 174 struct GNUNET_CRYPTO_HashAsciiEncoded enc;
175 175
@@ -192,7 +192,7 @@ get_data_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
192 */ 192 */
193static void 193static void
194write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 194write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
195 const GNUNET_HashCode * nsid, 195 const struct GNUNET_HashCode * nsid,
196 const struct GNUNET_CONTAINER_MetaData *meta, 196 const struct GNUNET_CONTAINER_MetaData *meta,
197 int32_t ranking, const char *ns_name) 197 int32_t ranking, const char *ns_name)
198{ 198{
@@ -238,7 +238,7 @@ write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
238 */ 238 */
239static int 239static int
240read_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 240read_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
241 const GNUNET_HashCode * nsid, 241 const struct GNUNET_HashCode * nsid,
242 struct GNUNET_CONTAINER_MetaData **meta, int32_t * ranking, 242 struct GNUNET_CONTAINER_MetaData **meta, int32_t * ranking,
243 char **ns_name) 243 char **ns_name)
244{ 244{
@@ -303,9 +303,9 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
303 */ 303 */
304char * 304char *
305GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg, 305GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
306 const GNUNET_HashCode * nsid, const char *name, unsigned int *suffix) 306 const struct GNUNET_HashCode * nsid, const char *name, unsigned int *suffix)
307{ 307{
308 GNUNET_HashCode nh; 308 struct GNUNET_HashCode nh;
309 uint64_t len; 309 uint64_t len;
310 char *fn; 310 char *fn;
311 struct GNUNET_DISK_FileHandle *fh; 311 struct GNUNET_DISK_FileHandle *fh;
@@ -328,23 +328,23 @@ GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
328 GNUNET_DISK_PERM_USER_WRITE); 328 GNUNET_DISK_PERM_USER_WRITE);
329 i = 0; 329 i = 0;
330 idx = -1; 330 idx = -1;
331 while ((len >= sizeof (GNUNET_HashCode)) && 331 while ((len >= sizeof (struct GNUNET_HashCode)) &&
332 (sizeof (GNUNET_HashCode) == 332 (sizeof (struct GNUNET_HashCode) ==
333 GNUNET_DISK_file_read (fh, &nh, sizeof (GNUNET_HashCode)))) 333 GNUNET_DISK_file_read (fh, &nh, sizeof (struct GNUNET_HashCode))))
334 { 334 {
335 if (0 == memcmp (&nh, nsid, sizeof (GNUNET_HashCode))) 335 if (0 == memcmp (&nh, nsid, sizeof (struct GNUNET_HashCode)))
336 { 336 {
337 idx = i; 337 idx = i;
338 break; 338 break;
339 } 339 }
340 i++; 340 i++;
341 len -= sizeof (GNUNET_HashCode); 341 len -= sizeof (struct GNUNET_HashCode);
342 } 342 }
343 if (idx == -1) 343 if (idx == -1)
344 { 344 {
345 idx = i; 345 idx = i;
346 if (sizeof (GNUNET_HashCode) != 346 if (sizeof (struct GNUNET_HashCode) !=
347 GNUNET_DISK_file_write (fh, nsid, sizeof (GNUNET_HashCode))) 347 GNUNET_DISK_file_write (fh, nsid, sizeof (struct GNUNET_HashCode)))
348 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "write", fn); 348 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "write", fn);
349 } 349 }
350 GNUNET_DISK_file_close (fh); 350 GNUNET_DISK_file_close (fh);
@@ -376,7 +376,7 @@ GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
376 */ 376 */
377int 377int
378GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 378GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
379 const GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta, 379 const struct GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta,
380 int32_t *ret_rank, char **ret_name, int *name_is_a_dup) 380 int32_t *ret_rank, char **ret_name, int *name_is_a_dup)
381{ 381{
382 struct GNUNET_CONTAINER_MetaData *meta; 382 struct GNUNET_CONTAINER_MetaData *meta;
@@ -450,13 +450,13 @@ GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
450 */ 450 */
451int 451int
452GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg, 452GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
453 const char *ns_uname, GNUNET_HashCode * nsid) 453 const char *ns_uname, struct GNUNET_HashCode * nsid)
454{ 454{
455 size_t slen; 455 size_t slen;
456 uint64_t len; 456 uint64_t len;
457 unsigned int idx; 457 unsigned int idx;
458 char *name; 458 char *name;
459 GNUNET_HashCode nh; 459 struct GNUNET_HashCode nh;
460 char *fn; 460 char *fn;
461 struct GNUNET_DISK_FileHandle *fh; 461 struct GNUNET_DISK_FileHandle *fh;
462 462
@@ -476,7 +476,7 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
476 476
477 if ((GNUNET_OK != GNUNET_DISK_file_test (fn) || 477 if ((GNUNET_OK != GNUNET_DISK_file_test (fn) ||
478 (GNUNET_OK != GNUNET_DISK_file_size (fn, &len, GNUNET_YES, GNUNET_YES))) || 478 (GNUNET_OK != GNUNET_DISK_file_size (fn, &len, GNUNET_YES, GNUNET_YES))) ||
479 ((idx + 1) * sizeof (GNUNET_HashCode) > len)) 479 ((idx + 1) * sizeof (struct GNUNET_HashCode) > len))
480 { 480 {
481 GNUNET_free (fn); 481 GNUNET_free (fn);
482 return GNUNET_SYSERR; 482 return GNUNET_SYSERR;
@@ -487,10 +487,10 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
487 GNUNET_DISK_PERM_USER_READ | 487 GNUNET_DISK_PERM_USER_READ |
488 GNUNET_DISK_PERM_USER_WRITE); 488 GNUNET_DISK_PERM_USER_WRITE);
489 GNUNET_free (fn); 489 GNUNET_free (fn);
490 GNUNET_DISK_file_seek (fh, idx * sizeof (GNUNET_HashCode), 490 GNUNET_DISK_file_seek (fh, idx * sizeof (struct GNUNET_HashCode),
491 GNUNET_DISK_SEEK_SET); 491 GNUNET_DISK_SEEK_SET);
492 if (sizeof (GNUNET_HashCode) != 492 if (sizeof (struct GNUNET_HashCode) !=
493 GNUNET_DISK_file_read (fh, nsid, sizeof (GNUNET_HashCode))) 493 GNUNET_DISK_file_read (fh, nsid, sizeof (struct GNUNET_HashCode)))
494 { 494 {
495 GNUNET_DISK_file_close (fh); 495 GNUNET_DISK_file_close (fh);
496 return GNUNET_SYSERR; 496 return GNUNET_SYSERR;
@@ -535,7 +535,7 @@ list_pseudonym_helper (void *cls, const char *fullname)
535{ 535{
536 struct ListPseudonymClosure *c = cls; 536 struct ListPseudonymClosure *c = cls;
537 int ret; 537 int ret;
538 GNUNET_HashCode id; 538 struct GNUNET_HashCode id;
539 int32_t rating; 539 int32_t rating;
540 struct GNUNET_CONTAINER_MetaData *meta; 540 struct GNUNET_CONTAINER_MetaData *meta;
541 const char *fn; 541 const char *fn;
@@ -612,7 +612,7 @@ GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg,
612 */ 612 */
613int 613int
614GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg, 614GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
615 const GNUNET_HashCode * nsid, int delta) 615 const struct GNUNET_HashCode * nsid, int delta)
616{ 616{
617 struct GNUNET_CONTAINER_MetaData *meta; 617 struct GNUNET_CONTAINER_MetaData *meta;
618 int ret; 618 int ret;
@@ -648,7 +648,7 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
648 */ 648 */
649int 649int
650GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg, 650GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
651 const GNUNET_HashCode * nsid, const char *name, 651 const struct GNUNET_HashCode * nsid, const char *name,
652 const struct GNUNET_CONTAINER_MetaData *md, int rank) 652 const struct GNUNET_CONTAINER_MetaData *md, int rank)
653{ 653{
654 GNUNET_assert (cfg != NULL); 654 GNUNET_assert (cfg != NULL);
@@ -670,7 +670,7 @@ GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
670 */ 670 */
671void 671void
672GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg, 672GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
673 const GNUNET_HashCode * id, 673 const struct GNUNET_HashCode * id,
674 const struct GNUNET_CONTAINER_MetaData *meta) 674 const struct GNUNET_CONTAINER_MetaData *meta)
675{ 675{
676 char *name; 676 char *name;
diff --git a/src/util/test_container_bloomfilter.c b/src/util/test_container_bloomfilter.c
index f881bb367..f9743bdca 100644
--- a/src/util/test_container_bloomfilter.c
+++ b/src/util/test_container_bloomfilter.c
@@ -36,16 +36,16 @@
36 * Generate a random hashcode. 36 * Generate a random hashcode.
37 */ 37 */
38static void 38static void
39nextHC (GNUNET_HashCode * hc) 39nextHC (struct GNUNET_HashCode * hc)
40{ 40{
41 GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, hc); 41 GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, hc);
42} 42}
43 43
44static int 44static int
45add_iterator (void *cls, GNUNET_HashCode * next) 45add_iterator (void *cls, struct GNUNET_HashCode * next)
46{ 46{
47 int *ret = cls; 47 int *ret = cls;
48 GNUNET_HashCode pos; 48 struct GNUNET_HashCode pos;
49 49
50 if (0 == (*ret)--) 50 if (0 == (*ret)--)
51 return GNUNET_NO; 51 return GNUNET_NO;
@@ -59,7 +59,7 @@ main (int argc, char *argv[])
59{ 59{
60 struct GNUNET_CONTAINER_BloomFilter *bf; 60 struct GNUNET_CONTAINER_BloomFilter *bf;
61 struct GNUNET_CONTAINER_BloomFilter *bfi; 61 struct GNUNET_CONTAINER_BloomFilter *bfi;
62 GNUNET_HashCode tmp; 62 struct GNUNET_HashCode tmp;
63 int i; 63 int i;
64 int ok1; 64 int ok1;
65 int ok2; 65 int ok2;
diff --git a/src/util/test_container_multihashmap.c b/src/util/test_container_multihashmap.c
index ba621c17e..befd0ce46 100644
--- a/src/util/test_container_multihashmap.c
+++ b/src/util/test_container_multihashmap.c
@@ -35,8 +35,8 @@ static int
35testMap (int i) 35testMap (int i)
36{ 36{
37 struct GNUNET_CONTAINER_MultiHashMap *m; 37 struct GNUNET_CONTAINER_MultiHashMap *m;
38 GNUNET_HashCode k1; 38 struct GNUNET_HashCode k1;
39 GNUNET_HashCode k2; 39 struct GNUNET_HashCode k2;
40 const char *ret; 40 const char *ret;
41 int j; 41 int j;
42 42
diff --git a/src/util/test_crypto_hash.c b/src/util/test_crypto_hash.c
index bc0411482..a8ef39a38 100644
--- a/src/util/test_crypto_hash.c
+++ b/src/util/test_crypto_hash.c
@@ -35,18 +35,18 @@ static char block[65536];
35static int 35static int
36test (int number) 36test (int number)
37{ 37{
38 GNUNET_HashCode h1; 38 struct GNUNET_HashCode h1;
39 GNUNET_HashCode h2; 39 struct GNUNET_HashCode h2;
40 struct GNUNET_CRYPTO_HashAsciiEncoded enc; 40 struct GNUNET_CRYPTO_HashAsciiEncoded enc;
41 41
42 memset (&h1, number, sizeof (GNUNET_HashCode)); 42 memset (&h1, number, sizeof (struct GNUNET_HashCode));
43 GNUNET_CRYPTO_hash_to_enc (&h1, &enc); 43 GNUNET_CRYPTO_hash_to_enc (&h1, &enc);
44 if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string ((char *) &enc, &h2)) 44 if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string ((char *) &enc, &h2))
45 { 45 {
46 printf ("enc2hash failed!\n"); 46 printf ("enc2hash failed!\n");
47 return 1; 47 return 1;
48 } 48 }
49 if (0 != memcmp (&h1, &h2, sizeof (GNUNET_HashCode))) 49 if (0 != memcmp (&h1, &h2, sizeof (struct GNUNET_HashCode)))
50 return 1; 50 return 1;
51 return 0; 51 return 0;
52} 52}
@@ -67,10 +67,10 @@ testArithmetic ()
67{ 67{
68 static struct GNUNET_CRYPTO_AesSessionKey zskey; 68 static struct GNUNET_CRYPTO_AesSessionKey zskey;
69 static struct GNUNET_CRYPTO_AesInitializationVector ziv; 69 static struct GNUNET_CRYPTO_AesInitializationVector ziv;
70 GNUNET_HashCode h1; 70 struct GNUNET_HashCode h1;
71 GNUNET_HashCode h2; 71 struct GNUNET_HashCode h2;
72 GNUNET_HashCode d; 72 struct GNUNET_HashCode d;
73 GNUNET_HashCode s; 73 struct GNUNET_HashCode s;
74 struct GNUNET_CRYPTO_AesSessionKey skey; 74 struct GNUNET_CRYPTO_AesSessionKey skey;
75 struct GNUNET_CRYPTO_AesInitializationVector iv; 75 struct GNUNET_CRYPTO_AesInitializationVector iv;
76 76
@@ -107,10 +107,10 @@ testArithmetic ()
107} 107}
108 108
109static void 109static void
110finished_task (void *cls, const GNUNET_HashCode * res) 110finished_task (void *cls, const struct GNUNET_HashCode * res)
111{ 111{
112 int *ret = cls; 112 int *ret = cls;
113 GNUNET_HashCode want; 113 struct GNUNET_HashCode want;
114 114
115 GNUNET_CRYPTO_hash (block, sizeof (block), &want); 115 GNUNET_CRYPTO_hash (block, sizeof (block), &want);
116 if (0 != memcmp (res, &want, sizeof (want))) 116 if (0 != memcmp (res, &want, sizeof (want)))
diff --git a/src/util/test_crypto_ksk.c b/src/util/test_crypto_ksk.c
index 58c459547..f0e4337ef 100644
--- a/src/util/test_crypto_ksk.c
+++ b/src/util/test_crypto_ksk.c
@@ -40,7 +40,7 @@ testCorrectKey ()
40{ 40{
41 const char *want = 41 const char *want =
42 "010601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b73c215f7a5e6b09bec55713c901786c09324a150980e014bdb0d04426934929c3b4971a9711af5455536cd6eeb8bfa004ee904972a737455f53c752987d8c82b755bc02882b44950c4acdc1672ba74c3b94d81a4c1ea3d74e7700ae5594c3a4f3c559e4bff2df6844fac302e4b66175e14dc8bad3ce44281d2fec1a1abef06301010000"; 42 "010601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b73c215f7a5e6b09bec55713c901786c09324a150980e014bdb0d04426934929c3b4971a9711af5455536cd6eeb8bfa004ee904972a737455f53c752987d8c82b755bc02882b44950c4acdc1672ba74c3b94d81a4c1ea3d74e7700ae5594c3a4f3c559e4bff2df6844fac302e4b66175e14dc8bad3ce44281d2fec1a1abef06301010000";
43 GNUNET_HashCode in; 43 struct GNUNET_HashCode in;
44 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey; 44 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
45 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; 45 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
46 int i; 46 int i;
@@ -79,7 +79,7 @@ testCorrectKey ()
79static int 79static int
80testMultiKey (const char *word) 80testMultiKey (const char *word)
81{ 81{
82 GNUNET_HashCode in; 82 struct GNUNET_HashCode in;
83 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey; 83 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
84 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey; 84 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
85 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1; 85 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1;
@@ -228,7 +228,7 @@ int
228main (int argc, char *argv[]) 228main (int argc, char *argv[])
229{ 229{
230 int failureCount = 0; 230 int failureCount = 0;
231 GNUNET_HashCode in; 231 struct GNUNET_HashCode in;
232 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey; 232 struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
233 233
234 GNUNET_log_setup ("test-crypto-ksk", "WARNING", NULL); 234 GNUNET_log_setup ("test-crypto-ksk", "WARNING", NULL);
diff --git a/src/util/test_pseudonym.c b/src/util/test_pseudonym.c
index 4ce8b3853..f0233771a 100644
--- a/src/util/test_pseudonym.c
+++ b/src/util/test_pseudonym.c
@@ -35,16 +35,16 @@
35 35
36static struct GNUNET_CONTAINER_MetaData *meta; 36static struct GNUNET_CONTAINER_MetaData *meta;
37 37
38static GNUNET_HashCode id1; 38static struct GNUNET_HashCode id1;
39 39
40static int 40static int
41iter (void *cls, const GNUNET_HashCode * pseudonym, 41iter (void *cls, const struct GNUNET_HashCode * pseudonym,
42 const char *name, const char *unique_name, 42 const char *name, const char *unique_name,
43 const struct GNUNET_CONTAINER_MetaData *md, int rating) 43 const struct GNUNET_CONTAINER_MetaData *md, int rating)
44{ 44{
45 int *ok = cls; 45 int *ok = cls;
46 46
47 if ((0 == memcmp (pseudonym, &id1, sizeof (GNUNET_HashCode))) && 47 if ((0 == memcmp (pseudonym, &id1, sizeof (struct GNUNET_HashCode))) &&
48 (!GNUNET_CONTAINER_meta_data_test_equal (md, meta))) 48 (!GNUNET_CONTAINER_meta_data_test_equal (md, meta)))
49 { 49 {
50 *ok = GNUNET_NO; 50 *ok = GNUNET_NO;
@@ -54,7 +54,7 @@ iter (void *cls, const GNUNET_HashCode * pseudonym,
54} 54}
55 55
56static int 56static int
57noti_callback (void *cls, const GNUNET_HashCode * pseudonym, 57noti_callback (void *cls, const struct GNUNET_HashCode * pseudonym,
58 const char *name, const char *unique_name, 58 const char *name, const char *unique_name,
59 const struct GNUNET_CONTAINER_MetaData *md, int rating) 59 const struct GNUNET_CONTAINER_MetaData *md, int rating)
60{ 60{
@@ -65,7 +65,7 @@ noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
65} 65}
66 66
67static int 67static int
68fake_noti_callback (void *cls, const GNUNET_HashCode * pseudonym, 68fake_noti_callback (void *cls, const struct GNUNET_HashCode * pseudonym,
69 const char *name, const char *unique_name, 69 const char *name, const char *unique_name,
70 const struct GNUNET_CONTAINER_MetaData *md, int rating) 70 const struct GNUNET_CONTAINER_MetaData *md, int rating)
71{ 71{
@@ -76,7 +76,7 @@ fake_noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
76} 76}
77 77
78static int 78static int
79false_callback (void *cls, const GNUNET_HashCode * pseudonym, 79false_callback (void *cls, const struct GNUNET_HashCode * pseudonym,
80 const char *name, const char *unique_name, 80 const char *name, const char *unique_name,
81 const struct GNUNET_CONTAINER_MetaData *md, int rating) 81 const struct GNUNET_CONTAINER_MetaData *md, int rating)
82{ 82{
@@ -87,11 +87,11 @@ int
87main (int argc, char *argv[]) 87main (int argc, char *argv[])
88{ 88{
89 int ok; 89 int ok;
90 GNUNET_HashCode rid1; 90 struct GNUNET_HashCode rid1;
91 GNUNET_HashCode id2; 91 struct GNUNET_HashCode id2;
92 GNUNET_HashCode rid2; 92 struct GNUNET_HashCode rid2;
93 GNUNET_HashCode fid; 93 struct GNUNET_HashCode fid;
94 GNUNET_HashCode id3; 94 struct GNUNET_HashCode id3;
95 95
96 int old; 96 int old;
97 int newVal; 97 int newVal;
@@ -174,8 +174,8 @@ main (int argc, char *argv[])
174 CHECK (GNUNET_SYSERR == GNUNET_PSEUDONYM_name_to_id (cfg, name1, &rid1)); 174 CHECK (GNUNET_SYSERR == GNUNET_PSEUDONYM_name_to_id (cfg, name1, &rid1));
175 CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name2_unique, &rid2)); 175 CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name2_unique, &rid2));
176 CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name1_unique, &rid1)); 176 CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name1_unique, &rid1));
177 CHECK (0 == memcmp (&id1, &rid1, sizeof (GNUNET_HashCode))); 177 CHECK (0 == memcmp (&id1, &rid1, sizeof (struct GNUNET_HashCode)));
178 CHECK (0 == memcmp (&id2, &rid2, sizeof (GNUNET_HashCode))); 178 CHECK (0 == memcmp (&id2, &rid2, sizeof (struct GNUNET_HashCode)));
179 179
180 GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &fid); 180 GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &fid);
181 GNUNET_log_skip (1, GNUNET_NO); 181 GNUNET_log_skip (1, GNUNET_NO);
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index b7756a35a..219949bd3 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -62,7 +62,7 @@ struct DestinationEntry
62 * Key under which this entry is in the 'destination_map' (only valid 62 * Key under which this entry is in the 'destination_map' (only valid
63 * if 'heap_node != NULL'). 63 * if 'heap_node != NULL').
64 */ 64 */
65 GNUNET_HashCode key; 65 struct GNUNET_HashCode key;
66 66
67 /** 67 /**
68 * Pre-allocated tunnel for this destination, or NULL for none. 68 * Pre-allocated tunnel for this destination, or NULL for none.
@@ -91,7 +91,7 @@ struct DestinationEntry
91 /** 91 /**
92 * The description of the service (only used for service tunnels). 92 * The description of the service (only used for service tunnels).
93 */ 93 */
94 GNUNET_HashCode service_descriptor; 94 struct GNUNET_HashCode service_descriptor;
95 95
96 /** 96 /**
97 * Peer offering the service. 97 * Peer offering the service.
@@ -371,7 +371,7 @@ static unsigned long long max_tunnel_mappings;
371static void 371static void
372get_destination_key_from_ip (int af, 372get_destination_key_from_ip (int af,
373 const void *address, 373 const void *address,
374 GNUNET_HashCode *key) 374 struct GNUNET_HashCode *key)
375{ 375{
376 switch (af) 376 switch (af)
377 { 377 {
@@ -411,11 +411,11 @@ get_tunnel_key_from_ips (int af,
411 uint16_t source_port, 411 uint16_t source_port,
412 const void *destination_ip, 412 const void *destination_ip,
413 uint16_t destination_port, 413 uint16_t destination_port,
414 GNUNET_HashCode *key) 414 struct GNUNET_HashCode *key)
415{ 415{
416 char *off; 416 char *off;
417 417
418 memset (key, 0, sizeof (GNUNET_HashCode)); 418 memset (key, 0, sizeof (struct GNUNET_HashCode));
419 /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash, 419 /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash,
420 so we put the ports in there (and hope for few collisions) */ 420 so we put the ports in there (and hope for few collisions) */
421 off = (char*) key; 421 off = (char*) key;
@@ -501,7 +501,7 @@ send_client_reply (struct GNUNET_SERVER_Client *client,
501static void 501static void
502free_tunnel_state (struct TunnelState *ts) 502free_tunnel_state (struct TunnelState *ts)
503{ 503{
504 GNUNET_HashCode key; 504 struct GNUNET_HashCode key;
505 struct TunnelMessageQueueEntry *tnq; 505 struct TunnelMessageQueueEntry *tnq;
506 struct GNUNET_MESH_Tunnel *tunnel; 506 struct GNUNET_MESH_Tunnel *tunnel;
507 507
@@ -872,7 +872,7 @@ route_packet (struct DestinationEntry *destination,
872 const void *payload, 872 const void *payload,
873 size_t payload_length) 873 size_t payload_length)
874{ 874{
875 GNUNET_HashCode key; 875 struct GNUNET_HashCode key;
876 struct TunnelState *ts; 876 struct TunnelState *ts;
877 struct TunnelMessageQueueEntry *tnq; 877 struct TunnelMessageQueueEntry *tnq;
878 size_t alen; 878 size_t alen;
@@ -1510,7 +1510,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
1510{ 1510{
1511 const struct GNUNET_TUN_Layer2PacketHeader *tun; 1511 const struct GNUNET_TUN_Layer2PacketHeader *tun;
1512 size_t mlen; 1512 size_t mlen;
1513 GNUNET_HashCode key; 1513 struct GNUNET_HashCode key;
1514 struct DestinationEntry *de; 1514 struct DestinationEntry *de;
1515 1515
1516 GNUNET_STATISTICS_update (stats, 1516 GNUNET_STATISTICS_update (stats,
@@ -2336,7 +2336,7 @@ allocate_v4_address (struct in_addr *v4)
2336 struct in_addr addr; 2336 struct in_addr addr;
2337 struct in_addr mask; 2337 struct in_addr mask;
2338 struct in_addr rnd; 2338 struct in_addr rnd;
2339 GNUNET_HashCode key; 2339 struct GNUNET_HashCode key;
2340 unsigned int tries; 2340 unsigned int tries;
2341 2341
2342 GNUNET_assert (1 == inet_pton (AF_INET, ipv4addr, &addr)); 2342 GNUNET_assert (1 == inet_pton (AF_INET, ipv4addr, &addr));
@@ -2387,7 +2387,7 @@ allocate_v6_address (struct in6_addr *v6)
2387 struct in6_addr mask; 2387 struct in6_addr mask;
2388 struct in6_addr rnd; 2388 struct in6_addr rnd;
2389 int i; 2389 int i;
2390 GNUNET_HashCode key; 2390 struct GNUNET_HashCode key;
2391 unsigned int tries; 2391 unsigned int tries;
2392 2392
2393 GNUNET_assert (1 == inet_pton (AF_INET6, ipv6addr, &addr)); 2393 GNUNET_assert (1 == inet_pton (AF_INET6, ipv6addr, &addr));
@@ -2564,7 +2564,7 @@ service_redirect_to_ip (void *cls GNUNET_UNUSED, struct GNUNET_SERVER_Client *cl
2564 struct in6_addr v6; 2564 struct in6_addr v6;
2565 void *addr; 2565 void *addr;
2566 struct DestinationEntry *de; 2566 struct DestinationEntry *de;
2567 GNUNET_HashCode key; 2567 struct GNUNET_HashCode key;
2568 struct TunnelState *ts; 2568 struct TunnelState *ts;
2569 2569
2570 /* validate and parse request */ 2570 /* validate and parse request */
@@ -2703,7 +2703,7 @@ service_redirect_to_service (void *cls GNUNET_UNUSED, struct GNUNET_SERVER_Clien
2703 struct in6_addr v6; 2703 struct in6_addr v6;
2704 void *addr; 2704 void *addr;
2705 struct DestinationEntry *de; 2705 struct DestinationEntry *de;
2706 GNUNET_HashCode key; 2706 struct GNUNET_HashCode key;
2707 struct TunnelState *ts; 2707 struct TunnelState *ts;
2708 2708
2709 /* parse request */ 2709 /* parse request */
@@ -2835,7 +2835,7 @@ tunnel_cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel
2835 */ 2835 */
2836static int 2836static int
2837cleanup_destination (void *cls, 2837cleanup_destination (void *cls,
2838 const GNUNET_HashCode *key, 2838 const struct GNUNET_HashCode *key,
2839 void *value) 2839 void *value)
2840{ 2840{
2841 struct DestinationEntry *de = value; 2841 struct DestinationEntry *de = value;
@@ -2855,7 +2855,7 @@ cleanup_destination (void *cls,
2855 */ 2855 */
2856static int 2856static int
2857cleanup_tunnel (void *cls, 2857cleanup_tunnel (void *cls,
2858 const GNUNET_HashCode *key, 2858 const struct GNUNET_HashCode *key,
2859 void *value) 2859 void *value)
2860{ 2860{
2861 struct TunnelState *ts = value; 2861 struct TunnelState *ts = value;
@@ -2940,7 +2940,7 @@ cleanup (void *cls GNUNET_UNUSED,
2940 */ 2940 */
2941static int 2941static int
2942cleanup_tunnel_client (void *cls, 2942cleanup_tunnel_client (void *cls,
2943 const GNUNET_HashCode *key, 2943 const struct GNUNET_HashCode *key,
2944 void *value) 2944 void *value)
2945{ 2945{
2946 struct GNUNET_SERVER_Client *client = cls; 2946 struct GNUNET_SERVER_Client *client = cls;
@@ -2965,7 +2965,7 @@ cleanup_tunnel_client (void *cls,
2965 */ 2965 */
2966static int 2966static int
2967cleanup_destination_client (void *cls, 2967cleanup_destination_client (void *cls,
2968 const GNUNET_HashCode *key, 2968 const struct GNUNET_HashCode *key,
2969 void *value) 2969 void *value)
2970{ 2970{
2971 struct GNUNET_SERVER_Client *client = cls; 2971 struct GNUNET_SERVER_Client *client = cls;
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c
index b75b1d29a..a03a12e87 100644
--- a/src/vpn/gnunet-vpn.c
+++ b/src/vpn/gnunet-vpn.c
@@ -173,7 +173,7 @@ run (void *cls, char *const *args, const char *cfgfile,
173 int dst_af; 173 int dst_af;
174 int req_af; 174 int req_af;
175 struct GNUNET_PeerIdentity peer; 175 struct GNUNET_PeerIdentity peer;
176 GNUNET_HashCode sd; 176 struct GNUNET_HashCode sd;
177 const void *addr; 177 const void *addr;
178 struct in_addr v4; 178 struct in_addr v4;
179 struct in6_addr v6; 179 struct in6_addr v6;
diff --git a/src/vpn/vpn.h b/src/vpn/vpn.h
index bec3a5b59..12c9a7c81 100644
--- a/src/vpn/vpn.h
+++ b/src/vpn/vpn.h
@@ -115,7 +115,7 @@ struct RedirectToServiceRequestMessage
115 /** 115 /**
116 * Service descriptor identifying the service. 116 * Service descriptor identifying the service.
117 */ 117 */
118 GNUNET_HashCode service_descriptor; 118 struct GNUNET_HashCode service_descriptor;
119 119
120 /** 120 /**
121 * Unique ID to match a future response to this request. 121 * Unique ID to match a future response to this request.
diff --git a/src/vpn/vpn_api.c b/src/vpn/vpn_api.c
index 5b70d19df..e4da5fae0 100644
--- a/src/vpn/vpn_api.c
+++ b/src/vpn/vpn_api.c
@@ -120,7 +120,7 @@ struct GNUNET_VPN_RedirectionRequest
120 /** 120 /**
121 * For service redirection, service descriptor. 121 * For service redirection, service descriptor.
122 */ 122 */
123 GNUNET_HashCode serv; 123 struct GNUNET_HashCode serv;
124 124
125 /** 125 /**
126 * At what time should the created service mapping expire? 126 * At what time should the created service mapping expire?
@@ -464,7 +464,7 @@ GNUNET_VPN_redirect_to_peer (struct GNUNET_VPN_Handle *vh,
464 int result_af, 464 int result_af,
465 uint8_t protocol, 465 uint8_t protocol,
466 const struct GNUNET_PeerIdentity *peer, 466 const struct GNUNET_PeerIdentity *peer,
467 const GNUNET_HashCode *serv, 467 const struct GNUNET_HashCode *serv,
468 int nac, 468 int nac,
469 struct GNUNET_TIME_Absolute expiration_time, 469 struct GNUNET_TIME_Absolute expiration_time,
470 GNUNET_VPN_AllocationCallback cb, 470 GNUNET_VPN_AllocationCallback cb,