summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-12 19:07:40 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-12 19:07:40 +0000
commit6c471eeb15e27f8226492b4860a3c2acb94c5f25 (patch)
treea3a9dcba12ee5356c03056c10b7aba5367b2ef34 /src
parent16bcbbea7133fd2265d46bd2ae1dc70e8c9ba96f (diff)
-consistently use struct GNUNET_HashCode
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)
if (99 == strlen (section))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer '%s`\n", section);
- GNUNET_HashCode h;
+ struct GNUNET_HashCode h;
int res = GNUNET_CRYPTO_hash_from_string (section, &h);
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)
* @return GNUNET_OK (continue to iterate)
*/
static int
-update_bw_simple_it (void *cls, const GNUNET_HashCode * key, void *value)
+update_bw_simple_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ATS_Address *aa = value;
@@ -219,7 +219,7 @@ struct CompareAddressContext
static int
-compare_address_it (void *cls, const GNUNET_HashCode * key, void *value)
+compare_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct CompareAddressContext *cac = cls;
struct ATS_Address *aa = value;
@@ -289,7 +289,7 @@ find_address (const struct GNUNET_PeerIdentity *peer,
static int
-compare_address_session_it (void *cls, const GNUNET_HashCode * key, void *value)
+compare_address_session_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct CompareAddressContext *cac = cls;
struct ATS_Address *aa = value;
@@ -444,7 +444,7 @@ GAS_addresses_update (const struct GNUNET_PeerIdentity *peer,
* @return GNUNET_OK (continue to iterate)
*/
static int
-destroy_by_session_id (void *cls, const GNUNET_HashCode * key, void *value)
+destroy_by_session_id (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const struct ATS_Address *info = cls;
struct ATS_Address *aa = value;
@@ -539,7 +539,7 @@ GAS_addresses_destroy (const struct GNUNET_PeerIdentity *peer,
* @return GNUNET_OK (continue to iterate)
*/
static int
-find_address_it (void *cls, const GNUNET_HashCode * key, void *value)
+find_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ATS_Address **ap = cls;
struct ATS_Address *aa = (struct ATS_Address *) value;
@@ -761,7 +761,7 @@ GAS_addresses_request_address (const struct GNUNET_PeerIdentity *peer)
static int
-reset_address_it (void *cls, const GNUNET_HashCode * key, void *value)
+reset_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ATS_Address *aa = value;
@@ -903,7 +903,7 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
* @return GNUNET_OK (continue to iterate)
*/
static int
-free_address_it (void *cls, const GNUNET_HashCode * key, void *value)
+free_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ATS_Address *aa = value;
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)
* @return GNUNET_OK to continue
*/
static int
-create_constraint_it (void *cls, const GNUNET_HashCode * key, void *value)
+create_constraint_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GAS_MLP_Handle *mlp = cls;
struct ATS_Address *address = value;
@@ -674,7 +674,7 @@ mlp_add_constraints_all_addresses (struct GAS_MLP_Handle *mlp, struct GNUNET_CON
* @return GNUNET_OK to continue
*/
static int
-create_columns_it (void *cls, const GNUNET_HashCode * key, void *value)
+create_columns_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GAS_MLP_Handle *mlp = cls;
struct ATS_Address *address = value;
@@ -1706,7 +1706,7 @@ GAS_mlp_address_delete (struct GAS_MLP_Handle *mlp, struct GNUNET_CONTAINER_Mult
}
static int
-mlp_get_preferred_address_it (void *cls, const GNUNET_HashCode * key, void *value)
+mlp_get_preferred_address_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
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 ()
* @return GNUNET_OK (continue to iterate)
*/
static int
-free_tracker (void *cls, const GNUNET_HashCode * key, void *value)
+free_tracker (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_BANDWIDTH_Tracker *tracker = value;
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
* @param hc where to store the result.
*/
void
-GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, uint32_t mingle_number,
- GNUNET_HashCode * hc)
+GNUNET_BLOCK_mingle_hash (const struct GNUNET_HashCode * in, uint32_t mingle_number,
+ struct GNUNET_HashCode * hc)
{
- GNUNET_HashCode m;
+ struct GNUNET_HashCode m;
GNUNET_CRYPTO_hash (&mingle_number, sizeof (uint32_t), &m);
GNUNET_CRYPTO_hash_xor (&m, in, hc);
@@ -204,7 +204,7 @@ find_plugin (struct GNUNET_BLOCK_Context *ctx, enum GNUNET_BLOCK_Type type)
enum GNUNET_BLOCK_EvaluationResult
GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
@@ -233,7 +233,7 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
int
GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
enum GNUNET_BLOCK_Type type, const void *block,
- size_t block_size, GNUNET_HashCode * key)
+ size_t block_size, struct GNUNET_HashCode * key)
{
struct GNUNET_BLOCK_PluginFunctions *plugin = find_plugin (ctx, type);
@@ -285,11 +285,11 @@ compute_bloomfilter_size (unsigned int entry_count)
*/
struct GNUNET_CONTAINER_BloomFilter *
GNUNET_BLOCK_construct_bloomfilter (int32_t bf_mutator,
- const GNUNET_HashCode * seen_results,
+ const struct GNUNET_HashCode * seen_results,
unsigned int seen_results_count)
{
struct GNUNET_CONTAINER_BloomFilter *bf;
- GNUNET_HashCode mhash;
+ struct GNUNET_HashCode mhash;
unsigned int i;
size_t nsize;
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 @@
*/
static enum GNUNET_BLOCK_EvaluationResult
block_plugin_template_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
@@ -92,7 +92,7 @@ block_plugin_template_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
static int
block_plugin_template_get_key (void *cls, enum GNUNET_BLOCK_Type type,
const void *block, size_t block_size,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
return GNUNET_SYSERR;
}
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 @@
*/
static enum GNUNET_BLOCK_EvaluationResult
block_plugin_test_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
size_t reply_block_size)
{
- GNUNET_HashCode chash;
- GNUNET_HashCode mhash;
+ struct GNUNET_HashCode chash;
+ struct GNUNET_HashCode mhash;
if (type != GNUNET_BLOCK_TYPE_TEST)
return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED;
@@ -106,7 +106,7 @@ block_plugin_test_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
static int
block_plugin_test_get_key (void *cls, enum GNUNET_BLOCK_Type type,
const void *block, size_t block_size,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
/* always fails since there is no fixed relationship between
* 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 @@
static int
test_fs (struct GNUNET_BLOCK_Context *ctx)
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
char block[4];
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
/**
* Member ID (pseudonym).
*/
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
};
@@ -224,8 +224,8 @@ process_result (struct GNUNET_CHAT_Room *room,
struct ReceiveNotificationMessage *received_msg;
struct ConfirmationReceiptMessage *receipt;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
- GNUNET_HashCode id;
- const GNUNET_HashCode *sender;
+ struct GNUNET_HashCode id;
+ const struct GNUNET_HashCode *sender;
struct GNUNET_CONTAINER_MetaData *meta;
struct GNUNET_CHAT_SendReceiptContext *src;
struct MemberList *pos;
@@ -308,7 +308,7 @@ process_result (struct GNUNET_CHAT_Room *room,
prev = NULL;
pos = room->members;
while ((NULL != pos) &&
- (0 != memcmp (&pos->id, &id, sizeof (GNUNET_HashCode))))
+ (0 != memcmp (&pos->id, &id, sizeof (struct GNUNET_HashCode))))
{
prev = pos;
pos = pos->next;
@@ -379,7 +379,7 @@ process_result (struct GNUNET_CHAT_Room *room,
while ((NULL != pos) &&
(0 !=
memcmp (&pos->id, &received_msg->sender,
- sizeof (GNUNET_HashCode))))
+ sizeof (struct GNUNET_HashCode))))
pos = pos->next;
GNUNET_assert (NULL != pos);
sender = &received_msg->sender;
@@ -649,7 +649,7 @@ GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_CHAT_MemberListCallback memberCallback,
void *member_cls,
GNUNET_CHAT_MessageConfirmation confirmationCallback,
- void *confirmation_cls, GNUNET_HashCode * me)
+ void *confirmation_cls, struct GNUNET_HashCode * me)
{
struct GNUNET_CHAT_Room *chat_room;
struct GNUNET_CRYPTO_RsaPrivateKey *priv_key;
@@ -755,7 +755,7 @@ transmit_send_request (void *cls, size_t size, void *buf)
GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
msg_to_send->reserved = htonl (0);
if (NULL == smc->receiver)
- memset (&msg_to_send->target, 0, sizeof (GNUNET_HashCode));
+ memset (&msg_to_send->target, 0, sizeof (struct GNUNET_HashCode));
else
GNUNET_CRYPTO_hash (smc->receiver,
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
* Hash of the public key of the pseudonym of the sender of the message.
* Should be all zeros for anonymous.
*/
- GNUNET_HashCode sender;
+ struct GNUNET_HashCode sender;
/**
* The encrypted session key.
@@ -136,7 +136,7 @@ struct TransmitRequestMessage
/**
* Who should receive this message? Set to all zeros for "everyone".
*/
- GNUNET_HashCode target;
+ struct GNUNET_HashCode target;
};
@@ -189,17 +189,17 @@ struct ConfirmationReceiptMessage
/**
* Who is confirming the receipt?
*/
- GNUNET_HashCode target;
+ struct GNUNET_HashCode target;
/**
* Who is the author of the chat message?
*/
- GNUNET_HashCode author;
+ struct GNUNET_HashCode author;
/**
* Hash of the (possibly encrypted) content.
*/
- GNUNET_HashCode content;
+ struct GNUNET_HashCode content;
};
@@ -406,12 +406,12 @@ struct P2PReceiveNotificationMessage
* Hash of the public key of the pseudonym of the sender of the message
* Should be all zeros for anonymous.
*/
- GNUNET_HashCode sender;
+ struct GNUNET_HashCode sender;
/**
* Who should receive this message? Set to all zeros for "everyone".
*/
- GNUNET_HashCode target;
+ struct GNUNET_HashCode target;
/**
* The encrypted session key.
@@ -465,17 +465,17 @@ struct P2PConfirmationReceiptMessage
/**
* Who is confirming the receipt?
*/
- GNUNET_HashCode target;
+ struct GNUNET_HashCode target;
/**
* Who is the author of the chat message?
*/
- GNUNET_HashCode author;
+ struct GNUNET_HashCode author;
/**
* Hash of the (possibly encrypted) content.
*/
- GNUNET_HashCode content;
+ struct GNUNET_HashCode content;
};
GNUNET_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)
*/
static int
receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
- const GNUNET_HashCode * sender,
+ const struct GNUNET_HashCode * sender,
const struct GNUNET_CONTAINER_MetaData *member_info,
const char *message, struct GNUNET_TIME_Absolute timestamp,
enum GNUNET_CHAT_MsgOptions options)
@@ -199,7 +199,7 @@ static int
confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
uint32_t orig_seq_number,
struct GNUNET_TIME_Absolute timestamp,
- const GNUNET_HashCode * receiver)
+ const struct GNUNET_HashCode * receiver)
{
char *nick;
char *unique_nick;
@@ -238,7 +238,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
char *nick;
char *non_unique_nick;
int nick_is_a_dup;
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
struct UserList *pos;
struct UserList *prev;
@@ -304,7 +304,7 @@ do_join (const char *arg, const void *xtra)
{
char *my_name;
int my_name_is_a_dup;
- GNUNET_HashCode me;
+ struct GNUNET_HashCode me;
if (arg[0] == '#')
arg++; /* ignore first hash */
@@ -343,7 +343,7 @@ do_nick (const char *msg, const void *xtra)
{
char *my_name;
int my_name_is_a_dup;
- GNUNET_HashCode me;
+ struct GNUNET_HashCode me;
GNUNET_CHAT_leave_room (room);
free_user_list ();
@@ -383,7 +383,7 @@ do_names (const char *msg, const void *xtra)
char *unique_name;
int name_is_a_dup;
struct UserList *pos;
- GNUNET_HashCode pid;
+ struct GNUNET_HashCode pid;
FPRINTF (stdout, _("Users in room `%s': "), room_name);
pos = users;
@@ -424,8 +424,8 @@ static int
do_send_pm (const char *msg, const void *xtra)
{
char *user;
- GNUNET_HashCode uid;
- GNUNET_HashCode pid;
+ struct GNUNET_HashCode uid;
+ struct GNUNET_HashCode pid;
uint32_t seq;
struct UserList *pos;
@@ -451,7 +451,7 @@ do_send_pm (const char *msg, const void *xtra)
GNUNET_CRYPTO_hash (&pos->pkey,
sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
&pid);
- if (0 == memcmp (&pid, &uid, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&pid, &uid, sizeof (struct GNUNET_HashCode)))
break;
pos = pos->next;
}
@@ -661,7 +661,7 @@ static void
run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
- GNUNET_HashCode me;
+ struct GNUNET_HashCode me;
char *my_name;
int my_name_is_a_dup;
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
/**
* Hash of the public key (for convenience).
*/
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
/**
* Options which the client is willing to receive.
@@ -117,7 +117,7 @@ struct AnonymousMessage
/**
* Hash of the message.
*/
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
};
@@ -162,7 +162,7 @@ static void
remember_anonymous_message (const struct P2PReceiveNotificationMessage
*p2p_rnmsg)
{
- static GNUNET_HashCode hash;
+ static struct GNUNET_HashCode hash;
struct AnonymousMessage *anon_msg;
struct AnonymousMessage *prev;
int anon_list_len;
@@ -192,13 +192,13 @@ remember_anonymous_message (const struct P2PReceiveNotificationMessage
static int
lookup_anonymous_message (const struct P2PReceiveNotificationMessage *p2p_rnmsg)
{
- static GNUNET_HashCode hash;
+ static struct GNUNET_HashCode hash;
struct AnonymousMessage *anon_msg;
GNUNET_CRYPTO_hash (p2p_rnmsg, ntohs (p2p_rnmsg->header.size), &hash);
anon_msg = anonymous_list_head;
while ((NULL != anon_msg) &&
- (0 != memcmp (&anon_msg->hash, &hash, sizeof (GNUNET_HashCode))))
+ (0 != memcmp (&anon_msg->hash, &hash, sizeof (struct GNUNET_HashCode))))
anon_msg = anon_msg->next;
return (NULL != anon_msg);
}
@@ -244,7 +244,7 @@ transmit_message_notification_to_peer (void *cls, size_t size, void *buf)
* Ask to send a message notification to the peer.
*/
static int
-send_message_noficiation (void *cls, const GNUNET_HashCode * key, void *value)
+send_message_noficiation (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct P2PReceiveNotificationMessage *msg = cls;
struct ConnectedPeer *cp = value;
@@ -280,7 +280,7 @@ static void
handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
- static GNUNET_HashCode all_zeros;
+ static struct GNUNET_HashCode all_zeros;
const struct TransmitRequestMessage *trmsg;
struct ReceiveNotificationMessage *rnmsg;
struct P2PReceiveNotificationMessage *p2p_rnmsg;
@@ -349,7 +349,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
is_anon = (0 != (ntohl (trmsg->msg_options) & GNUNET_CHAT_MSG_ANONYMOUS));
if (is_anon)
{
- memset (&rnmsg->sender, 0, sizeof (GNUNET_HashCode));
+ memset (&rnmsg->sender, 0, sizeof (struct GNUNET_HashCode));
rnmsg->sequence_number = 0;
}
else
@@ -364,7 +364,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
"Encrypting the session key using the public key of '%s'\n",
GNUNET_h2s (&trmsg->target));
#endif
- if (0 == memcmp (&all_zeros, &trmsg->target, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&all_zeros, &trmsg->target, sizeof (struct GNUNET_HashCode)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Malformed message: private, but no target\n");
@@ -377,7 +377,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
target = client_list_head;
while ((NULL != target) &&
(0 !=
- memcmp (&target->id, &trmsg->target, sizeof (GNUNET_HashCode))))
+ memcmp (&target->id, &trmsg->target, sizeof (struct GNUNET_HashCode))))
target = target->next;
if (NULL == target)
{
@@ -416,7 +416,7 @@ handle_transmit_request (void *cls, struct GNUNET_SERVER_Client *client,
(pos->client != client))
{
if (((!is_priv) ||
- (0 == memcmp (&trmsg->target, &pos->id, sizeof (GNUNET_HashCode))))
+ (0 == memcmp (&trmsg->target, &pos->id, sizeof (struct GNUNET_HashCode))))
&& (0 == (ntohl (trmsg->msg_options) & (~pos->msg_options))))
{
GNUNET_SERVER_notification_context_unicast (nc, pos->client,
@@ -521,7 +521,7 @@ transmit_join_notification_to_peer (void *cls, size_t size, void *buf)
* Ask to send a join notification to the peer.
*/
static int
-send_join_noficiation (void *cls, const GNUNET_HashCode * key, void *value)
+send_join_noficiation (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ChatClient *entry = cls;
struct ConnectedPeer *cp = value;
@@ -703,7 +703,7 @@ transmit_confirmation_receipt_to_peer (void *cls, size_t size, void *buf)
* Ask to send a confirmation receipt to the peer.
*/
static int
-send_confirmation_receipt (void *cls, const GNUNET_HashCode * key, void *value)
+send_confirmation_receipt (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct P2PConfirmationReceiptMessage *receipt = cls;
struct ConnectedPeer *cp = value;
@@ -754,7 +754,7 @@ handle_acknowledge_request (void *cls, struct GNUNET_SERVER_Client *client,
author = client_list_head;
while ((NULL != author) &&
(0 !=
- memcmp (&receipt->author, &author->id, sizeof (GNUNET_HashCode))))
+ memcmp (&receipt->author, &author->id, sizeof (struct GNUNET_HashCode))))
author = author->next;
if (NULL == author)
{
@@ -767,7 +767,7 @@ handle_acknowledge_request (void *cls, struct GNUNET_SERVER_Client *client,
target = client_list_head;
while ((NULL != target) &&
(0 !=
- memcmp (&receipt->target, &target->id, sizeof (GNUNET_HashCode))))
+ memcmp (&receipt->target, &target->id, sizeof (struct GNUNET_HashCode))))
target = target->next;
if (NULL == target)
{
@@ -880,7 +880,7 @@ transmit_leave_notification_to_peer (void *cls, size_t size, void *buf)
* Ask to send a leave notification to the peer.
*/
static int
-send_leave_noficiation (void *cls, const GNUNET_HashCode * key, void *value)
+send_leave_noficiation (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ChatClient *entry = cls;
struct ConnectedPeer *cp = value;
@@ -1000,7 +1000,7 @@ handle_p2p_join_notification (void *cls,
struct ChatClient *new_entry;
struct ChatClient *entry;
struct JoinNotificationMessage *jnmsg;
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Got P2P join notification\n");
if (ntohs (message->size) <= sizeof (struct P2PJoinNotificationMessage))
@@ -1025,7 +1025,7 @@ handle_p2p_join_notification (void *cls,
entry = client_list_head;
while (NULL != entry)
{
- if (0 == memcmp (&entry->id, &id, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&entry->id, &id, sizeof (struct GNUNET_HashCode)))
{
#if DEBUG_CHAT_SERVICE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1109,7 +1109,7 @@ handle_p2p_leave_notification (void *cls,
unsigned int atsi_count)
{
const struct P2PLeaveNotificationMessage *p2p_lnmsg;
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
struct ChatClient *pos;
struct ChatClient *prev;
struct ChatClient *entry;
@@ -1124,7 +1124,7 @@ handle_p2p_leave_notification (void *cls,
prev = NULL;
while (NULL != pos)
{
- if (0 == memcmp (&pos->id, &id, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&pos->id, &id, sizeof (struct GNUNET_HashCode)))
break;
prev = pos;
pos = pos->next;
@@ -1195,7 +1195,7 @@ handle_p2p_message_notification (void *cls,
struct ReceiveNotificationMessage *rnmsg;
struct ChatClient *sender;
struct ChatClient *pos;
- static GNUNET_HashCode all_zeros;
+ static struct GNUNET_HashCode all_zeros;
int is_priv;
int is_anon;
uint16_t msg_len;
@@ -1246,7 +1246,7 @@ handle_p2p_message_notification (void *cls,
sender = client_list_head;
while ((NULL != sender) &&
(0 !=
- memcmp (&sender->id, &p2p_rnmsg->sender, sizeof (GNUNET_HashCode))))
+ memcmp (&sender->id, &p2p_rnmsg->sender, sizeof (struct GNUNET_HashCode))))
sender = sender->next;
if (NULL == sender)
{
@@ -1287,7 +1287,7 @@ handle_p2p_message_notification (void *cls,
rnmsg->reserved = htonl (0);
rnmsg->timestamp = p2p_rnmsg->timestamp;
is_priv =
- (0 != memcmp (&all_zeros, &p2p_rnmsg->target, sizeof (GNUNET_HashCode)));
+ (0 != memcmp (&all_zeros, &p2p_rnmsg->target, sizeof (struct GNUNET_HashCode)));
if (is_priv)
memcpy (&rnmsg->encrypted_key, &p2p_rnmsg->encrypted_key,
sizeof (struct GNUNET_CRYPTO_RsaEncryptedData));
@@ -1300,7 +1300,7 @@ handle_p2p_message_notification (void *cls,
{
if (((!is_priv) ||
(0 ==
- memcmp (&p2p_rnmsg->target, &pos->id, sizeof (GNUNET_HashCode)))) &&
+ memcmp (&p2p_rnmsg->target, &pos->id, sizeof (struct GNUNET_HashCode)))) &&
(0 == (ntohl (p2p_rnmsg->msg_options) & (~pos->msg_options))))
{
GNUNET_SERVER_notification_context_unicast (nc, pos->client,
@@ -1396,7 +1396,7 @@ handle_p2p_confirmation_receipt (void *cls,
target = client_list_head;
while ((NULL != target) &&
(0 !=
- memcmp (&target->id, &p2p_crmsg->target, sizeof (GNUNET_HashCode))))
+ memcmp (&target->id, &p2p_crmsg->target, sizeof (struct GNUNET_HashCode))))
target = target->next;
if (NULL == target)
{
@@ -1420,7 +1420,7 @@ handle_p2p_confirmation_receipt (void *cls,
author = client_list_head;
while ((NULL != author) &&
(0 !=
- memcmp (&author->id, &p2p_crmsg->author, sizeof (GNUNET_HashCode))))
+ memcmp (&author->id, &p2p_crmsg->author, sizeof (struct GNUNET_HashCode))))
author = author->next;
if (NULL == author)
{
@@ -1563,7 +1563,7 @@ peer_connect_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-clean_peer (void *cls, const GNUNET_HashCode * key, void *value)
+clean_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ConnectedPeer *cp;
const struct GNUNET_PeerIdentity *peer =
@@ -1595,7 +1595,7 @@ peer_disconnect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
return;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer disconnected: %s\n",
GNUNET_i2s (peer));
- clean_peer (NULL, (const GNUNET_HashCode *) peer, NULL);
+ clean_peer (NULL, (const struct GNUNET_HashCode *) peer, NULL);
}
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
{
struct GNUNET_CONTAINER_MetaData *meta;
- GNUNET_HashCode *sender;
+ struct GNUNET_HashCode *sender;
char *msg;
@@ -80,9 +80,9 @@ static struct PeerContext p1;
static struct PeerContext p2;
-static GNUNET_HashCode alice;
+static struct GNUNET_HashCode alice;
-static GNUNET_HashCode bob;
+static struct GNUNET_HashCode bob;
static struct GNUNET_CHAT_Room *alice_room;
@@ -201,7 +201,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
enum GNUNET_CHAT_MsgOptions options)
{
struct Wanted *want = cls;
- GNUNET_HashCode sender;
+ struct GNUNET_HashCode sender;
#if VERBOSE
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,
GNUNET_CRYPTO_hash (member_id,
sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
&sender);
- if ((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) &&
+ if ((0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode))) &&
(((member_info == NULL) && (want->meta == NULL)) ||
((member_info != NULL) && (want->meta != NULL) &&
(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,
static int
receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
- const GNUNET_HashCode * sender,
+ const struct GNUNET_HashCode * sender,
const struct GNUNET_CONTAINER_MetaData *meta, const char *message,
struct GNUNET_TIME_Absolute timestamp,
enum GNUNET_CHAT_MsgOptions options)
@@ -250,7 +250,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
if ((0 == strcmp (message, want->msg)) &&
(((sender == NULL) && (want->sender == NULL)) ||
((sender != NULL) && (want->sender != NULL) &&
- (0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) &&
+ (0 == memcmp (sender, want->sender, sizeof (struct GNUNET_HashCode))))) &&
(GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) &&
(options == want->opt) &&
/* Not == since the library sets the actual timestamp, so it may be
@@ -275,7 +275,7 @@ static int
confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
uint32_t orig_seq_number,
struct GNUNET_TIME_Absolute timestamp,
- const GNUNET_HashCode * receiver)
+ const struct GNUNET_HashCode * receiver)
{
struct Wanted *want = cls;
@@ -285,7 +285,7 @@ confirmation_cb (void *cls, struct GNUNET_CHAT_Room *room,
EXTRACTOR_METATYPE_TITLE),
orig_seq_number);
#endif
- if ((0 == memcmp (receiver, want->sender, sizeof (GNUNET_HashCode))) &&
+ if ((0 == memcmp (receiver, want->sender, sizeof (struct GNUNET_HashCode))) &&
(orig_seq_number == want->sequence_number) &&
(timestamp.abs_value >= want->timestamp.abs_value))
{
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
{
struct GNUNET_CONTAINER_MetaData *meta;
- GNUNET_HashCode *sender;
+ struct GNUNET_HashCode *sender;
/**
* Alternative meta/sender is used when we expect join/leave notification
@@ -64,7 +64,7 @@ struct Wanted
*/
struct GNUNET_CONTAINER_MetaData *meta2;
- GNUNET_HashCode *sender2;
+ struct GNUNET_HashCode *sender2;
char *msg;
@@ -86,11 +86,11 @@ static struct PeerContext p2;
static struct PeerContext p3;
-static GNUNET_HashCode alice;
+static struct GNUNET_HashCode alice;
-static GNUNET_HashCode bob;
+static struct GNUNET_HashCode bob;
-static GNUNET_HashCode carol;
+static struct GNUNET_HashCode carol;
static struct GNUNET_CHAT_Room *alice_room;
@@ -220,7 +220,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
enum GNUNET_CHAT_MsgOptions options)
{
struct Wanted *want = cls;
- GNUNET_HashCode sender;
+ struct GNUNET_HashCode sender;
#if VERBOSE
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,
sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
&sender);
/* entertain both primary and an alternative sender/meta */
- if (((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) ||
+ if (((0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode))) ||
((want->sender2 != NULL) &&
- (0 == memcmp (&sender, want->sender2, sizeof (GNUNET_HashCode))))) &&
+ (0 == memcmp (&sender, want->sender2, sizeof (struct GNUNET_HashCode))))) &&
(((member_info == NULL) && (want->meta == NULL)) ||
((member_info != NULL) &&
(((want->meta != NULL) &&
@@ -246,7 +246,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
{
/* remember Bob's public key, we need it to send private message */
if (NULL == bob_public_key &&
- (0 == memcmp (&bob, want->sender, sizeof (GNUNET_HashCode))))
+ (0 == memcmp (&bob, want->sender, sizeof (struct GNUNET_HashCode))))
bob_public_key =
GNUNET_memdup (member_id,
sizeof (struct
@@ -254,7 +254,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
if (want->sender2 != NULL)
{
/* flush alternative sender */
- if (0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&sender, want->sender, sizeof (struct GNUNET_HashCode)))
{
want->sender = want->sender2;
want->meta = want->meta2;
@@ -277,7 +277,7 @@ member_list_cb (void *cls, const struct GNUNET_CONTAINER_MetaData *member_info,
static int
receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
- const GNUNET_HashCode * sender,
+ const struct GNUNET_HashCode * sender,
const struct GNUNET_CONTAINER_MetaData *meta, const char *message,
struct GNUNET_TIME_Absolute timestamp,
enum GNUNET_CHAT_MsgOptions options)
@@ -294,7 +294,7 @@ receive_cb (void *cls, struct GNUNET_CHAT_Room *room,
if ((want->msg != NULL) && (0 == strcmp (message, want->msg)) &&
(((sender == NULL) && (want->sender == NULL)) ||
((sender != NULL) && (want->sender != NULL) &&
- (0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) &&
+ (0 == memcmp (sender, want->sender, sizeof (struct GNUNET_HashCode))))) &&
(GNUNET_CONTAINER_meta_data_test_equal (meta, want->meta)) &&
(options == want->opt) &&
/* 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)
* @return GNUNET_YES (continue)
*/
static int
-disconnect_and_free_peer_entry (void *cls, const GNUNET_HashCode * key,
+disconnect_and_free_peer_entry (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
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,
* @return GNUNET_YES (continue iteration)
*/
static int
-destroy_active_client_request (void *cls, const GNUNET_HashCode * key,
+destroy_active_client_request (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
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
* (excluding this value itself) will be encrypted and authenticated.
* ENCRYPTED_HEADER_SIZE must be set to the offset of the *next* field.
*/
- GNUNET_HashCode hmac;
+ struct GNUNET_HashCode hmac;
/**
* Sequence number, in network byte order. This field
@@ -1513,7 +1513,7 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
{
const struct EncryptedMessage *m;
struct EncryptedMessage *pt; /* plaintext */
- GNUNET_HashCode ph;
+ struct GNUNET_HashCode ph;
uint32_t snum;
struct GNUNET_TIME_Absolute t;
struct GNUNET_CRYPTO_AesInitializationVector iv;
@@ -1550,7 +1550,7 @@ GSC_KX_handle_encrypted_message (struct GSC_KeyExchangeInfo *kx,
kx->decrypt_key_created);
GNUNET_CRYPTO_hmac (&auth_key, &m->sequence_number,
size - ENCRYPTED_HEADER_SIZE, &ph);
- if (0 != memcmp (&ph, &m->hmac, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (&ph, &m->hmac, sizeof (struct GNUNET_HashCode)))
{
/* checksum failed */
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 ()
* @return GNUNET_OK (continue to iterate)
*/
static int
-free_neighbour_helper (void *cls, const GNUNET_HashCode * key, void *value)
+free_neighbour_helper (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct Neighbour *n = value;
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,
* @return GNUNET_OK (continue to iterate)
*/
static int
-notify_client_about_session (void *cls, const GNUNET_HashCode * key,
+notify_client_about_session (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct GSC_Client *client = cls;
@@ -549,7 +549,7 @@ try_transmission (struct Session *session)
* @return always GNUNET_OK
*/
static int
-do_send_message (void *cls, const GNUNET_HashCode * key, void *value)
+do_send_message (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const struct GNUNET_MessageHeader *hdr = cls;
struct Session *session = value;
@@ -642,7 +642,7 @@ GSC_SESSIONS_transmit (struct GSC_ClientActiveRequest *car,
*/
#include "core.h"
static int
-queue_connect_message (void *cls, const GNUNET_HashCode * key, void *value)
+queue_connect_message (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_SERVER_TransmitContext *tc = cls;
struct Session *session = value;
@@ -795,7 +795,7 @@ GSC_SESSIONS_init ()
* @return GNUNET_OK (continue to iterate)
*/
static int
-free_session_helper (void *cls, const GNUNET_HashCode * key, void *value)
+free_session_helper (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct Session *session = value;
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
* @param size number of bytes that were made available
*/
static void
-env_delete_notify (void *cls, const GNUNET_HashCode * key, size_t size)
+env_delete_notify (void *cls, const struct GNUNET_HashCode * key, size_t size)
{
struct GNUNET_DATACACHE_Handle *h = cls;
@@ -233,7 +233,7 @@ GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h)
*/
int
GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
- const GNUNET_HashCode * key, size_t size,
+ const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time)
{
@@ -270,7 +270,7 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
*/
unsigned int
GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
- const GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
+ const struct GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
GNUNET_DATACACHE_Iterator iter, void *iter_cls)
{
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;
static int
checkIt (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key, size_t size, const char *data,
+ const struct GNUNET_HashCode * key, size_t size, const char *data,
enum GNUNET_BLOCK_Type type)
{
- if ((size == sizeof (GNUNET_HashCode)) && (0 == memcmp (data, cls, size)))
+ if ((size == sizeof (struct GNUNET_HashCode)) && (0 == memcmp (data, cls, size)))
found++;
return GNUNET_OK;
}
@@ -59,8 +59,8 @@ run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct GNUNET_DATACACHE_Handle *h;
- GNUNET_HashCode k;
- GNUNET_HashCode n;
+ struct GNUNET_HashCode k;
+ struct GNUNET_HashCode n;
struct GNUNET_TIME_Absolute exp;
struct GNUNET_TIME_Absolute start;
unsigned int i;
@@ -76,14 +76,14 @@ run (void *cls, char *const *args, const char *cfgfile,
}
exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
start = GNUNET_TIME_absolute_get ();
- memset (&k, 0, sizeof (GNUNET_HashCode));
+ memset (&k, 0, sizeof (struct GNUNET_HashCode));
for (i = 0; i < ITERATIONS; i++)
{
if (0 == i % (ITERATIONS / 80))
FPRINTF (stderr, "%s", ".");
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
ASSERT (GNUNET_OK ==
- GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode),
+ GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
(const char *) &n, 1 + i % 16, exp));
k = n;
}
@@ -96,12 +96,12 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_TIME_absolute_get_duration (start).rel_value / ITERATIONS,
"ms/item");
start = GNUNET_TIME_absolute_get ();
- memset (&k, 0, sizeof (GNUNET_HashCode));
+ memset (&k, 0, sizeof (struct GNUNET_HashCode));
for (i = 0; i < ITERATIONS; i++)
{
if (0 == i % (ITERATIONS / 80))
FPRINTF (stderr, "%s", ".");
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n);
k = n;
}
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 @@
/**
* Estimate of the per-entry overhead (including indices).
*/
-#define OVERHEAD ((4*2+4*2+8*2+8*2+sizeof(GNUNET_HashCode)*5+8))
+#define OVERHEAD ((4*2+4*2+8*2+8*2+sizeof(struct GNUNET_HashCode)*5+8))
/**
* Die with an error message that indicates
@@ -190,7 +190,7 @@ itable (struct Plugin *plugin)
* @return 0 on error, number of bytes used otherwise
*/
static size_t
-mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
+mysql_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time)
{
@@ -202,7 +202,7 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
unsigned long long v_now;
unsigned long long v_discard_time;
unsigned int v_type;
- GNUNET_HashCode vhash;
+ struct GNUNET_HashCode vhash;
int ret;
if (size > GNUNET_SERVER_MAX_MESSAGE_SIZE)
@@ -211,8 +211,8 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
now = GNUNET_TIME_absolute_get ();
/* first try UPDATE */
- h_length = sizeof (GNUNET_HashCode);
- k_length = sizeof (GNUNET_HashCode);
+ h_length = sizeof (struct GNUNET_HashCode);
+ k_length = sizeof (struct GNUNET_HashCode);
v_length = size;
v_type = type;
v_now = (unsigned long long) now.abs_value;
@@ -221,15 +221,15 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->update_value, NULL,
MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
MYSQL_TYPE_LONGLONG, &v_discard_time, GNUNET_YES,
- MYSQL_TYPE_BLOB, key, sizeof (GNUNET_HashCode),
+ MYSQL_TYPE_BLOB, key, sizeof (struct GNUNET_HashCode),
&k_length, MYSQL_TYPE_BLOB, &vhash,
- sizeof (GNUNET_HashCode), &h_length,
+ sizeof (struct GNUNET_HashCode), &h_length,
MYSQL_TYPE_LONG, &v_type, GNUNET_YES, -1))
return GNUNET_OK;
/* now try INSERT */
- h_length = sizeof (GNUNET_HashCode);
- k_length = sizeof (GNUNET_HashCode);
+ h_length = sizeof (struct GNUNET_HashCode);
+ k_length = sizeof (struct GNUNET_HashCode);
v_length = size;
if (GNUNET_OK !=
(ret =
@@ -237,9 +237,9 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
MYSQL_TYPE_LONG, &type, GNUNET_YES,
MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
MYSQL_TYPE_LONGLONG, &v_discard_time, GNUNET_YES,
- MYSQL_TYPE_BLOB, key, sizeof (GNUNET_HashCode),
+ MYSQL_TYPE_BLOB, key, sizeof (struct GNUNET_HashCode),
&k_length, MYSQL_TYPE_BLOB, &vhash,
- sizeof (GNUNET_HashCode), &h_length,
+ sizeof (struct GNUNET_HashCode), &h_length,
MYSQL_TYPE_BLOB, data, (unsigned long) size,
&v_length, -1)))
{
@@ -270,7 +270,7 @@ return_ok (void *cls, unsigned int num_values, MYSQL_BIND * values)
* @return the number of results found
*/
static unsigned int
-mysql_plugin_get (void *cls, const GNUNET_HashCode * key,
+mysql_plugin_get (void *cls, const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter,
void *iter_cls)
{
@@ -290,7 +290,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key,
char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE];
now = GNUNET_TIME_absolute_get ();
- h_length = sizeof (GNUNET_HashCode);
+ h_length = sizeof (struct GNUNET_HashCode);
v_length = sizeof (buffer);
total = -1;
memset (rbind, 0, sizeof (rbind));
@@ -303,7 +303,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key,
(ret =
GNUNET_MYSQL_statement_run_prepared_select (plugin->mc, plugin->count_value, 1, rbind,
return_ok, NULL, MYSQL_TYPE_BLOB, key,
- sizeof (GNUNET_HashCode), &h_length,
+ sizeof (struct GNUNET_HashCode), &h_length,
MYSQL_TYPE_LONG, &v_type, GNUNET_YES,
MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
-1))) || (-1 == total))
@@ -332,7 +332,7 @@ mysql_plugin_get (void *cls, const GNUNET_HashCode * key,
(ret =
GNUNET_MYSQL_statement_run_prepared_select (plugin->mc, plugin->select_value, 2, rbind,
return_ok, NULL, MYSQL_TYPE_BLOB, key,
- sizeof (GNUNET_HashCode), &h_length,
+ sizeof (struct GNUNET_HashCode), &h_length,
MYSQL_TYPE_LONG, &v_type, GNUNET_YES,
MYSQL_TYPE_LONGLONG, &v_now, GNUNET_YES,
MYSQL_TYPE_LONG, &off, GNUNET_YES, -1)))
@@ -364,24 +364,24 @@ mysql_plugin_del (void *cls)
MYSQL_BIND rbind[5];
unsigned int v_type;
- GNUNET_HashCode v_key;
- GNUNET_HashCode vhash;
+ struct GNUNET_HashCode v_key;
+ struct GNUNET_HashCode vhash;
unsigned long k_length;
unsigned long h_length;
unsigned long v_length;
int ret;
char buffer[GNUNET_SERVER_MAX_MESSAGE_SIZE];
- k_length = sizeof (GNUNET_HashCode);
- h_length = sizeof (GNUNET_HashCode);
+ k_length = sizeof (struct GNUNET_HashCode);
+ h_length = sizeof (struct GNUNET_HashCode);
v_length = sizeof (buffer);
memset (rbind, 0, sizeof (rbind));
rbind[0].buffer_type = MYSQL_TYPE_BLOB;
- rbind[0].buffer_length = sizeof (GNUNET_HashCode);
+ rbind[0].buffer_length = sizeof (struct GNUNET_HashCode);
rbind[0].length = &k_length;
rbind[0].buffer = &v_key;
rbind[1].buffer_type = MYSQL_TYPE_BLOB;
- rbind[1].buffer_length = sizeof (GNUNET_HashCode);
+ rbind[1].buffer_length = sizeof (struct GNUNET_HashCode);
rbind[1].length = &h_length;
rbind[1].buffer = &vhash;
rbind[2].buffer_type = MYSQL_TYPE_LONG;
@@ -399,9 +399,9 @@ mysql_plugin_del (void *cls)
(ret =
GNUNET_MYSQL_statement_run_prepared (plugin->mc, plugin->delete_value, NULL,
MYSQL_TYPE_BLOB, &v_key,
- sizeof (GNUNET_HashCode), &k_length,
+ sizeof (struct GNUNET_HashCode), &k_length,
MYSQL_TYPE_BLOB, &vhash,
- sizeof (GNUNET_HashCode), &h_length,
+ sizeof (struct GNUNET_HashCode), &h_length,
MYSQL_TYPE_LONG, &v_type, GNUNET_YES,
MYSQL_TYPE_BLOB, buffer,
(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 @@
/**
* Per-entry overhead estimate
*/
-#define OVERHEAD (sizeof(GNUNET_HashCode) + 24)
+#define OVERHEAD (sizeof(struct GNUNET_HashCode) + 24)
/**
* Context for all functions in this plugin.
@@ -160,7 +160,7 @@ init_connection (struct Plugin *plugin)
* @return 0 on error, number of bytes used otherwise
*/
static size_t
-postgres_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
+postgres_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time)
{
@@ -178,7 +178,7 @@ postgres_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
int paramLengths[] = {
sizeof (btype),
sizeof (bexpi),
- sizeof (GNUNET_HashCode),
+ sizeof (struct GNUNET_HashCode),
size
};
const int paramFormats[] = { 1, 1, 1, 1 };
@@ -206,7 +206,7 @@ postgres_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
* @return the number of results found
*/
static unsigned int
-postgres_plugin_get (void *cls, const GNUNET_HashCode * key,
+postgres_plugin_get (void *cls, const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type,
GNUNET_DATACACHE_Iterator iter, void *iter_cls)
{
@@ -218,7 +218,7 @@ postgres_plugin_get (void *cls, const GNUNET_HashCode * key,
(const char *) &btype,
};
int paramLengths[] = {
- sizeof (GNUNET_HashCode),
+ sizeof (struct GNUNET_HashCode),
sizeof (btype),
};
const int paramFormats[] = { 1, 1 };
@@ -298,7 +298,7 @@ postgres_plugin_del (void *cls)
struct Plugin *plugin = cls;
uint32_t size;
uint32_t oid;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
PGresult *res;
res = PQexecPrepared (plugin->dbh, "getm", 0, NULL, NULL, NULL, 1);
@@ -319,7 +319,7 @@ postgres_plugin_del (void *cls)
}
if ((3 != PQnfields (res)) || (sizeof (size) != PQfsize (res, 0)) ||
(sizeof (oid) != PQfsize (res, 1)) ||
- (sizeof (GNUNET_HashCode) != PQgetlength (res, 0, 2)))
+ (sizeof (struct GNUNET_HashCode) != PQgetlength (res, 0, 2)))
{
GNUNET_break (0);
PQclear (res);
@@ -327,7 +327,7 @@ postgres_plugin_del (void *cls)
}
size = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0));
oid = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1));
- memcpy (&key, PQgetvalue (res, 0, 2), sizeof (GNUNET_HashCode));
+ memcpy (&key, PQgetvalue (res, 0, 2), sizeof (struct GNUNET_HashCode));
PQclear (res);
if (GNUNET_OK != GNUNET_POSTGRES_delete_by_rowid (plugin->dbh, "delrow", oid))
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 @@
* How much overhead do we assume per entry in the
* datacache?
*/
-#define OVERHEAD (sizeof(GNUNET_HashCode) + 32)
+#define OVERHEAD (sizeof(struct GNUNET_HashCode) + 32)
/**
* Context for all functions in this plugin.
@@ -98,7 +98,7 @@ sq_prepare (sqlite3 * dbh, const char *zSql, /* SQL statement, UTF-8 encoded
* @return 0 on error, number of bytes used otherwise
*/
static size_t
-sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
+sqlite_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time)
{
@@ -126,7 +126,7 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
if ((SQLITE_OK != sqlite3_bind_int (stmt, 1, type)) ||
(SQLITE_OK != sqlite3_bind_int64 (stmt, 2, dval)) ||
(SQLITE_OK !=
- sqlite3_bind_blob (stmt, 3, key, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, 3, key, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT)) ||
(SQLITE_OK != sqlite3_bind_blob (stmt, 4, data, size, SQLITE_TRANSIENT)))
{
@@ -161,7 +161,7 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
* @return the number of results found
*/
static unsigned int
-sqlite_plugin_get (void *cls, const GNUNET_HashCode * key,
+sqlite_plugin_get (void *cls, const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter,
void *iter_cls)
{
@@ -192,7 +192,7 @@ sqlite_plugin_get (void *cls, const GNUNET_HashCode * key,
ntime = (int64_t) now.abs_value;
GNUNET_assert (ntime >= 0);
if ((SQLITE_OK !=
- sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, 1, key, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT)) ||
(SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
(SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value)))
@@ -239,7 +239,7 @@ sqlite_plugin_get (void *cls, const GNUNET_HashCode * key,
return cnt;
}
if ((SQLITE_OK !=
- sqlite3_bind_blob (stmt, 1, key, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, 1, key, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT)) ||
(SQLITE_OK != sqlite3_bind_int (stmt, 2, type)) ||
(SQLITE_OK != sqlite3_bind_int64 (stmt, 3, now.abs_value)))
@@ -287,7 +287,7 @@ sqlite_plugin_del (void *cls)
unsigned int dsize;
sqlite3_stmt *stmt;
sqlite3_stmt *dstmt;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
LOG (GNUNET_ERROR_TYPE_DEBUG, "Processing `%s'\n", "DEL");
stmt = NULL;
@@ -311,8 +311,8 @@ sqlite_plugin_del (void *cls)
return GNUNET_SYSERR;
}
rowid = sqlite3_column_int64 (stmt, 0);
- GNUNET_assert (sqlite3_column_bytes (stmt, 1) == sizeof (GNUNET_HashCode));
- memcpy (&hc, sqlite3_column_blob (stmt, 1), sizeof (GNUNET_HashCode));
+ GNUNET_assert (sqlite3_column_bytes (stmt, 1) == sizeof (struct GNUNET_HashCode));
+ memcpy (&hc, sqlite3_column_blob (stmt, 1), sizeof (struct GNUNET_HashCode));
dsize = sqlite3_column_bytes (stmt, 2);
if (SQLITE_OK != sqlite3_finalize (stmt))
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
* @return 0 on error, number of bytes used otherwise
*/
static size_t
-template_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
+template_plugin_put (void *cls, const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time)
{
@@ -73,7 +73,7 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, size_t size,
* @return the number of results found
*/
static unsigned int
-template_plugin_get (void *cls, const GNUNET_HashCode * key,
+template_plugin_get (void *cls, const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type,
GNUNET_DATACACHE_Iterator iter, void *iter_cls)
{
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;
static int
checkIt (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key, size_t size, const char *data,
+ const struct GNUNET_HashCode * key, size_t size, const char *data,
enum GNUNET_BLOCK_Type type)
{
- if (size != sizeof (GNUNET_HashCode))
+ if (size != sizeof (struct GNUNET_HashCode))
{
GNUNET_break (0);
ok = 2;
@@ -61,8 +61,8 @@ run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct GNUNET_DATACACHE_Handle *h;
- GNUNET_HashCode k;
- GNUNET_HashCode n;
+ struct GNUNET_HashCode k;
+ struct GNUNET_HashCode n;
struct GNUNET_TIME_Absolute exp;
unsigned int i;
@@ -77,27 +77,27 @@ run (void *cls, char *const *args, const char *cfgfile,
}
exp = GNUNET_TIME_absolute_get ();
exp.abs_value += 5 * 60 * 1000;
- memset (&k, 0, sizeof (GNUNET_HashCode));
+ memset (&k, 0, sizeof (struct GNUNET_HashCode));
for (i = 0; i < 100; i++)
{
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
ASSERT (GNUNET_OK ==
- GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode),
+ GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
(const char *) &n, 1 + i % 16, exp));
k = n;
}
- memset (&k, 0, sizeof (GNUNET_HashCode));
+ memset (&k, 0, sizeof (struct GNUNET_HashCode));
for (i = 0; i < 100; i++)
{
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
ASSERT (1 == GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n));
k = n;
}
- memset (&k, 42, sizeof (GNUNET_HashCode));
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
+ memset (&k, 42, sizeof (struct GNUNET_HashCode));
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
ASSERT (GNUNET_OK ==
- GNUNET_DATACACHE_put (h, &k, sizeof (GNUNET_HashCode),
+ GNUNET_DATACACHE_put (h, &k, sizeof (struct GNUNET_HashCode),
(const char *) &n, 792,
GNUNET_TIME_UNIT_FOREVER_ABS));
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,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct GNUNET_DATACACHE_Handle *h;
- GNUNET_HashCode k;
- GNUNET_HashCode n;
+ struct GNUNET_HashCode k;
+ struct GNUNET_HashCode n;
unsigned int i;
unsigned int j;
char buf[3200];
@@ -64,11 +64,11 @@ run (void *cls, char *const *args, const char *cfgfile,
}
exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
memset (buf, 1, sizeof (buf));
- memset (&k, 0, sizeof (GNUNET_HashCode));
+ memset (&k, 0, sizeof (struct GNUNET_HashCode));
for (i = 0; i < 10; i++)
{
FPRINTF (stderr, "%s", ".");
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
for (j = i; j < sizeof (buf); j += 10)
{
exp.abs_value++;
@@ -79,11 +79,11 @@ run (void *cls, char *const *args, const char *cfgfile,
k = n;
}
FPRINTF (stderr, "%s", "\n");
- memset (&k, 0, sizeof (GNUNET_HashCode));
+ memset (&k, 0, sizeof (struct GNUNET_HashCode));
for (i = 0; i < 10; i++)
{
FPRINTF (stderr, "%s", ".");
- GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n);
+ GNUNET_CRYPTO_hash (&k, sizeof (struct GNUNET_HashCode), &n);
if (i < 2)
ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL));
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
/**
* Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size
* can either be "sizeof(struct GetMessage)" or
- * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"!
+ * "sizeof(struct GetMessage) - sizeof(struct GNUNET_HashCode)"!
*/
struct GNUNET_MessageHeader header;
@@ -129,7 +129,7 @@ struct GetMessage
* Desired key (optional). Check the "size" of the
* header to see if the key is actually present.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
};
@@ -252,7 +252,7 @@ struct DataMessage
/**
* Key under which the item can be found.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
};
GNUNET_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)
*/
struct GNUNET_DATASTORE_QueueEntry *
GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
- const GNUNET_HashCode * key, size_t size,
+ const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
uint32_t replication,
@@ -1087,7 +1087,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
*/
struct GNUNET_DATASTORE_QueueEntry *
GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
- const GNUNET_HashCode * key, size_t size,
+ const struct GNUNET_HashCode * key, size_t size,
const void *data, unsigned int queue_priority,
unsigned int max_queue_size,
struct GNUNET_TIME_Relative timeout,
@@ -1381,7 +1381,7 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
*/
struct GNUNET_DATASTORE_QueueEntry *
GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type,
unsigned int queue_priority,
unsigned int max_queue_size,
@@ -1420,7 +1420,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
else
{
gm->header.size =
- htons (sizeof (struct GetMessage) - sizeof (GNUNET_HashCode));
+ htons (sizeof (struct GetMessage) - sizeof (struct GNUNET_HashCode));
}
process_queue (h);
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);
* GNUNET_NO to delete the item and continue (if supported)
*/
static int
-expired_processor (void *cls, const GNUNET_HashCode * key, uint32_t size,
+expired_processor (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -394,7 +394,7 @@ delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* GNUNET_NO to delete the item and continue (if supported)
*/
static int
-quota_processor (void *cls, const GNUNET_HashCode * key, uint32_t size,
+quota_processor (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -581,7 +581,7 @@ transmit_status (struct GNUNET_SERVER_Client *client, int code, const char *msg)
* GNUNET_NO to delete the item and continue (if supported)
*/
static int
-transmit_item (void *cls, const GNUNET_HashCode * key, uint32_t size,
+transmit_item (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -871,7 +871,7 @@ execute_put (struct GNUNET_SERVER_Client *client, const struct DataMessage *dm)
* GNUNET_NO to delete the item
*/
static int
-check_present (void *cls, const GNUNET_HashCode * key, uint32_t size,
+check_present (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -930,7 +930,7 @@ handle_put (void *cls, struct GNUNET_SERVER_Client *client,
int rid;
struct ReservationList *pos;
struct PutContext *pc;
- GNUNET_HashCode vhash;
+ struct GNUNET_HashCode vhash;
uint32_t size;
if ((dm == NULL) || (ntohl (dm->type) == 0))
@@ -993,7 +993,7 @@ handle_get (void *cls, struct GNUNET_SERVER_Client *client,
size = ntohs (message->size);
if ((size != sizeof (struct GetMessage)) &&
- (size != sizeof (struct GetMessage) - sizeof (GNUNET_HashCode)))
+ (size != sizeof (struct GetMessage) - sizeof (struct GNUNET_HashCode)))
{
GNUNET_break (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
@@ -1120,7 +1120,7 @@ handle_get_zero_anonymity (void *cls, struct GNUNET_SERVER_Client *client,
* in to be deleted (by returning GNUNET_NO).
*/
static int
-remove_callback (void *cls, const GNUNET_HashCode * key, uint32_t size,
+remove_callback (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -1160,7 +1160,7 @@ handle_remove (void *cls, struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
const struct DataMessage *dm = check_data (message);
- GNUNET_HashCode vhash;
+ struct GNUNET_HashCode vhash;
if (dm == NULL)
{
@@ -1428,7 +1428,7 @@ cleanup_reservations (void *cls, struct GNUNET_SERVER_Client *client)
*/
static void
add_key_to_bloomfilter (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
unsigned int count)
{
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,
static void
-delete_value (void *cls, const GNUNET_HashCode * key, size_t size,
+delete_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -196,7 +196,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct CpsRunContext *crc = cls;
size_t size;
- static GNUNET_HashCode key;
+ static struct GNUNET_HashCode key;
static char data[65536];
int i;
int k;
@@ -206,7 +206,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
switch (crc->phase)
{
case RP_PUT:
- memset (&key, 256 - crc->i, sizeof (GNUNET_HashCode));
+ memset (&key, 256 - crc->i, sizeof (struct GNUNET_HashCode));
i = crc->j;
k = crc->i;
/* most content is 32k */
@@ -214,7 +214,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
if (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) == 0) /* but some of it is less! */
size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024);
crc->size = size = size - (size & 7); /* always multiple of 8 */
- GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key);
+ GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key);
memset (data, i, size);
if (i > 255)
memset (data, i - 255, size / 2);
@@ -298,7 +298,7 @@ run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct CpsRunContext *crc;
- static GNUNET_HashCode zkey;
+ static struct GNUNET_HashCode zkey;
datastore = GNUNET_DATASTORE_connect (cfg);
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)
{
char value[65536];
size_t size;
- static GNUNET_HashCode key;
+ static struct GNUNET_HashCode key;
static int ic;
char *msg;
unsigned int prio;
@@ -116,7 +116,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
/* generate random key */
key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value;
- GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key);
+ GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key);
memset (value, i, size);
if (i > 255)
memset (value, i - 255, size / 2);
@@ -149,7 +149,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static int
-iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size,
+iterate_zeros (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -196,7 +196,7 @@ iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size,
static int
-expiration_get (void *cls, const GNUNET_HashCode * key, uint32_t size,
+expiration_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -241,7 +241,7 @@ expiration_get (void *cls, const GNUNET_HashCode * key, uint32_t size,
static int
-replication_get (void *cls, const GNUNET_HashCode * key, uint32_t size,
+replication_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
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)
* @return GNUNET_OK on success
*/
static int
-mysql_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
+mysql_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity, uint32_t replication,
struct GNUNET_TIME_Absolute expiration, char **msg)
@@ -297,15 +297,15 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
unsigned long hashSize;
unsigned long hashSize2;
unsigned long lsize;
- GNUNET_HashCode vhash;
+ struct GNUNET_HashCode vhash;
if (size > MAX_DATUM_SIZE)
{
GNUNET_break (0);
return GNUNET_SYSERR;
}
- hashSize = sizeof (GNUNET_HashCode);
- hashSize2 = sizeof (GNUNET_HashCode);
+ hashSize = sizeof (struct GNUNET_HashCode);
+ hashSize2 = sizeof (struct GNUNET_HashCode);
lsize = size;
GNUNET_CRYPTO_hash (data, size, &vhash);
if (GNUNET_OK !=
@@ -403,11 +403,11 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
unsigned long size;
unsigned long long uid;
char value[GNUNET_DATASTORE_MAX_VALUE_SIZE];
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct GNUNET_TIME_Absolute expiration;
MYSQL_BIND rbind[7];
- hashSize = sizeof (GNUNET_HashCode);
+ hashSize = sizeof (struct GNUNET_HashCode);
memset (rbind, 0, sizeof (rbind));
rbind[0].buffer_type = MYSQL_TYPE_LONG;
rbind[0].buffer = &type;
@@ -442,8 +442,8 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
return;
}
GNUNET_assert (size <= sizeof (value));
- if ((rbind[4].buffer_length != sizeof (GNUNET_HashCode)) ||
- (hashSize != sizeof (GNUNET_HashCode)))
+ if ((rbind[4].buffer_length != sizeof (struct GNUNET_HashCode)) ||
+ (hashSize != sizeof (struct GNUNET_HashCode)))
{
GNUNET_break (0);
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
* @param proc_cls closure for proc
*/
static void
-mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
- const GNUNET_HashCode * vhash,
+mysql_plugin_get_key (void *cls, uint64_t offset, const struct GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * vhash,
enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
void *proc_cls)
{
@@ -501,8 +501,8 @@ mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
GNUNET_assert (key != NULL);
GNUNET_assert (NULL != proc);
- hashSize = sizeof (GNUNET_HashCode);
- hashSize2 = sizeof (GNUNET_HashCode);
+ hashSize = sizeof (struct GNUNET_HashCode);
+ hashSize2 = sizeof (struct GNUNET_HashCode);
memset (cbind, 0, sizeof (cbind));
total = -1;
cbind[0].buffer_type = MYSQL_TYPE_LONGLONG;
@@ -669,7 +669,7 @@ struct ReplCtx
* GNUNET_NO to delete the item and continue (if supported)
*/
static int
-repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size,
+repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -763,7 +763,7 @@ mysql_plugin_get_keys (void *cls,
const char *query = "SELECT hash FROM gn090";
int ret;
MYSQL_STMT *statement;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
MYSQL_BIND cbind[1];
unsigned long length;
@@ -808,7 +808,7 @@ mysql_plugin_get_keys (void *cls,
}
while (0 == (ret = mysql_stmt_fetch (statement)))
{
- if (sizeof (GNUNET_HashCode) == length)
+ if (sizeof (struct GNUNET_HashCode) == length)
proc (proc_cls, &key, 1);
}
if (ret != MYSQL_NO_DATA)
@@ -869,7 +869,7 @@ struct ExpiCtx
* GNUNET_NO to delete the item and continue (if supported)
*/
static int
-expi_proc (void *cls, const GNUNET_HashCode * key, uint32_t size,
+expi_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
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)
* @return GNUNET_OK on success
*/
static int
-postgres_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
+postgres_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
uint32_t replication,
struct GNUNET_TIME_Absolute expiration, char **msg)
{
struct Plugin *plugin = cls;
- GNUNET_HashCode vhash;
+ struct GNUNET_HashCode vhash;
PGresult *ret;
uint32_t btype = htonl (type);
uint32_t bprio = htonl (priority);
@@ -301,8 +301,8 @@ postgres_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
sizeof (bprio),
sizeof (banon),
sizeof (bexpi),
- sizeof (GNUNET_HashCode),
- sizeof (GNUNET_HashCode),
+ sizeof (struct GNUNET_HashCode),
+ sizeof (struct GNUNET_HashCode),
size
};
const int paramFormats[] = { 1, 1, 1, 1, 1, 1, 1, 1 };
@@ -345,7 +345,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
uint32_t size;
unsigned int rowid;
struct GNUNET_TIME_Absolute expiration_time;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
if (GNUNET_OK !=
GNUNET_POSTGRES_check_result_ (plugin->dbh, res, PGRES_TUPLES_OK, "PQexecPrepared", "select",
@@ -380,7 +380,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
(sizeof (uint32_t) != PQfsize (res, 1)) ||
(sizeof (uint32_t) != PQfsize (res, 2)) ||
(sizeof (uint64_t) != PQfsize (res, 3)) ||
- (sizeof (GNUNET_HashCode) != PQgetlength (res, 0, 4)))
+ (sizeof (struct GNUNET_HashCode) != PQgetlength (res, 0, 4)))
{
GNUNET_break (0);
PQclear (res);
@@ -394,7 +394,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
anonymity = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2));
expiration_time.abs_value =
GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3));
- memcpy (&key, PQgetvalue (res, 0, 4), sizeof (GNUNET_HashCode));
+ memcpy (&key, PQgetvalue (res, 0, 4), sizeof (struct GNUNET_HashCode));
size = PQgetlength (res, 0, 5);
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "datastore-postgres",
"Found result of size %u bytes and type %u in database\n",
@@ -443,8 +443,8 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
*/
static void
postgres_plugin_get_key (void *cls, uint64_t offset,
- const GNUNET_HashCode * key,
- const GNUNET_HashCode * vhash,
+ const struct GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * vhash,
enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
void *proc_cls)
{
@@ -461,14 +461,14 @@ postgres_plugin_get_key (void *cls, uint64_t offset,
GNUNET_assert (key != NULL);
paramValues[0] = (const char *) key;
- paramLengths[0] = sizeof (GNUNET_HashCode);
+ paramLengths[0] = sizeof (struct GNUNET_HashCode);
btype = htonl (type);
if (type != 0)
{
if (vhash != NULL)
{
paramValues[1] = (const char *) vhash;
- paramLengths[1] = sizeof (GNUNET_HashCode);
+ paramLengths[1] = sizeof (struct GNUNET_HashCode);
paramValues[2] = (const char *) &btype;
paramLengths[2] = sizeof (btype);
paramValues[3] = (const char *) &blimit_off;
@@ -499,7 +499,7 @@ postgres_plugin_get_key (void *cls, uint64_t offset,
if (vhash != NULL)
{
paramValues[1] = (const char *) vhash;
- paramLengths[1] = sizeof (GNUNET_HashCode);
+ paramLengths[1] = sizeof (struct GNUNET_HashCode);
paramValues[2] = (const char *) &blimit_off;
paramLengths[2] = sizeof (blimit_off);
nparams = 3;
@@ -628,7 +628,7 @@ struct ReplCtx
* GNUNET_NO to delete the item and continue (if supported)
*/
static int
-repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size,
+repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -792,16 +792,16 @@ postgres_plugin_get_keys (void *cls,
struct Plugin *plugin = cls;
int ret;
int i;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
PGresult * res;
res = PQexecPrepared (plugin->dbh, "get_keys", 0, NULL, NULL, NULL, 1);
ret = PQntuples (res);
for (i=0;i<ret;i++)
{
- if (sizeof (GNUNET_HashCode) != PQgetlength (res, i, 0))
+ if (sizeof (struct GNUNET_HashCode) != PQgetlength (res, i, 0))
{
- memcpy (&key, PQgetvalue (res, i, 0), sizeof (GNUNET_HashCode));
+ memcpy (&key, PQgetvalue (res, i, 0), sizeof (struct GNUNET_HashCode));
proc (proc_cls, &key, 1);
}
}
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)
* @return GNUNET_OK on success
*/
static int
-sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
+sqlite_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity, uint32_t replication,
struct GNUNET_TIME_Absolute expiration, char **msg)
@@ -489,7 +489,7 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
int n;
int ret;
sqlite3_stmt *stmt;
- GNUNET_HashCode vhash;
+ struct GNUNET_HashCode vhash;
uint64_t rvalue;
if (size > MAX_ITEM_SIZE)
@@ -510,10 +510,10 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
(SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value)) ||
(SQLITE_OK != sqlite3_bind_int64 (stmt, 6, rvalue)) ||
(SQLITE_OK !=
- sqlite3_bind_blob (stmt, 7, key, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, 7, key, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT)) ||
(SQLITE_OK !=
- sqlite3_bind_blob (stmt, 8, &vhash, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, 8, &vhash, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT)) ||
(SQLITE_OK != sqlite3_bind_blob (stmt, 9, data, size, SQLITE_TRANSIENT)))
{
@@ -648,7 +648,7 @@ execute_get (struct Plugin *plugin, sqlite3_stmt * stmt,
case SQLITE_ROW:
size = sqlite3_column_bytes (stmt, 5);
rowid = sqlite3_column_int64 (stmt, 6);
- if (sqlite3_column_bytes (stmt, 4) != sizeof (GNUNET_HashCode))
+ if (sqlite3_column_bytes (stmt, 4) != sizeof (struct GNUNET_HashCode))
{
GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "sqlite",
_
@@ -768,8 +768,8 @@ sqlite_plugin_get_zero_anonymity (void *cls, uint64_t offset,
* @param proc_cls closure for proc
*/
static void
-sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
- const GNUNET_HashCode * vhash,
+sqlite_plugin_get_key (void *cls, uint64_t offset, const struct GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * vhash,
enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
void *proc_cls)
{
@@ -796,11 +796,11 @@ sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
}
sqoff = 1;
ret =
- sqlite3_bind_blob (stmt, sqoff++, key, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, sqoff++, key, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT);
if ((vhash != NULL) && (ret == SQLITE_OK))
ret =
- sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT);
if ((type != 0) && (ret == SQLITE_OK))
ret = sqlite3_bind_int (stmt, sqoff++, type);
@@ -845,11 +845,11 @@ sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
}
sqoff = 1;
ret =
- sqlite3_bind_blob (stmt, sqoff++, key, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, sqoff++, key, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT);
if ((vhash != NULL) && (ret == SQLITE_OK))
ret =
- sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (GNUNET_HashCode),
+ sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (struct GNUNET_HashCode),
SQLITE_TRANSIENT);
if ((type != 0) && (ret == SQLITE_OK))
ret = sqlite3_bind_int (stmt, sqoff++, type);
@@ -916,7 +916,7 @@ struct ReplCtx
* GNUNET_NO to delete the item
*/
static int
-repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size,
+repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -1076,7 +1076,7 @@ sqlite_plugin_get_keys (void *cls,
void *proc_cls)
{
struct Plugin *plugin = cls;
- const GNUNET_HashCode *key;
+ const struct GNUNET_HashCode *key;
sqlite3_stmt *stmt;
int ret;
@@ -1090,7 +1090,7 @@ sqlite_plugin_get_keys (void *cls,
while (SQLITE_ROW == (ret = sqlite3_step (stmt)))
{
key = sqlite3_column_blob (stmt, 1);
- if (sizeof (GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1))
+ if (sizeof (struct GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1))
proc (proc_cls, key, 1);
}
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)
* @return GNUNET_OK on success
*/
static int
-template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
+template_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
uint32_t replication,
@@ -103,8 +103,8 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
*/
static void
template_plugin_get_key (void *cls, uint64_t offset,
- const GNUNET_HashCode * key,
- const GNUNET_HashCode * vhash,
+ const struct GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * vhash,
enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
void *proc_cls)
{
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
struct CpsRunContext
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
int i;
int rid;
const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -171,7 +171,7 @@ get_reserved (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration
static void
-check_value (void *cls, const GNUNET_HashCode * key, size_t size,
+check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -217,7 +217,7 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
static void
-delete_value (void *cls, const GNUNET_HashCode * key, size_t size,
+delete_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -237,7 +237,7 @@ delete_value (void *cls, const GNUNET_HashCode * key, size_t size,
static void
-check_nothing (void *cls, const GNUNET_HashCode * key, size_t size,
+check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -253,7 +253,7 @@ check_nothing (void *cls, const GNUNET_HashCode * key, size_t size,
static void
-check_multiple (void *cls, const GNUNET_HashCode * key, size_t size,
+check_multiple (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -285,7 +285,7 @@ check_multiple (void *cls, const GNUNET_HashCode * key, size_t size,
static void
-check_update (void *cls, const GNUNET_HashCode * key, size_t size,
+check_update (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -467,7 +467,7 @@ run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct CpsRunContext *crc;
- static GNUNET_HashCode zkey;
+ static struct GNUNET_HashCode zkey;
crc = GNUNET_malloc (sizeof (struct CpsRunContext));
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
struct CpsRunContext
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
int i;
int found;
const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -138,7 +138,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiratio
static void
-check_value (void *cls, const GNUNET_HashCode * key, size_t size,
+check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -170,7 +170,7 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
static void
-check_nothing (void *cls, const GNUNET_HashCode * key, size_t size,
+check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
uint64_t uid)
@@ -262,7 +262,7 @@ run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct CpsRunContext *crc;
- static GNUNET_HashCode zkey;
+ static struct GNUNET_HashCode zkey;
crc = GNUNET_malloc (sizeof (struct CpsRunContext));
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)
static void
-gen_key (int i, GNUNET_HashCode * key)
+gen_key (int i, struct GNUNET_HashCode * key)
{
- memset (key, 0, sizeof (GNUNET_HashCode));
+ memset (key, 0, sizeof (struct GNUNET_HashCode));
key->bits[0] = (unsigned int) i;
- GNUNET_CRYPTO_hash (key, sizeof (GNUNET_HashCode), key);
+ GNUNET_CRYPTO_hash (key, sizeof (struct GNUNET_HashCode), key);
}
@@ -97,7 +97,7 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
{
char value[65536];
size_t size;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
char *msg;
unsigned int prio;
@@ -147,7 +147,7 @@ static uint64_t guid;
static int
-iterate_one_shot (void *cls, const GNUNET_HashCode * key, uint32_t size,
+iterate_one_shot (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -218,7 +218,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
int j;
unsigned long long os;
unsigned long long cs;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
{
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
/**
* Key of this request
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
};
@@ -95,7 +95,7 @@ struct GNUNET_DHT_ClientGetMessage
/**
* The key to search for
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Unique ID identifying this request, if 0 then
@@ -148,7 +148,7 @@ struct GNUNET_DHT_ClientResultMessage
/**
* The key that was searched for
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* put path, get path and actual data are copied to end of this dealy do */
@@ -193,7 +193,7 @@ struct GNUNET_DHT_ClientPutMessage
/**
* The key to store the value under.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* DATA copied to end of this message */
@@ -268,7 +268,7 @@ struct GNUNET_DHT_MonitorPutMessage
/**
* The key to store the value under.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* put path (if tracked) */
@@ -315,7 +315,7 @@ struct GNUNET_DHT_MonitorStartStopMessage
/**
* The key to filter messages by.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
};
@@ -358,7 +358,7 @@ struct GNUNET_DHT_MonitorGetMessage
/**
* The key to store the value under.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* get path (if tracked) */
@@ -397,7 +397,7 @@ struct GNUNET_DHT_MonitorGetRespMessage
/**
* The key of the corresponding GET request.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* put path (if tracked) */
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
/**
* Key that this get request is for
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Unique identifier for this request (for key collisions).
@@ -213,7 +213,7 @@ struct GNUNET_DHT_MonitorHandle
/**
* Key being looked for, NULL == all.
*/
- GNUNET_HashCode *key;
+ struct GNUNET_HashCode *key;
/**
* Callback for each received message of type get.
@@ -362,7 +362,7 @@ try_connect (struct GNUNET_DHT_Handle *handle)
* @return GNUNET_YES (always)
*/
static int
-add_request_to_pending (void *cls, const GNUNET_HashCode * key, void *value)
+add_request_to_pending (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_DHT_Handle *handle = cls;
struct GNUNET_DHT_GetHandle *rh = value;
@@ -577,7 +577,7 @@ transmit_pending (void *cls, size_t size, void *buf)
* GNUNET_NO if the reply is malformed
*/
static int
-process_reply (void *cls, const GNUNET_HashCode * key, void *value)
+process_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const struct GNUNET_DHT_ClientResultMessage *dht_msg = cls;
struct GNUNET_DHT_GetHandle *get_handle = value;
@@ -648,7 +648,7 @@ process_monitor_get_message (struct GNUNET_DHT_Handle *handle,
type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type));
key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key,
- sizeof (GNUNET_HashCode)));
+ sizeof (struct GNUNET_HashCode)));
if (type_ok && key_ok && (NULL != h->get_cb))
h->get_cb (h->cb_cls,
ntohl (msg->options),
@@ -699,7 +699,7 @@ process_monitor_get_resp_message (struct GNUNET_DHT_Handle *handle,
type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type));
key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key,
- sizeof (GNUNET_HashCode)));
+ sizeof (struct GNUNET_HashCode)));
if (type_ok && key_ok && (NULL != h->get_resp_cb))
h->get_resp_cb (h->cb_cls,
(enum GNUNET_BLOCK_Type) ntohl(msg->type),
@@ -749,7 +749,7 @@ process_monitor_put_message (struct GNUNET_DHT_Handle *handle,
type_ok = (GNUNET_BLOCK_TYPE_ANY == h->type) || (h->type == ntohl(msg->type));
key_ok = (NULL == h->key) || (0 == memcmp (h->key, &msg->key,
- sizeof (GNUNET_HashCode)));
+ sizeof (struct GNUNET_HashCode)));
if (type_ok && key_ok && (NULL != h->put_cb))
h->put_cb (h->cb_cls,
ntohl (msg->options),
@@ -1040,7 +1040,7 @@ mark_put_message_gone (void *cls,
* @param cont_cls closure for cont
*/
struct GNUNET_DHT_PutHandle *
-GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const GNUNET_HashCode * key,
+GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const struct GNUNET_HashCode * key,
uint32_t desired_replication_level,
enum GNUNET_DHT_RouteOption options,
enum GNUNET_BLOCK_Type type, size_t size, const char *data,
@@ -1148,7 +1148,7 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph)
*/
struct GNUNET_DHT_GetHandle *
GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
- enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
+ enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode * key,
uint32_t desired_replication_level,
enum GNUNET_DHT_RouteOption options, const void *xquery,
size_t xquery_size, GNUNET_DHT_GetIterator iter,
@@ -1266,7 +1266,7 @@ GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle)
struct GNUNET_DHT_MonitorHandle *
GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
GNUNET_DHT_MonitorGetCB get_cb,
GNUNET_DHT_MonitorGetRespCB get_resp_cb,
GNUNET_DHT_MonitorPutCB put_cb,
@@ -1287,8 +1287,8 @@ GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
h->dht_handle = handle;
if (NULL != key)
{
- h->key = GNUNET_malloc (sizeof(GNUNET_HashCode));
- memcpy (h->key, key, sizeof(GNUNET_HashCode));
+ h->key = GNUNET_malloc (sizeof(struct GNUNET_HashCode));
+ memcpy (h->key, key, sizeof(struct GNUNET_HashCode));
}
pending = GNUNET_malloc (sizeof (struct GNUNET_DHT_MonitorStartStopMessage) +
@@ -1305,7 +1305,7 @@ GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
m->put = htons(NULL != put_cb);
if (NULL != key) {
m->filter_key = htons(1);
- memcpy (&m->key, key, sizeof(GNUNET_HashCode));
+ memcpy (&m->key, key, sizeof(struct GNUNET_HashCode));
}
GNUNET_CONTAINER_DLL_insert (handle->pending_head, handle->pending_tail,
pending);
@@ -1347,7 +1347,7 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *handle)
m->put = htons(NULL != handle->put_cb);
if (NULL != handle->key) {
m->filter_key = htons(1);
- memcpy (&m->key, handle->key, sizeof(GNUNET_HashCode));
+ memcpy (&m->key, handle->key, sizeof(struct GNUNET_HashCode));
}
GNUNET_CONTAINER_DLL_insert (handle->dht_handle->pending_head,
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)
*/
static void
get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -148,7 +148,7 @@ run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
struct GNUNET_TIME_Relative timeout;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
cfg = c;
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,
uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
- const GNUNET_HashCode * key)
+ const struct GNUNET_HashCode * key)
{
FPRINTF (stdout, "Result %d, operation: %s, type %d\n Key: %s",
result_count,
@@ -163,7 +163,7 @@ get_resp_callback (void *cls,
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_length,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size)
{
@@ -201,7 +201,7 @@ put_callback (void *cls,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size)
{
@@ -228,7 +228,7 @@ run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
struct GNUNET_TIME_Relative timeout;
- GNUNET_HashCode *key;
+ struct GNUNET_HashCode *key;
cfg = c;
@@ -248,7 +248,7 @@ run (void *cls, char *const *args, const char *cfgfile,
block_type = GNUNET_BLOCK_TYPE_TEST;
if (query_key != NULL) {
- key = GNUNET_malloc (sizeof(GNUNET_HashCode));
+ key = GNUNET_malloc (sizeof(struct GNUNET_HashCode));
GNUNET_CRYPTO_hash (query_key, strlen (query_key), key);
}
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,
{
struct GNUNET_TIME_Relative timeout;
struct GNUNET_TIME_Absolute expiration;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
cfg = c;
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
/**
* The key this request was about
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Client responsible for the request.
@@ -126,7 +126,7 @@ struct ClientQueryRecord
/**
* Replies we have already seen for this request.
*/
- GNUNET_HashCode *seen_replies;
+ struct GNUNET_HashCode *seen_replies;
/**
* Pointer to this nodes heap location in the retry-heap (for fast removal)
@@ -201,7 +201,7 @@ struct ClientMonitorRecord
/**
* Key of data of interest, NULL for all.
*/
- GNUNET_HashCode *key;
+ struct GNUNET_HashCode *key;
/**
* Flag whether to notify about GET messages.
@@ -322,7 +322,7 @@ find_active_client (struct GNUNET_SERVER_Client *client)
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-remove_client_records (void *cls, const GNUNET_HashCode * key, void *value)
+remove_client_records (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ClientList *client = cls;
struct ClientQueryRecord *record = value;
@@ -646,7 +646,7 @@ struct RemoveByUniqueIdContext
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-remove_by_unique_id (void *cls, const GNUNET_HashCode * key, void *value)
+remove_by_unique_id (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const struct RemoveByUniqueIdContext *ctx = cls;
struct ClientQueryRecord *record = value;
@@ -718,8 +718,8 @@ handle_dht_local_monitor (void *cls, struct GNUNET_SERVER_Client *client,
r->key = NULL;
else
{
- r->key = GNUNET_malloc (sizeof (GNUNET_HashCode));
- memcpy (r->key, &msg->key, sizeof (GNUNET_HashCode));
+ r->key = GNUNET_malloc (sizeof (struct GNUNET_HashCode));
+ memcpy (r->key, &msg->key, sizeof (struct GNUNET_HashCode));
}
GNUNET_CONTAINER_DLL_insert (monitor_head, monitor_tail, r);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
@@ -751,7 +751,7 @@ handle_dht_local_monitor_stop (void *cls, struct GNUNET_SERVER_Client *client,
else
{
keys_match = (0 != ntohs(msg->filter_key)
- && !memcmp(r->key, &msg->key, sizeof(GNUNET_HashCode)));
+ && !memcmp(r->key, &msg->key, sizeof(struct GNUNET_HashCode)));
}
if (find_active_client(client) == r->client
&& ntohl(msg->type) == r->type
@@ -898,7 +898,7 @@ struct ForwardReplyContext
* if the result is mal-formed, GNUNET_NO
*/
static int
-forward_reply (void *cls, const GNUNET_HashCode * key, void *value)
+forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ForwardReplyContext *frc = cls;
struct ClientQueryRecord *record = value;
@@ -906,7 +906,7 @@ forward_reply (void *cls, const GNUNET_HashCode * key, void *value)
struct GNUNET_DHT_ClientResultMessage *reply;
enum GNUNET_BLOCK_EvaluationResult eval;
int do_free;
- GNUNET_HashCode ch;
+ struct GNUNET_HashCode ch;
unsigned int i;
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)
}
GNUNET_CRYPTO_hash (frc->data, frc->data_size, &ch);
for (i = 0; i < record->seen_replies_count; i++)
- if (0 == memcmp (&record->seen_replies[i], &ch, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&record->seen_replies[i], &ch, sizeof (struct GNUNET_HashCode)))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"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)
*/
void
GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *get_path,
unsigned int put_path_length,
@@ -1104,7 +1104,7 @@ GDS_CLIENTS_process_get (uint32_t options,
uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
- const GNUNET_HashCode * key)
+ const struct GNUNET_HashCode * key)
{
struct ClientMonitorRecord *m;
struct ClientList **cl;
@@ -1116,7 +1116,7 @@ GDS_CLIENTS_process_get (uint32_t options,
{
if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
(NULL == m->key ||
- memcmp (key, m->key, sizeof(GNUNET_HashCode)) == 0))
+ memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
{
struct PendingMessage *pm;
struct GNUNET_DHT_MonitorGetMessage *mmsg;
@@ -1145,7 +1145,7 @@ GDS_CLIENTS_process_get (uint32_t options,
mmsg->hop_count = htonl(hop_count);
mmsg->desired_replication_level = htonl(desired_replication_level);
mmsg->get_path_length = htonl(path_length);
- memcpy (&mmsg->key, key, sizeof (GNUNET_HashCode));
+ memcpy (&mmsg->key, key, sizeof (struct GNUNET_HashCode));
msg_path = (struct GNUNET_PeerIdentity *) &mmsg[1];
if (path_length > 0)
memcpy (msg_path, path,
@@ -1178,7 +1178,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_length,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size)
{
@@ -1192,7 +1192,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
{
if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
(NULL == m->key ||
- memcmp (key, m->key, sizeof(GNUNET_HashCode)) == 0))
+ memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
{
struct PendingMessage *pm;
struct GNUNET_DHT_MonitorGetRespMessage *mmsg;
@@ -1232,7 +1232,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
memcpy (path, get_path,
get_path_length * sizeof (struct GNUNET_PeerIdentity));
mmsg->expiration_time = GNUNET_TIME_absolute_hton(exp);
- memcpy (&mmsg->key, key, sizeof (GNUNET_HashCode));
+ memcpy (&mmsg->key, key, sizeof (struct GNUNET_HashCode));
if (size > 0)
memcpy (&path[get_path_length], data, size);
add_pending_message (m->client, pm);
@@ -1265,7 +1265,7 @@ GDS_CLIENTS_process_put (uint32_t options,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size)
{
@@ -1279,7 +1279,7 @@ GDS_CLIENTS_process_put (uint32_t options,
{
if ((GNUNET_BLOCK_TYPE_ANY == m->type || m->type == type) &&
(NULL == m->key ||
- memcmp (key, m->key, sizeof(GNUNET_HashCode)) == 0))
+ memcmp (key, m->key, sizeof(struct GNUNET_HashCode)) == 0))
{
struct PendingMessage *pm;
struct GNUNET_DHT_MonitorPutMessage *mmsg;
@@ -1316,7 +1316,7 @@ GDS_CLIENTS_process_put (uint32_t options,
path_length * sizeof (struct GNUNET_PeerIdentity));
}
mmsg->expiration_time = GNUNET_TIME_absolute_hton(exp);
- memcpy (&mmsg->key, key, sizeof (GNUNET_HashCode));
+ memcpy (&mmsg->key, key, sizeof (struct GNUNET_HashCode));
if (size > 0)
memcpy (&msg_path[path_length], data, size);
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 @@
*/
void
GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *get_path,
unsigned int put_path_length,
@@ -75,7 +75,7 @@ GDS_CLIENTS_process_get (uint32_t options,
uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
- const GNUNET_HashCode * key);
+ const struct GNUNET_HashCode * key);
/**
* 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,
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_length,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size);
@@ -125,7 +125,7 @@ GDS_CLIENTS_process_put (uint32_t options,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size);
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
*/
void
GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int put_path_length,
const struct GNUNET_PeerIdentity *put_path,
enum GNUNET_BLOCK_Type type, size_t data_size,
@@ -131,7 +131,7 @@ struct GetRequestContext
/**
* The key this request was about
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Number of bytes in xquery.
@@ -165,7 +165,7 @@ struct GetRequestContext
*/
static int
datacache_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key, size_t size,
+ const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type)
{
struct GetRequestContext *ctx = cls;
@@ -255,7 +255,7 @@ datacache_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
* @return evaluation result for the local replies
*/
enum GNUNET_BLOCK_EvaluationResult
-GDS_DATACACHE_handle_get (const GNUNET_HashCode * key,
+GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type, const void *xquery,
size_t xquery_size,
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 @@
*/
void
GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int put_path_length,
const struct GNUNET_PeerIdentity *put_path,
enum GNUNET_BLOCK_Type type, size_t data_size,
@@ -63,7 +63,7 @@ GDS_DATACACHE_handle_put (struct GNUNET_TIME_Absolute expiration,
* @return evaluation result for the local replies
*/
enum GNUNET_BLOCK_EvaluationResult
-GDS_DATACACHE_handle_get (const GNUNET_HashCode * key,
+GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type, const void *xquery,
size_t xquery_size,
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 ()
* Free memory occopied by the HELLO.
*/
static int
-free_hello (void *cls, const GNUNET_HashCode * key, void *hello)
+free_hello (void *cls, const struct GNUNET_HashCode * key, void *hello)
{
GNUNET_free (hello);
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 @@
/**
* How many buckets will we allow total.
*/
-#define MAX_BUCKETS sizeof (GNUNET_HashCode) * 8
+#define MAX_BUCKETS sizeof (struct GNUNET_HashCode) * 8
/**
* What is the maximum number of peers in a given bucket.
@@ -140,7 +140,7 @@ struct PeerPutMessage
/**
* The key we are storing under.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* put path (if tracked) */
@@ -182,7 +182,7 @@ struct PeerResultMessage
/**
* The key of the corresponding GET request.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* put path (if tracked) */
@@ -241,7 +241,7 @@ struct PeerGetMessage
/**
* The key we are looking for.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/* xquery */
@@ -424,7 +424,7 @@ static struct GNUNET_ATS_PerformanceHandle *atsAPI;
* on error (same hashcode)
*/
static int
-find_bucket (const GNUNET_HashCode * hc)
+find_bucket (const struct GNUNET_HashCode * hc)
{
unsigned int bits;
@@ -518,10 +518,10 @@ struct BloomConstructorContext
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-add_known_to_bloom (void *cls, const GNUNET_HashCode * key, void *value)
+add_known_to_bloom (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct BloomConstructorContext *ctx = cls;
- GNUNET_HashCode mh;
+ struct GNUNET_HashCode mh;
GNUNET_BLOCK_mingle_hash (key, ctx->bf_mutator, &mh);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -874,7 +874,7 @@ get_forward_count (uint32_t hop_count, uint32_t target_replication)
* the two hash codes increases
*/
static unsigned int
-get_distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have)
+get_distance (const struct GNUNET_HashCode * target, const struct GNUNET_HashCode * have)
{
unsigned int bucket;
unsigned int msb;
@@ -911,7 +911,7 @@ get_distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have)
* mismatching bit at 'bucket' */
lsb = 0;
for (i = bucket + 1;
- (i < sizeof (GNUNET_HashCode) * 8) && (i < bucket + 1 + 32 - 9); i++)
+ (i < sizeof (struct GNUNET_HashCode) * 8) && (i < bucket + 1 + 32 - 9); i++)
{
if (GNUNET_CRYPTO_hash_get_bit (target, i) !=
GNUNET_CRYPTO_hash_get_bit (have, i))
@@ -934,7 +934,7 @@ get_distance (const GNUNET_HashCode * target, const GNUNET_HashCode * have)
* GNUNET_NO otherwise.
*/
static int
-am_closest_peer (const GNUNET_HashCode * key,
+am_closest_peer (const struct GNUNET_HashCode * key,
const struct GNUNET_CONTAINER_BloomFilter *bloom)
{
int bits;
@@ -943,7 +943,7 @@ am_closest_peer (const GNUNET_HashCode * key,
int count;
struct PeerInfo *pos;
- if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (struct GNUNET_HashCode)))
return GNUNET_YES;
bucket_num = find_bucket (key);
GNUNET_assert (bucket_num >= 0);
@@ -989,7 +989,7 @@ am_closest_peer (const GNUNET_HashCode * key,
* @return Peer to route to, or NULL on error
*/
static struct PeerInfo *
-select_peer (const GNUNET_HashCode * key,
+select_peer (const struct GNUNET_HashCode * key,
const struct GNUNET_CONTAINER_BloomFilter *bloom, uint32_t hops)
{
unsigned int bc;
@@ -1115,7 +1115,7 @@ select_peer (const GNUNET_HashCode * key,
* @return number of peers returned in 'targets'.
*/
static unsigned int
-get_target_peers (const GNUNET_HashCode * key,
+get_target_peers (const struct GNUNET_HashCode * key,
struct GNUNET_CONTAINER_BloomFilter *bloom,
uint32_t hop_count, uint32_t target_replication,
struct PeerInfo ***targets)
@@ -1185,7 +1185,7 @@ GDS_NEIGHBOURS_handle_put (enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute expiration_time,
uint32_t hop_count,
struct GNUNET_CONTAINER_BloomFilter *bf,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int put_path_length,
struct GNUNET_PeerIdentity *put_path,
const void *data, size_t data_size)
@@ -1295,7 +1295,7 @@ void
GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
enum GNUNET_DHT_RouteOption options,
uint32_t desired_replication_level,
- uint32_t hop_count, const GNUNET_HashCode * key,
+ uint32_t hop_count, const struct GNUNET_HashCode * key,
const void *xquery, size_t xquery_size,
const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
uint32_t reply_bf_mutator,
@@ -1405,7 +1405,7 @@ void
GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target,
enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute expiration_time,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int put_path_length,
const struct GNUNET_PeerIdentity *put_path,
unsigned int get_path_length,
@@ -1508,7 +1508,7 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
size_t payload_size;
enum GNUNET_DHT_RouteOption options;
struct GNUNET_CONTAINER_BloomFilter *bf;
- GNUNET_HashCode test_key;
+ struct GNUNET_HashCode test_key;
msize = ntohs (message->size);
if (msize < sizeof (struct PeerPutMessage))
@@ -1541,7 +1541,7 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
&test_key))
{
case GNUNET_YES:
- if (0 != memcmp (&test_key, &put->key, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (&test_key, &put->key, sizeof (struct GNUNET_HashCode)))
{
GNUNET_break_op (0);
return GNUNET_YES;
@@ -1615,14 +1615,14 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
*/
static void
handle_find_peer (const struct GNUNET_PeerIdentity *sender,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
struct GNUNET_CONTAINER_BloomFilter *bf, uint32_t bf_mutator)
{
int bucket_idx;
struct PeerBucket *bucket;
struct PeerInfo *peer;
unsigned int choice;
- GNUNET_HashCode mhash;
+ struct GNUNET_HashCode mhash;
const struct GNUNET_HELLO_Message *hello;
/* first, check about our own HELLO */
@@ -1657,7 +1657,7 @@ handle_find_peer (const struct GNUNET_PeerIdentity *sender,
}
/* then, also consider sending a random HELLO from the closest bucket */
- if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&my_identity.hashPubKey, key, sizeof (struct GNUNET_HashCode)))
bucket_idx = closest_bucket;
else
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,
struct GNUNET_TIME_Absolute expiration_time,
uint32_t hop_count,
struct GNUNET_CONTAINER_BloomFilter *bf,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int put_path_length,
struct GNUNET_PeerIdentity *put_path,
const void *data, size_t data_size);
@@ -84,7 +84,7 @@ void
GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
enum GNUNET_DHT_RouteOption options,
uint32_t desired_replication_level,
- uint32_t hop_count, const GNUNET_HashCode * key,
+ uint32_t hop_count, const struct GNUNET_HashCode * key,
const void *xquery, size_t xquery_size,
const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
uint32_t reply_bf_mutator,
@@ -111,7 +111,7 @@ void
GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target,
enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute expiration_time,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
unsigned int put_path_length,
const struct GNUNET_PeerIdentity *put_path,
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
/**
* Key of this request.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Position of this node in the min heap.
@@ -160,15 +160,15 @@ struct ProcessContext
* GNUNET_SYSERR if the result is malformed or type unsupported
*/
static int
-process (void *cls, const GNUNET_HashCode * key, void *value)
+process (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ProcessContext *pc = cls;
struct RecentRequest *rr = value;
enum GNUNET_BLOCK_EvaluationResult eval;
unsigned int gpl;
unsigned int ppl;
- GNUNET_HashCode hc;
- const GNUNET_HashCode *eval_key;
+ struct GNUNET_HashCode hc;
+ const struct GNUNET_HashCode *eval_key;
if ((rr->type != GNUNET_BLOCK_TYPE_ANY) && (rr->type != pc->type))
return GNUNET_OK; /* type missmatch */
@@ -266,7 +266,7 @@ process (void *cls, const GNUNET_HashCode * key, void *value)
void
GDS_ROUTING_process (enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute expiration_time,
- const GNUNET_HashCode * key, unsigned int put_path_length,
+ const struct GNUNET_HashCode * key, unsigned int put_path_length,
const struct GNUNET_PeerIdentity *put_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *get_path,
@@ -339,7 +339,7 @@ void
GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender,
enum GNUNET_BLOCK_Type type,
enum GNUNET_DHT_RouteOption options,
- const GNUNET_HashCode * key, const void *xquery,
+ const struct GNUNET_HashCode * key, const void *xquery,
size_t xquery_size,
const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
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 @@
void
GDS_ROUTING_process (enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute expiration_time,
- const GNUNET_HashCode * key, unsigned int put_path_length,
+ const struct GNUNET_HashCode * key, unsigned int put_path_length,
const struct GNUNET_PeerIdentity *put_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *get_path,
@@ -74,7 +74,7 @@ void
GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender,
enum GNUNET_BLOCK_Type type,
enum GNUNET_DHT_RouteOption options,
- const GNUNET_HashCode * key, const void *xquery,
+ const struct GNUNET_HashCode * key, const void *xquery,
size_t xquery_size,
const struct GNUNET_CONTAINER_BloomFilter *reply_bf,
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 @@
*/
static enum GNUNET_BLOCK_EvaluationResult
block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
size_t reply_block_size)
{
- GNUNET_HashCode mhash;
+ struct GNUNET_HashCode mhash;
const struct GNUNET_HELLO_Message *hello;
struct GNUNET_PeerIdentity pid;
const struct GNUNET_MessageHeader *msg;
@@ -122,7 +122,7 @@ block_plugin_dht_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
static int
block_plugin_dht_get_key (void *cls, enum GNUNET_BLOCK_Type type,
const void *block, size_t block_size,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
const struct GNUNET_MessageHeader *msg;
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)
static void
test_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -201,9 +201,9 @@ static void
test_get (void *cls, int success)
{
struct PeerContext *peer = cls;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
- memset (&hash, 42, sizeof (GNUNET_HashCode));
+ memset (&hash, 42, sizeof (struct GNUNET_HashCode));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Called test_get!\n");
@@ -238,11 +238,11 @@ static void
test_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct PeerContext *peer = cls;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
char *data;
size_t data_size = 42;
- memset (&hash, 42, sizeof (GNUNET_HashCode));
+ memset (&hash, 42, sizeof (struct GNUNET_HashCode));
data = GNUNET_malloc (data_size);
memset (data, 43, data_size);
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)
static void
dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -195,9 +195,9 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"test: ************* FOUND!!! ***********\n");
- if (sizeof (GNUNET_HashCode) == size)
+ if (sizeof (struct GNUNET_HashCode) == size)
{
- const GNUNET_HashCode *h = data;
+ const struct GNUNET_HashCode *h = data;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Contents: %s\n",
GNUNET_h2s_full (h));
@@ -314,7 +314,7 @@ monitor_get_cb (void *cls,
uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
- const GNUNET_HashCode * key)
+ const struct GNUNET_HashCode * key)
{
const char *s_key;
unsigned int i;
@@ -355,7 +355,7 @@ monitor_put_cb (void *cls,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size)
{
@@ -397,7 +397,7 @@ monitor_res_cb (void *cls,
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_length,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size)
{
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
get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct TestGetContext *test_get = cls;
- GNUNET_HashCode search_key; /* Key stored under */
+ struct GNUNET_HashCode search_key; /* Key stored under */
char original_data[TEST_DATA_SIZE]; /* Made up data to store */
test_get->task = GNUNET_SCHEDULER_NO_TASK;
@@ -548,7 +548,7 @@ get_stop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
*/
static void
get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -556,7 +556,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
size_t size, const void *data)
{
struct TestGetContext *test_get = cls;
- GNUNET_HashCode search_key; /* Key stored under */
+ struct GNUNET_HashCode search_key; /* Key stored under */
char original_data[TEST_DATA_SIZE]; /* Made up data to store */
memset (original_data, test_get->uid, sizeof (original_data));
@@ -586,7 +586,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
}
#endif
- if ((0 != memcmp (&search_key, key, sizeof (GNUNET_HashCode))) ||
+ if ((0 != memcmp (&search_key, key, sizeof (struct GNUNET_HashCode))) ||
(0 != memcmp (original_data, data, sizeof (original_data))))
{
FPRINTF (stderr, "%s", "Key or data is not the same as was inserted!\n");
@@ -606,7 +606,7 @@ static void
do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct TestGetContext *test_get = cls;
- GNUNET_HashCode key; /* Made up key to store data under */
+ struct GNUNET_HashCode key; /* Made up key to store data under */
char data[TEST_DATA_SIZE]; /* Made up data to store */
if (outstanding_gets > MAX_OUTSTANDING_GETS)
@@ -700,7 +700,7 @@ static void
do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct TestPutContext *test_put = cls;
- GNUNET_HashCode key; /* Made up key to store data under */
+ struct GNUNET_HashCode key; /* Made up key to store data under */
char data[TEST_DATA_SIZE]; /* Made up data to store */
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)
static void
dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -199,9 +199,9 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
{
int i;
- if (sizeof (GNUNET_HashCode) == size)
+ if (sizeof (struct GNUNET_HashCode) == size)
{
- const GNUNET_HashCode *h = data;
+ const struct GNUNET_HashCode *h = data;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " Contents: %s\n",
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);
*/
static void
get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -179,7 +179,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
struct PeerGetContext *get_context = cls;
if (0 !=
- memcmp (&get_context->peer->hashPubKey, key, sizeof (GNUNET_HashCode)))
+ memcmp (&get_context->peer->hashPubKey, key, sizeof (struct GNUNET_HashCode)))
{
FPRINTF (stderr, "%s", "??\n");
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)
*/
void
get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_size,
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_size, enum GNUNET_BLOCK_Type type,
size_t size, const void *result_data)
{
- GNUNET_HashCode original_key; /* Key data was stored data under */
+ struct GNUNET_HashCode original_key; /* Key data was stored data under */
char original_data[4]; /* Made up data that was stored */
- memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */
+ memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */
memset (original_data, 43, sizeof (original_data));
#if DNS
if ((sizeof (original_data) != size) ||
- (0 != memcmp (&data.service_descriptor, key, sizeof (GNUNET_HashCode))) ||
+ (0 != memcmp (&data.service_descriptor, key, sizeof (struct GNUNET_HashCode))) ||
(0 != memcmp ((char *) &data, result_data, sizeof (original_data))))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -241,7 +241,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
}
#else
if ((sizeof (original_data) != size) ||
- (0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) ||
+ (0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) ||
(0 != memcmp (original_data, result_data, sizeof (original_data))))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -264,12 +264,12 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
static void
do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_HashCode key; /* Key for data lookup */
+ struct GNUNET_HashCode key; /* Key for data lookup */
#if DNS
- memcpy (&key, &data.service_descriptor, sizeof (GNUNET_HashCode));
+ memcpy (&key, &data.service_descriptor, sizeof (struct GNUNET_HashCode));
#else
- memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
+ memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
#endif
global_get_handle =
GNUNET_DHT_get_start (peer2dht,
@@ -305,10 +305,10 @@ put_finished (void *cls, int success)
static void
do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_HashCode key; /* Made up key to store data under */
+ struct GNUNET_HashCode key; /* Made up key to store data under */
char data[4]; /* Made up data to store */
- memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
+ memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
memset (data, 43, sizeof (data));
/* 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)
*/
static void
get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
size_t size, const void *data)
{
- GNUNET_HashCode original_key; /* Key data was stored data under */
+ struct GNUNET_HashCode original_key; /* Key data was stored data under */
char original_data[4]; /* Made up data that was stored */
- memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */
+ memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */
memset (original_data, 43, sizeof (original_data));
#if VERBOSE
unsigned int i;
#endif
- if ((0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) ||
+ if ((0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) ||
(0 != memcmp (original_data, data, sizeof (original_data))))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -251,13 +251,13 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
static void
put_finished (void *cls, int success)
{
- GNUNET_HashCode key; /* Key for data lookup */
+ struct GNUNET_HashCode key; /* Key for data lookup */
GNUNET_SCHEDULER_cancel (die_task);
die_task =
GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly,
"waiting for get response (data not found)");
- memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
+ memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
global_get_handle =
GNUNET_DHT_get_start (peer2dht,
GNUNET_BLOCK_TYPE_TEST, &key, 1,
@@ -271,10 +271,10 @@ put_finished (void *cls, int success)
static void
do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_HashCode key; /* Made up key to store data under */
+ struct GNUNET_HashCode key; /* Made up key to store data under */
char data[4]; /* Made up data to store */
- memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
+ memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
memset (data, 43, sizeof (data));
/* 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)
*/
static void
get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_size,
const struct GNUNET_PeerIdentity *put_path,
unsigned int put_path_size, enum GNUNET_BLOCK_Type type,
size_t size, const void *result_data)
{
- GNUNET_HashCode original_key; /* Key data was stored data under */
+ struct GNUNET_HashCode original_key; /* Key data was stored data under */
char original_data[4]; /* Made up data that was stored */
- memset (&original_key, 42, sizeof (GNUNET_HashCode)); /* Set the key to what it was set to previously */
+ memset (&original_key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to what it was set to previously */
memset (original_data, 43, sizeof (original_data));
if ((sizeof (original_data) != size) ||
- (0 != memcmp (&original_key, key, sizeof (GNUNET_HashCode))) ||
+ (0 != memcmp (&original_key, key, sizeof (struct GNUNET_HashCode))) ||
(0 != memcmp (original_data, result_data, sizeof (original_data))))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -256,7 +256,7 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
static void
put_finished (void *cls, int success)
{
- GNUNET_HashCode key; /* Key for data lookup */
+ struct GNUNET_HashCode key; /* Key for data lookup */
put_op = NULL;
GNUNET_SCHEDULER_cancel (die_task);
@@ -264,7 +264,7 @@ put_finished (void *cls, int success)
GNUNET_SCHEDULER_add_delayed (GET_TIMEOUT, &end_badly,
"waiting for get response (data not found)");
- memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
+ memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to the same thing as when data was inserted */
global_get_handle =
GNUNET_DHT_get_start (peer2dht,
GNUNET_BLOCK_TYPE_TEST, &key, 1, GNUNET_DHT_RO_NONE,
@@ -278,10 +278,10 @@ put_finished (void *cls, int success)
static void
do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_HashCode key; /* Made up key to store data under */
+ struct GNUNET_HashCode key; /* Made up key to store data under */
char data[4]; /* Made up data to store */
- memset (&key, 42, sizeof (GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
+ memset (&key, 42, sizeof (struct GNUNET_HashCode)); /* Set the key to something simple so we can issue GET request */
memset (data, 43, sizeof (data));
/* 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 @@
*/
static enum GNUNET_BLOCK_EvaluationResult
block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
@@ -124,13 +124,13 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
static int
block_plugin_dns_get_key (void *cls, enum GNUNET_BLOCK_Type type,
const void *block, size_t block_size,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
if (type != GNUNET_BLOCK_TYPE_DNS)
return GNUNET_SYSERR;
const struct GNUNET_DNS_Record *rec = block;
- memcpy (key, &rec->service_descriptor, sizeof (GNUNET_HashCode));
+ memcpy (key, &rec->service_descriptor, sizeof (struct GNUNET_HashCode));
return GNUNET_OK;
}
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
* @param hash set to uid (extended with zeros)
*/
static void
-hash_from_uid (uint32_t uid, GNUNET_HashCode * hash)
+hash_from_uid (uint32_t uid, struct GNUNET_HashCode * hash)
{
- memset (hash, 0, sizeof (GNUNET_HashCode));
+ memset (hash, 0, sizeof (struct GNUNET_HashCode));
*((uint32_t *) hash) = uid;
}
@@ -351,7 +351,7 @@ handle_message_receipt (void *cls, const struct GNUNET_MessageHeader *msg)
char *sender_address;
char *packed_msg;
char *packed_msg_start;
- GNUNET_HashCode uidhash;
+ struct GNUNET_HashCode uidhash;
struct SendCallbackContext *send_ctx;
if (msg == NULL)
@@ -459,7 +459,7 @@ GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
struct GNUNET_DV_SendMessage *msg;
struct SendCallbackContext *send_ctx;
char *end_of_message;
- GNUNET_HashCode uidhash;
+ struct GNUNET_HashCode uidhash;
int msize;
#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,
* respective neighbor.
*/
static int
-find_specific_id (void *cls, const GNUNET_HashCode * key, void *value)
+find_specific_id (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct FindIDContext *fdc = cls;
struct DistantNeighbor *dn = value;
@@ -704,7 +704,7 @@ find_specific_id (void *cls, const GNUNET_HashCode * key, void *value)
* route.
*/
static int
-find_distant_peer (void *cls, const GNUNET_HashCode * key, void *value)
+find_distant_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct FindDestinationContext *fdc = cls;
struct DistantNeighbor *distant = value;
@@ -1085,7 +1085,7 @@ send_message_via (const struct GNUNET_PeerIdentity *sender,
* @return GNUNET_YES to continue iteration, GNUNET_NO to stop
*/
static int
-find_least_cost_peer (void *cls, const GNUNET_HashCode * key, void *value)
+find_least_cost_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct FindLeastCostContext *find_context = cls;
struct DistantNeighbor *dn = value;
@@ -1264,7 +1264,7 @@ struct CheckPeerContext
* GNUNET_NO if not.
*/
int
-checkPeerID (void *cls, const GNUNET_HashCode * key, void *value)
+checkPeerID (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct CheckPeerContext *ctx = cls;
struct DistantNeighbor *distant = value;
@@ -1661,7 +1661,7 @@ handle_dv_data_message (void *cls, const struct GNUNET_PeerIdentity *peer,
* GNUNET_NO if not.
*/
int
-print_neighbors (void *cls, const GNUNET_HashCode * key, void *abs_value)
+print_neighbors (void *cls, const struct GNUNET_HashCode * key, void *abs_value)
{
struct DistantNeighbor *distant_neighbor = abs_value;
char my_shortname[5];
@@ -1849,7 +1849,7 @@ handle_start (void *cls, struct GNUNET_SERVER_Client *client,
* GNUNET_NO if not.
*/
int
-send_iterator (void *cls, const GNUNET_HashCode * key, void *abs_value)
+send_iterator (void *cls, const struct GNUNET_HashCode * key, void *abs_value)
{
struct DV_SendContext *send_context = cls;
struct DistantNeighbor *distant_neighbor = abs_value;
@@ -2174,7 +2174,7 @@ direct_neighbor_free (struct DirectNeighbor *direct)
* @return GNUNET_YES to continue iteration, GNUNET_NO to stop
*/
static int
-schedule_disconnect_messages (void *cls, const GNUNET_HashCode * key,
+schedule_disconnect_messages (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct DisconnectContext *disconnect_context = cls;
@@ -2222,7 +2222,7 @@ schedule_disconnect_messages (void *cls, const GNUNET_HashCode * key,
* @return GNUNET_YES to continue iteration, GNUNET_NO to stop
*/
static int
-free_extended_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
+free_extended_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct DistantNeighbor *distant = value;
@@ -2240,7 +2240,7 @@ free_extended_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_YES to continue iteration, GNUNET_NO to stop
*/
static int
-free_direct_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
+free_direct_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct DirectNeighbor *direct = value;
@@ -2320,7 +2320,7 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server,
* GNUNET_NO if not.
*/
static int
-add_pkey_to_extended (void *cls, const GNUNET_HashCode * key, void *abs_value)
+add_pkey_to_extended (void *cls, const struct GNUNET_HashCode * key, void *abs_value)
{
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey = cls;
struct DistantNeighbor *distant_neighbor = abs_value;
@@ -2348,7 +2348,7 @@ add_pkey_to_extended (void *cls, const GNUNET_HashCode * key, void *abs_value)
* GNUNET_NO if not.
*/
static int
-update_matching_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
+update_matching_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct NeighborUpdateInfo *update_info = cls;
struct DistantNeighbor *distant_neighbor = value;
@@ -2384,7 +2384,7 @@ update_matching_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_YES to continue iteration, GNUNET_NO otherwise
*/
static int
-add_distant_all_direct_neighbors (void *cls, const GNUNET_HashCode * key,
+add_distant_all_direct_neighbors (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct DirectNeighbor *direct = (struct DirectNeighbor *) value;
@@ -2837,7 +2837,7 @@ handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer,
* @return GNUNET_YES to continue iteration, GNUNET_NO otherwise
*/
static int
-add_all_extended_peers (void *cls, const GNUNET_HashCode * key, void *value)
+add_all_extended_peers (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct NeighborSendContext *send_context = (struct NeighborSendContext *) cls;
struct DistantNeighbor *distant = (struct DistantNeighbor *) value;
@@ -2875,7 +2875,7 @@ add_all_extended_peers (void *cls, const GNUNET_HashCode * key, void *value)
* GNUNET_NO if not.
*/
static int
-gossip_all_to_all_iterator (void *cls, const GNUNET_HashCode * key,
+gossip_all_to_all_iterator (void *cls, const struct GNUNET_HashCode * key,
void *abs_value)
{
struct DirectNeighbor *direct = abs_value;
@@ -2922,7 +2922,7 @@ gossip_all_to_all (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @return GNUNET_YES to continue iteration, GNUNET_NO otherwise
*/
static int
-add_all_direct_neighbors (void *cls, const GNUNET_HashCode * key, void *value)
+add_all_direct_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct DirectNeighbor *direct = (struct DirectNeighbor *) value;
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
/**
* Identification for the desired service.
*/
- GNUNET_HashCode service_descriptor;
+ struct GNUNET_HashCode service_descriptor;
/**
* Skeleton of the TCP header to send. Port numbers are to
@@ -142,7 +142,7 @@ struct GNUNET_EXIT_UdpServiceMessage
/**
* Identification for the desired service.
*/
- GNUNET_HashCode service_descriptor;
+ struct GNUNET_HashCode service_descriptor;
/* followed by UDP payload */
};
@@ -230,7 +230,7 @@ struct GNUNET_EXIT_IcmpServiceMessage
/**
* Identification for the desired service.
*/
- GNUNET_HashCode service_descriptor;
+ struct GNUNET_HashCode service_descriptor;
/**
* 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
/**
* Key this state has in the connections_map.
*/
- GNUNET_HashCode state_key;
+ struct GNUNET_HashCode state_key;
/**
* Associated service record, or NULL for no service.
@@ -325,12 +325,12 @@ static int ipv6_enabled;
* @param ri information about the connection
*/
static void
-hash_redirect_info (GNUNET_HashCode *hash,
+hash_redirect_info (struct GNUNET_HashCode *hash,
const struct RedirectInformation *ri)
{
char *off;
- memset (hash, 0, sizeof (GNUNET_HashCode));
+ memset (hash, 0, sizeof (struct GNUNET_HashCode));
/* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash,
so we put the IP address in there (and hope for few collisions) */
off = (char*) hash;
@@ -389,10 +389,10 @@ get_redirect_state (int af,
uint16_t destination_port,
const void *local_ip,
uint16_t local_port,
- GNUNET_HashCode *state_key)
+ struct GNUNET_HashCode *state_key)
{
struct RedirectInformation ri;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct TunnelState *state;
if ( ( (af == AF_INET) && (protocol == IPPROTO_ICMP) ) ||
@@ -442,15 +442,15 @@ get_redirect_state (int af,
*/
static struct LocalService *
find_service (struct GNUNET_CONTAINER_MultiHashMap *service_map,
- const GNUNET_HashCode *desc,
+ const struct GNUNET_HashCode *desc,
uint16_t destination_port)
{
- char key[sizeof (GNUNET_HashCode) + sizeof (uint16_t)];
+ char key[sizeof (struct GNUNET_HashCode) + sizeof (uint16_t)];
memcpy (&key[0], &destination_port, sizeof (uint16_t));
- memcpy (&key[sizeof(uint16_t)], desc, sizeof (GNUNET_HashCode));
+ memcpy (&key[sizeof(uint16_t)], desc, sizeof (struct GNUNET_HashCode));
return GNUNET_CONTAINER_multihashmap_get (service_map,
- (GNUNET_HashCode *) key);
+ (struct GNUNET_HashCode *) key);
}
@@ -464,7 +464,7 @@ find_service (struct GNUNET_CONTAINER_MultiHashMap *service_map,
*/
static int
free_service_record (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct LocalService *service = value;
@@ -490,20 +490,20 @@ store_service (struct GNUNET_CONTAINER_MultiHashMap *service_map,
uint16_t destination_port,
struct LocalService *service)
{
- char key[sizeof (GNUNET_HashCode) + sizeof (uint16_t)];
- GNUNET_HashCode desc;
+ char key[sizeof (struct GNUNET_HashCode) + sizeof (uint16_t)];
+ struct GNUNET_HashCode desc;
GNUNET_CRYPTO_hash (name, strlen (name) + 1, &desc);
service->name = GNUNET_strdup (name);
memcpy (&key[0], &destination_port, sizeof (uint16_t));
- memcpy (&key[sizeof(uint16_t)], &desc, sizeof (GNUNET_HashCode));
+ memcpy (&key[sizeof(uint16_t)], &desc, sizeof (struct GNUNET_HashCode));
if (GNUNET_OK !=
GNUNET_CONTAINER_multihashmap_put (service_map,
- (GNUNET_HashCode *) key,
+ (struct GNUNET_HashCode *) key,
service,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY))
{
- free_service_record (NULL, (GNUNET_HashCode *) key, service);
+ free_service_record (NULL, (struct GNUNET_HashCode *) key, service);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Got duplicate service records for `%s:%u'\n"),
name,
@@ -1218,7 +1218,7 @@ setup_fresh_address (int af,
static void
setup_state_record (struct TunnelState *state)
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct TunnelState *s;
/* generate fresh, unique address */
@@ -2733,7 +2733,7 @@ clean_tunnel (void *cls GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
*/
static int
free_iterate (void *cls GNUNET_UNUSED,
- const GNUNET_HashCode * hash GNUNET_UNUSED, void *value)
+ const struct GNUNET_HashCode * hash GNUNET_UNUSED, void *value)
{
GNUNET_free (value);
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
/**
* Hash of the original content, used for encryption.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Hash of the encrypted content, used for querying.
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
};
@@ -112,7 +112,7 @@ struct IndexStartMessage
/**
* Hash of the file that we would like to index.
*/
- GNUNET_HashCode file_id;
+ struct GNUNET_HashCode file_id;
/* this is followed by a 0-terminated
* filename of a file with the hash
@@ -141,7 +141,7 @@ struct IndexInfoMessage
/**
* Hash of the indexed file.
*/
- GNUNET_HashCode file_id;
+ struct GNUNET_HashCode file_id;
/* this is followed by a 0-terminated
* filename of a file with the hash
@@ -174,7 +174,7 @@ struct UnindexMessage
/**
* Hash of the file that we will unindex.
*/
- GNUNET_HashCode file_id;
+ struct GNUNET_HashCode file_id;
};
@@ -245,7 +245,7 @@ struct SearchMessage
* <p>
* If the request is for a KBLOCK, "target" must be all zeros.
*/
- GNUNET_HashCode target;
+ struct GNUNET_HashCode target;
/**
* Hash of the keyword (aka query) for KBLOCKs; Hash of
@@ -253,7 +253,7 @@ struct SearchMessage
* and hash of the identifier XORed with the target for
* SBLOCKS (aka query).
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
/* this is followed by the hash codes of already-known
* 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,
if ((GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.file.file_size)) ||
(GNUNET_OK !=
GNUNET_BIO_read (rh, "fileid", &ret->data.file.file_id,
- sizeof (GNUNET_HashCode))))
+ sizeof (struct GNUNET_HashCode))))
{
GNUNET_break (0);
goto cleanup;
@@ -841,7 +841,7 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h, const char *fn,
if ((GNUNET_OK != GNUNET_BIO_read_int64 (rh, &ret->data.file.file_size)) ||
(GNUNET_OK !=
GNUNET_BIO_read (rh, "fileid", &ret->data.file.file_id,
- sizeof (GNUNET_HashCode))))
+ sizeof (struct GNUNET_HashCode))))
{
GNUNET_break (0);
goto cleanup;
@@ -1198,7 +1198,7 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
if ((GNUNET_OK != GNUNET_BIO_write_int64 (wh, fi->data.file.file_size)) ||
(GNUNET_OK !=
GNUNET_BIO_write (wh, &fi->data.file.file_id,
- sizeof (GNUNET_HashCode))))
+ sizeof (struct GNUNET_HashCode))))
{
GNUNET_break (0);
goto cleanup;
@@ -1575,7 +1575,7 @@ GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc)
(GNUNET_OK != GNUNET_BIO_write_int32 (wh, (uint32_t) uc->ksk_offset)) ||
((uc->state == UNINDEX_STATE_FS_NOTIFY) &&
(GNUNET_OK !=
- GNUNET_BIO_write (wh, &uc->file_id, sizeof (GNUNET_HashCode)))) ||
+ GNUNET_BIO_write (wh, &uc->file_id, sizeof (struct GNUNET_HashCode)))) ||
((uc->state == UNINDEX_STATE_ERROR) &&
(GNUNET_OK != GNUNET_BIO_write_string (wh, uc->emsg))))
{
@@ -1875,7 +1875,7 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr)
sr->update_search !=
NULL ? sr->update_search->serialization : NULL))
|| (GNUNET_OK != GNUNET_BIO_write_meta_data (wh, sr->meta)) ||
- (GNUNET_OK != GNUNET_BIO_write (wh, &sr->key, sizeof (GNUNET_HashCode)))
+ (GNUNET_OK != GNUNET_BIO_write (wh, &sr->key, sizeof (struct GNUNET_HashCode)))
|| (GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->mandatory_missing)) ||
(GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->optional_support)) ||
(GNUNET_OK != GNUNET_BIO_write_int32 (wh, sr->availability_success)) ||
@@ -2045,7 +2045,7 @@ deserialize_unindex_file (void *cls, const char *filename)
case UNINDEX_STATE_FS_NOTIFY:
if (GNUNET_OK !=
GNUNET_BIO_read (rh, "unindex-hash", &uc->file_id,
- sizeof (GNUNET_HashCode)))
+ sizeof (struct GNUNET_HashCode)))
{
GNUNET_break (0);
goto cleanup;
@@ -2211,7 +2211,7 @@ deserialize_search_result (void *cls, const char *filename)
GNUNET_BIO_read_string (rh, "search-lnk", &update_srch, 16)) ||
(GNUNET_OK != GNUNET_BIO_read_meta_data (rh, "result-meta", &sr->meta)) ||
(GNUNET_OK !=
- GNUNET_BIO_read (rh, "result-key", &sr->key, sizeof (GNUNET_HashCode)))
+ GNUNET_BIO_read (rh, "result-key", &sr->key, sizeof (struct GNUNET_HashCode)))
|| (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->mandatory_missing)) ||
(GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->optional_support)) ||
(GNUNET_OK != GNUNET_BIO_read_int32 (rh, &sr->availability_success)) ||
@@ -2346,7 +2346,7 @@ signal_search_resume (struct GNUNET_FS_SearchContext *sc);
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-signal_result_resume (void *cls, const GNUNET_HashCode * key, void *value)
+signal_result_resume (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchContext *sc = cls;
struct GNUNET_FS_ProgressInfo pi;
@@ -2398,7 +2398,7 @@ free_search_context (struct GNUNET_FS_SearchContext *sc);
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-free_result (void *cls, const GNUNET_HashCode * key, void *value)
+free_result (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchResult *sr = value;
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
/**
* Hash of the public key for the namespace.
*/
- GNUNET_HashCode namespace;
+ struct GNUNET_HashCode namespace;
/**
* Human-readable identifier chosen for this
@@ -333,7 +333,7 @@ struct GNUNET_FS_FileInformation
* over the entire file (when the indexing process is started).
* Otherwise this field is not used.
*/
- GNUNET_HashCode file_id;
+ struct GNUNET_HashCode file_id;
/**
* Size of the file (in bytes).
@@ -568,7 +568,7 @@ struct GNUNET_FS_SearchResult
/**
* Key for the search result
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* ID of the task that will clean up the probe_ctx should it not
@@ -730,7 +730,7 @@ GNUNET_FS_publish_main_ (void *cls,
* @param file_id computed hash, NULL on error
*/
void
-GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id);
+GNUNET_FS_unindex_process_hash_ (void *cls, const struct GNUNET_HashCode * file_id);
/**
@@ -1384,12 +1384,12 @@ struct GNUNET_FS_UnindexContext
/**
* Current key for decrypting KBLocks from 'get_key' operation.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Current query of 'get_key' operation.
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
/**
* First content UID, 0 for none.
@@ -1424,7 +1424,7 @@ struct GNUNET_FS_UnindexContext
/**
* Hash of the file's contents (once computed).
*/
- GNUNET_HashCode file_id;
+ struct GNUNET_HashCode file_id;
/**
* Current operatinonal phase.
@@ -1444,12 +1444,12 @@ struct SearchRequestEntry
* Hash of the original keyword, also known as the
* key (for decrypting the KBlock).
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Hash of the public key, also known as the query.
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
/**
* 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
/**
* Hash of data.
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
/**
* Data found in P2P network.
@@ -198,7 +198,7 @@ struct ProcessResultClosure
* @return GNUNET_YES (we should continue to iterate); unless serious error
*/
static int
-process_result_with_request (void *cls, const GNUNET_HashCode * key,
+process_result_with_request (void *cls, const struct GNUNET_HashCode * key,
void *value);
@@ -225,7 +225,7 @@ encrypt_existing_match (struct GNUNET_FS_DownloadContext *dc,
char enc[len];
struct GNUNET_CRYPTO_AesSessionKey sk;
struct GNUNET_CRYPTO_AesInitializationVector iv;
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
GNUNET_CRYPTO_hash_to_aes_key (&chk->key, &sk, &iv);
if (-1 == GNUNET_CRYPTO_aes_encrypt (block, len, &sk, &iv, enc))
@@ -234,7 +234,7 @@ encrypt_existing_match (struct GNUNET_FS_DownloadContext *dc,
return GNUNET_SYSERR;
}
GNUNET_CRYPTO_hash (enc, len, &query);
- if (0 != memcmp (&query, &chk->query, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (&query, &chk->query, sizeof (struct GNUNET_HashCode)))
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -624,7 +624,7 @@ try_top_down_reconstruction (struct GNUNET_FS_DownloadContext *dc,
{
uint64_t off;
char block[DBLOCK_SIZE];
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
uint64_t total;
size_t len;
unsigned int i;
@@ -653,7 +653,7 @@ try_top_down_reconstruction (struct GNUNET_FS_DownloadContext *dc,
return; /* failure */
}
GNUNET_CRYPTO_hash (block, len, &key);
- if (0 != memcmp (&key, &dr->chk.key, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (&key, &dr->chk.key, sizeof (struct GNUNET_HashCode)))
return; /* mismatch */
if (GNUNET_OK !=
encrypt_existing_match (dc, &dr->chk, dr, block, len, GNUNET_NO))
@@ -926,7 +926,7 @@ GNUNET_FS_free_download_request_ (struct DownloadRequest *dr)
* @return GNUNET_YES (we should continue to iterate); unless serious error
*/
static int
-process_result_with_request (void *cls, const GNUNET_HashCode * key,
+process_result_with_request (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct ProcessResultClosure *prc = cls;
@@ -1376,7 +1376,7 @@ do_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @return GNUNET_OK
*/
static int
-retry_entry (void *cls, const GNUNET_HashCode * key, void *entry)
+retry_entry (void *cls, const struct GNUNET_HashCode * key, void *entry)
{
struct GNUNET_FS_DownloadContext *dc = cls;
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)
struct ProcessNamespaceContext *pnc = cls;
struct GNUNET_CRYPTO_RsaPrivateKey *key;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pk;
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
const char *name;
const char *t;
@@ -470,7 +470,7 @@ sb_put_cont (void *cls, int success,
const char *msg)
{
struct GNUNET_FS_PublishSksContext *psc = cls;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
psc->dqe = NULL;
if (GNUNET_OK != success)
@@ -544,9 +544,9 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
struct SBlock *sb_enc;
char *dest;
struct GNUNET_CONTAINER_MetaData *mmeta;
- GNUNET_HashCode key; /* hash of thisId = key */
- GNUNET_HashCode id; /* hash of hc = identifier */
- GNUNET_HashCode query; /* id ^ nsid = DB query */
+ struct GNUNET_HashCode key; /* hash of thisId = key */
+ struct GNUNET_HashCode id; /* hash of hc = identifier */
+ struct GNUNET_HashCode query; /* id ^ nsid = DB query */
if (NULL == meta)
mmeta = GNUNET_CONTAINER_meta_data_create ();
@@ -591,7 +591,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
size = sizeof (struct SBlock) + mdsize + slen + nidlen;
sb_enc = GNUNET_malloc (size);
GNUNET_CRYPTO_hash (identifier, idlen, &key);
- GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &id);
+ GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &id);
sks_uri = GNUNET_malloc (sizeof (struct GNUNET_FS_Uri));
sks_uri->type = sks;
GNUNET_CRYPTO_rsa_key_get_public (namespace->key, &sb_enc->subspace);
@@ -711,7 +711,7 @@ struct ProcessUpdateClosure
* GNUNET_NO if not.
*/
static int
-process_update_node (void *cls, const GNUNET_HashCode * key, void *value)
+process_update_node (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ProcessUpdateClosure *pc = cls;
struct NamespaceUpdateNode *nsn = value;
@@ -774,11 +774,11 @@ struct FindTreeClosure
* GNUNET_NO if not.
*/
static int
-find_trees (void *cls, const GNUNET_HashCode * key, void *value)
+find_trees (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct FindTreeClosure *fc = cls;
struct NamespaceUpdateNode *nsn = value;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
if (nsn->nug == fc->nug)
{
@@ -838,7 +838,7 @@ GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
{
unsigned int i;
unsigned int nug;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
struct NamespaceUpdateNode *nsn;
struct ProcessUpdateClosure pc;
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,
{
struct GNUNET_FS_AdvertisementContext *ac = cls;
const char *keyword;
- GNUNET_HashCode key;
- GNUNET_HashCode query;
+ struct GNUNET_HashCode key;
+ struct GNUNET_HashCode query;
struct GNUNET_CRYPTO_AesSessionKey skey;
struct GNUNET_CRYPTO_AesInitializationVector iv;
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)
* @param res resulting hash, NULL on error
*/
static void
-hash_for_index_cb (void *cls, const GNUNET_HashCode * res)
+hash_for_index_cb (void *cls, const struct GNUNET_HashCode * res)
{
struct GNUNET_FS_PublishContext *pc = cls;
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)
{
struct GNUNET_FS_PublishKskContext *pkc = cls;
const char *keyword;
- GNUNET_HashCode key;
- GNUNET_HashCode query;
+ struct GNUNET_HashCode key;
+ struct GNUNET_HashCode query;
struct GNUNET_CRYPTO_AesSessionKey skey;
struct GNUNET_CRYPTO_AesInitializationVector iv;
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,
* GNUNET_OK otherwise
*/
static int
-test_result_present (void *cls, const GNUNET_HashCode * key, void *value)
+test_result_present (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const struct GNUNET_FS_Uri *uri = cls;
struct GNUNET_FS_SearchResult *sr = value;
@@ -162,7 +162,7 @@ struct GetResultContext
* @return GNUNET_OK
*/
static int
-get_result_present (void *cls, const GNUNET_HashCode * key, void *value)
+get_result_present (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GetResultContext *grc = cls;
struct GNUNET_FS_SearchResult *sr = value;
@@ -388,7 +388,7 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc,
const struct GNUNET_FS_Uri *uri,
const struct GNUNET_CONTAINER_MetaData *meta)
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct GNUNET_FS_SearchResult *sr;
struct GetResultContext grc;
int is_new;
@@ -477,7 +477,7 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, const char *id_update,
const struct GNUNET_CONTAINER_MetaData *meta)
{
struct GNUNET_FS_Uri uu;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct GNUNET_FS_SearchResult *sr;
/* check if new */
@@ -533,7 +533,7 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
size_t edata_size,
char *data)
{
- GNUNET_HashCode q;
+ struct GNUNET_HashCode q;
struct GNUNET_CRYPTO_AesSessionKey skey;
struct GNUNET_CRYPTO_AesInitializationVector iv;
int i;
@@ -543,7 +543,7 @@ decrypt_block_with_keyword (const struct GNUNET_FS_SearchContext *sc,
&q);
/* find key */
for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
- if (0 == memcmp (&q, &sc->requests[i].query, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&q, &sc->requests[i].query, sizeof (struct GNUNET_HashCode)))
break;
if (i == sc->uri->data.ksk.keywordCount)
{
@@ -708,7 +708,7 @@ process_sblock (struct GNUNET_FS_SearchContext *sc, const struct SBlock *sb,
const char *uris;
size_t off;
char *emsg;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
char *identifier;
/* decrypt */
@@ -904,7 +904,7 @@ struct MessageBuilderContext
/**
* Where to store the keys.
*/
- GNUNET_HashCode *xoff;
+ struct GNUNET_HashCode *xoff;
/**
* Search context we are iterating for.
@@ -928,7 +928,7 @@ struct MessageBuilderContext
* @return GNUNET_OK to continue iterating
*/
static int
-build_result_set (void *cls, const GNUNET_HashCode * key, void *value)
+build_result_set (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MessageBuilderContext *mbc = cls;
struct GNUNET_FS_SearchResult *sr = value;
@@ -960,7 +960,7 @@ build_result_set (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_OK to continue iterating
*/
static int
-find_result_set (void *cls, const GNUNET_HashCode * key, void *value)
+find_result_set (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MessageBuilderContext *mbc = cls;
struct GNUNET_FS_SearchResult *sr = value;
@@ -990,8 +990,8 @@ transmit_search_request (void *cls, size_t size, void *buf)
size_t msize;
struct SearchMessage *sm;
const char *identifier;
- GNUNET_HashCode key;
- GNUNET_HashCode idh;
+ struct GNUNET_HashCode key;
+ struct GNUNET_HashCode idh;
unsigned int sqms;
uint32_t options;
@@ -1004,7 +1004,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
mbc.skip_cnt = sc->search_request_map_offset;
sm = buf;
sm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_START_SEARCH);
- mbc.xoff = (GNUNET_HashCode *) & sm[1];
+ mbc.xoff = (struct GNUNET_HashCode *) & sm[1];
options = SEARCH_MESSAGE_OPTION_NONE;
if (0 != (sc->options & GNUNET_FS_SEARCH_OPTION_LOOPBACK_ONLY))
options |= SEARCH_MESSAGE_OPTION_LOOPBACK_ONLY;
@@ -1017,7 +1017,7 @@ transmit_search_request (void *cls, size_t size, void *buf)
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&find_result_set, &mbc);
sqms = mbc.put_cnt;
- mbc.put_cnt = (size - msize) / sizeof (GNUNET_HashCode);
+ mbc.put_cnt = (size - msize) / sizeof (struct GNUNET_HashCode);
mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
if (sc->search_request_map_offset < sqms)
GNUNET_assert (mbc.put_cnt > 0);
@@ -1025,9 +1025,9 @@ transmit_search_request (void *cls, size_t size, void *buf)
sm->header.size = htons (msize);
sm->type = htonl (GNUNET_BLOCK_TYPE_ANY);
sm->anonymity_level = htonl (sc->anonymity);
- memset (&sm->target, 0, sizeof (GNUNET_HashCode));
+ memset (&sm->target, 0, sizeof (struct GNUNET_HashCode));
sm->query = sc->requests[sc->keyword_offset].query;
- msize += sizeof (GNUNET_HashCode) * mbc.put_cnt;
+ msize += sizeof (struct GNUNET_HashCode) * mbc.put_cnt;
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&build_result_set, &mbc);
sm->header.size = htons (msize);
@@ -1058,15 +1058,15 @@ transmit_search_request (void *cls, size_t size, void *buf)
sm->target = sc->uri->data.sks.namespace;
identifier = sc->uri->data.sks.identifier;
GNUNET_CRYPTO_hash (identifier, strlen (identifier), &key);
- GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &idh);
+ GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &idh);
GNUNET_CRYPTO_hash_xor (&idh, &sm->target, &sm->query);
- mbc.put_cnt = (size - msize) / sizeof (GNUNET_HashCode);
+ mbc.put_cnt = (size - msize) / sizeof (struct GNUNET_HashCode);
sqms = GNUNET_CONTAINER_multihashmap_size (sc->master_result_map);
mbc.put_cnt = GNUNET_MIN (mbc.put_cnt, sqms - mbc.skip_cnt);
mbc.keyword_offset = 0;
if (sc->search_request_map_offset < sqms)
GNUNET_assert (mbc.put_cnt > 0);
- msize += sizeof (GNUNET_HashCode) * mbc.put_cnt;
+ msize += sizeof (struct GNUNET_HashCode) * mbc.put_cnt;
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&build_result_set, &mbc);
sm->header.size = htons (msize);
@@ -1103,9 +1103,9 @@ schedule_transmit_search_request (struct GNUNET_FS_SearchContext *sc)
sqms =
GNUNET_CONTAINER_multihashmap_size (sc->master_result_map) -
sc->search_request_map_offset;
- fit = (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - size) / sizeof (GNUNET_HashCode);
+ fit = (GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - size) / sizeof (struct GNUNET_HashCode);
fit = GNUNET_MIN (fit, sqms);
- size += sizeof (GNUNET_HashCode) * fit;
+ size += sizeof (struct GNUNET_HashCode) * fit;
GNUNET_CLIENT_notify_transmit_ready (sc->client, size,
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
GNUNET_NO, &transmit_search_request, sc);
@@ -1220,7 +1220,7 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc)
{
unsigned int i;
const char *keyword;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
struct GNUNET_CRYPTO_RsaPrivateKey *pk;
@@ -1267,7 +1267,7 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc)
* @return GNUNET_OK
*/
static int
-search_result_freeze_probes (void *cls, const GNUNET_HashCode * key,
+search_result_freeze_probes (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct GNUNET_FS_SearchResult *sr = value;
@@ -1297,7 +1297,7 @@ search_result_freeze_probes (void *cls, const GNUNET_HashCode * key,
* @return GNUNET_OK
*/
static int
-search_result_resume_probes (void *cls, const GNUNET_HashCode * key,
+search_result_resume_probes (void *cls, const struct GNUNET_HashCode * key,
void *value)
{
struct GNUNET_FS_SearchResult *sr = value;
@@ -1318,7 +1318,7 @@ search_result_resume_probes (void *cls, const GNUNET_HashCode * key,
* @return GNUNET_OK
*/
static int
-search_result_suspend (void *cls, const GNUNET_HashCode * key, void *value)
+search_result_suspend (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchContext *sc = cls;
struct GNUNET_FS_SearchResult *sr = value;
@@ -1477,7 +1477,7 @@ GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc)
* @return GNUNET_OK
*/
static int
-search_result_stop (void *cls, const GNUNET_HashCode * key, void *value)
+search_result_stop (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchContext *sc = cls;
struct GNUNET_FS_SearchResult *sr = value;
@@ -1530,7 +1530,7 @@ search_result_stop (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_OK
*/
static int
-search_result_free (void *cls, const GNUNET_HashCode * key, void *value)
+search_result_free (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_FS_SearchResult *sr = value;
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)
{
struct GNUNET_CONTAINER_MultiHashMap *mcm = cls;
struct KeywordCounter *cnt;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
size_t klen;
klen = strlen (keyword) + 1;
@@ -206,7 +206,7 @@ add_to_meta_counter (void *cls, const char *plugin_name,
const char *data_mime_type, const char *data, size_t data_len)
{
struct GNUNET_CONTAINER_MultiHashMap *map = cls;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct MetaCounter *cnt;
GNUNET_CRYPTO_hash (data, data_len, &key);
@@ -243,7 +243,7 @@ remove_high_frequency_keywords (void *cls, const char *keyword, int is_mandatory
{
struct TrimContext *tc = cls;
struct KeywordCounter *counter;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
size_t klen;
klen = strlen (keyword) + 1;
@@ -268,7 +268,7 @@ remove_high_frequency_keywords (void *cls, const char *keyword, int is_mandatory
* @return GNUNET_YES (always)
*/
static int
-migrate_and_drop_keywords (void *cls, const GNUNET_HashCode * key, void *value)
+migrate_and_drop_keywords (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct TrimContext *tc = cls;
struct KeywordCounter *counter = value;
@@ -299,7 +299,7 @@ migrate_and_drop_keywords (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_YES (always)
*/
static int
-migrate_and_drop_metadata (void *cls, const GNUNET_HashCode * key, void *value)
+migrate_and_drop_metadata (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct TrimContext *tc = cls;
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,
*/
static void
process_kblock_for_unindex (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
size_t size, const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority,
@@ -649,7 +649,7 @@ GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc)
* @param file_id computed hash, NULL on error
*/
void
-GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id)
+GNUNET_FS_unindex_process_hash_ (void *cls, const struct GNUNET_HashCode * file_id)
{
struct GNUNET_FS_UnindexContext *uc = cls;
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 @@
* @param key wherer to store the unique key
*/
void
-GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key)
+GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode * key)
{
switch (uri->type)
{
@@ -121,7 +121,7 @@ GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key)
key);
break;
default:
- memset (key, 0, sizeof (GNUNET_HashCode));
+ memset (key, 0, sizeof (struct GNUNET_HashCode));
break;
}
}
@@ -355,7 +355,7 @@ static struct GNUNET_FS_Uri *
uri_sks_parse (const char *s, char **emsg)
{
struct GNUNET_FS_Uri *ret;
- GNUNET_HashCode namespace;
+ struct GNUNET_HashCode namespace;
char *identifier;
unsigned int pos;
size_t slen;
@@ -963,7 +963,7 @@ GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, const char *id,
* @return an FS URI for the given namespace and identifier
*/
struct GNUNET_FS_Uri *
-GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id)
+GNUNET_FS_uri_sks_create_from_nsid (struct GNUNET_HashCode * nsid, const char *id)
{
struct GNUNET_FS_Uri *ns_uri;
@@ -1273,7 +1273,7 @@ GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
case sks:
if ((0 ==
memcmp (&u1->data.sks.namespace, &u2->data.sks.namespace,
- sizeof (GNUNET_HashCode))) &&
+ sizeof (struct GNUNET_HashCode))) &&
(0 == strcmp (u1->data.sks.identifier, u2->data.sks.identifier)))
return GNUNET_YES;
@@ -1334,7 +1334,7 @@ GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri)
*/
int
GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
- GNUNET_HashCode * nsid)
+ struct GNUNET_HashCode * nsid)
{
if (!GNUNET_FS_uri_test_sks (uri))
{
@@ -1931,7 +1931,7 @@ uri_ksk_to_string (const struct GNUNET_FS_Uri *uri)
static char *
uri_sks_to_string (const struct GNUNET_FS_Uri *uri)
{
- const GNUNET_HashCode *namespace;
+ const struct GNUNET_HashCode *namespace;
const char *identifier;
char *ret;
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;
* @return GNUNET_OK to continue iteration
*/
static int
-print_indexed (void *cls, const char *filename, const GNUNET_HashCode * file_id)
+print_indexed (void *cls, const char *filename, const struct GNUNET_HashCode * file_id)
{
if (NULL == filename)
{
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)
static void
-ns_printer (void *cls, const char *name, const GNUNET_HashCode * id)
+ns_printer (void *cls, const char *name, const struct GNUNET_HashCode * id)
{
struct GNUNET_CRYPTO_HashAsciiEncoded enc;
@@ -105,7 +105,7 @@ ns_printer (void *cls, const char *name, const GNUNET_HashCode * id)
static int
-pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym,
+pseudo_printer (void *cls, const struct GNUNET_HashCode * pseudonym,
const char *name, const char *unique_name,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
@@ -136,7 +136,7 @@ pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym,
static void
post_advertising (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
{
- GNUNET_HashCode nsid;
+ struct GNUNET_HashCode nsid;
char *set;
int delta;
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)
* @return GNUNET_YES to continue to iterate
*/
static int
-consider_peer_for_forwarding (void *cls, const GNUNET_HashCode * key,
+consider_peer_for_forwarding (void *cls, const struct GNUNET_HashCode * key,
struct GSF_PendingRequest *pr)
{
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
/**
* Which of the optional hash codes are present at the end of the
* message? See GET_MESSAGE_BIT_xx constants. For each bit that is
- * set, an additional GNUNET_HashCode with the respective content
+ * set, an additional struct GNUNET_HashCode with the respective content
* (in order of the bits) will be appended to the end of the GET
* message.
*/
@@ -129,7 +129,7 @@ struct GetMessage
* Hashcodes of the file(s) we're looking for.
* Details depend on the query type.
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
/* this is followed by hash codes as specified in the "hash_bitmap";
* 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)
*/
static void
free_pending_request (struct PeerRequest *peerreq,
- const GNUNET_HashCode *query)
+ const struct GNUNET_HashCode *query)
{
struct GSF_ConnectedPeer *cp = peerreq->cp;
@@ -786,7 +786,7 @@ free_pending_request (struct PeerRequest *peerreq,
* @return GNUNET_YES (continue to iterate)
*/
static int
-cancel_pending_request (void *cls, const GNUNET_HashCode * query, void *value)
+cancel_pending_request (void *cls, const struct GNUNET_HashCode * query, void *value)
{
struct PeerRequest *peerreq = value;
struct GSF_PendingRequest *pr = peerreq->pr;
@@ -1129,13 +1129,13 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
struct GSF_PendingRequestData *prd;
struct GSF_ConnectedPeer *cp;
struct GSF_ConnectedPeer *cps;
- const GNUNET_HashCode *namespace;
+ const struct GNUNET_HashCode *namespace;
const struct GNUNET_PeerIdentity *target;
enum GSF_PendingRequestOptions options;
uint16_t msize;
const struct GetMessage *gm;
unsigned int bits;
- const GNUNET_HashCode *opt;
+ const struct GNUNET_HashCode *opt;
uint32_t bm;
size_t bfsize;
uint32_t ttl_decrement;
@@ -1165,13 +1165,13 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
bits++;
bm >>= 1;
}
- if (msize < sizeof (struct GetMessage) + bits * sizeof (GNUNET_HashCode))
+ if (msize < sizeof (struct GetMessage) + bits * sizeof (struct GNUNET_HashCode))
{
GNUNET_break_op (0);
return NULL;
}
- opt = (const GNUNET_HashCode *) &gm[1];
- bfsize = msize - sizeof (struct GetMessage) - bits * sizeof (GNUNET_HashCode);
+ opt = (const struct GNUNET_HashCode *) &gm[1];
+ bfsize = msize - sizeof (struct GetMessage) - bits * sizeof (struct GNUNET_HashCode);
/* bfsize must be power of 2, check! */
if (0 != ((bfsize - 1) & bfsize))
{
@@ -1284,7 +1284,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
prd = GSF_pending_request_get_data_ (pr);
if ((prd->type == type) &&
((type != GNUNET_BLOCK_TYPE_FS_SBLOCK) ||
- (0 == memcmp (&prd->namespace, namespace, sizeof (GNUNET_HashCode)))))
+ (0 == memcmp (&prd->namespace, namespace, sizeof (struct GNUNET_HashCode)))))
{
if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl)
{
@@ -1612,7 +1612,7 @@ struct IterationContext
* @return GNUNET_YES to continue iteration
*/
static int
-call_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+call_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct IterationContext *ic = cls;
struct GSF_ConnectedPeer *cp = value;
@@ -1728,7 +1728,7 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
* @return GNUNET_OK to continue iteration
*/
static int
-flush_trust (void *cls, const GNUNET_HashCode * key, void *value)
+flush_trust (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GSF_ConnectedPeer *cp = value;
char *fn;
@@ -1829,7 +1829,7 @@ GSF_connected_peer_init_ ()
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-clean_peer (void *cls, const GNUNET_HashCode * key, void *value)
+clean_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
{
GSF_peer_disconnect_handler_ (NULL, (const struct GNUNET_PeerIdentity *) key);
return GNUNET_YES;
@@ -1862,7 +1862,7 @@ GSF_connected_peer_done_ ()
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-clean_local_client (void *cls, const GNUNET_HashCode * key, void *value)
+clean_local_client (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const struct GSF_LocalClient *lc = cls;
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
/**
* Hash of the contents of the file.
*/
- GNUNET_HashCode file_id;
+ struct GNUNET_HashCode file_id;
};
@@ -126,7 +126,7 @@ write_index_list ()
while (pos != NULL)
{
if ((GNUNET_OK !=
- GNUNET_BIO_write (wh, &pos->file_id, sizeof (GNUNET_HashCode))) ||
+ GNUNET_BIO_write (wh, &pos->file_id, sizeof (struct GNUNET_HashCode))) ||
(GNUNET_OK != GNUNET_BIO_write_string (wh, pos->filename)))
break;
pos = pos->next;
@@ -152,7 +152,7 @@ read_index_list ()
char *fn;
struct IndexInfo *pos;
char *fname;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
size_t slen;
char *emsg;
@@ -180,7 +180,7 @@ read_index_list ()
}
while ((GNUNET_OK ==
GNUNET_BIO_read (rh, "Hash of indexed file", &hc,
- sizeof (GNUNET_HashCode))) &&
+ sizeof (struct GNUNET_HashCode))) &&
(GNUNET_OK ==
GNUNET_BIO_read_string (rh, "Name of indexed file", &fname,
1024 * 16)) && (fname != NULL))
@@ -253,13 +253,13 @@ signal_index_ok (struct IndexInfo *ii)
* @param res resulting hash, NULL on error
*/
static void
-hash_for_index_val (void *cls, const GNUNET_HashCode * res)
+hash_for_index_val (void *cls, const struct GNUNET_HashCode * res)
{
struct IndexInfo *ii = cls;
ii->fhc = NULL;
if ((res == NULL) ||
- (0 != memcmp (res, &ii->file_id, sizeof (GNUNET_HashCode))))
+ (0 != memcmp (res, &ii->file_id, sizeof (struct GNUNET_HashCode))))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
@@ -431,7 +431,7 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
while (NULL != pos)
{
next = pos->next;
- if (0 == memcmp (&pos->file_id, &um->file_id, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&pos->file_id, &um->file_id, sizeof (struct GNUNET_HashCode)))
{
if (prev == NULL)
indexed_files = next;
@@ -502,7 +502,7 @@ remove_cont (void *cls, int success,
* @return GNUNET_OK on success
*/
int
-GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
+GNUNET_FS_handle_on_demand_block (const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration,
@@ -511,10 +511,10 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
void *cont_cls)
{
const struct OnDemandBlock *odb;
- GNUNET_HashCode nkey;
+ struct GNUNET_HashCode nkey;
struct GNUNET_CRYPTO_AesSessionKey skey;
struct GNUNET_CRYPTO_AesInitializationVector iv;
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
ssize_t nsize;
char ndata[DBLOCK_SIZE];
char edata[DBLOCK_SIZE];
@@ -565,7 +565,7 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
GNUNET_CRYPTO_hash_to_aes_key (&nkey, &skey, &iv);
GNUNET_CRYPTO_aes_encrypt (ndata, nsize, &skey, &iv, edata);
GNUNET_CRYPTO_hash (edata, nsize, &query);
- if (0 != memcmp (&query, key, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (&query, key, sizeof (struct GNUNET_HashCode)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("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 @@
* @return GNUNET_OK on success
*/
int
-GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
+GNUNET_FS_handle_on_demand_block (const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
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,
*message,
struct GSF_PendingRequest **prptr)
{
- static GNUNET_HashCode all_zeros;
+ static struct GNUNET_HashCode all_zeros;
const struct SearchMessage *sm;
struct GSF_LocalClient *lc;
struct ClientRequest *cr;
@@ -311,7 +311,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
msize = ntohs (message->size);
if ((msize < sizeof (struct SearchMessage)) ||
- (0 != (msize - sizeof (struct SearchMessage)) % sizeof (GNUNET_HashCode)))
+ (0 != (msize - sizeof (struct SearchMessage)) % sizeof (struct GNUNET_HashCode)))
{
GNUNET_break (0);
*prptr = NULL;
@@ -320,7 +320,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop ("# client searches received"), 1,
GNUNET_NO);
- sc = (msize - sizeof (struct SearchMessage)) / sizeof (GNUNET_HashCode);
+ sc = (msize - sizeof (struct SearchMessage)) / sizeof (struct GNUNET_HashCode);
sm = (const struct SearchMessage *) message;
type = ntohl (sm->type);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -340,7 +340,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
(SEARCH_MESSAGE_OPTION_CONTINUED was always set) and that have a
matching query and type */
if ((GNUNET_YES != prd->has_started) &&
- (0 != memcmp (&prd->query, &sm->query, sizeof (GNUNET_HashCode))) &&
+ (0 != memcmp (&prd->query, &sm->query, sizeof (struct GNUNET_HashCode))) &&
(prd->type == type))
break;
cr = cr->next;
@@ -350,7 +350,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Have existing request, merging content-seen lists.\n");
- GSF_pending_request_update_ (cr->pr, (const GNUNET_HashCode *) &sm[1], sc);
+ GSF_pending_request_update_ (cr->pr, (const struct GNUNET_HashCode *) &sm[1], sc);
GNUNET_STATISTICS_update (GSF_stats,
gettext_noop
("# client searches updated (merged content seen list)"),
@@ -371,7 +371,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
: NULL,
(0 !=
memcmp (&sm->target, &all_zeros,
- sizeof (GNUNET_HashCode)))
+ sizeof (struct GNUNET_HashCode)))
? (const struct GNUNET_PeerIdentity *)
&sm->target : NULL, NULL, 0,
0 /* bf */ ,
@@ -380,7 +380,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
0 /* ttl */ ,
0 /* sender PID */ ,
0 /* origin PID */ ,
- (const GNUNET_HashCode *) &sm[1], sc,
+ (const struct GNUNET_HashCode *) &sm[1], sc,
&client_response_handler, cr);
}
*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;
* @param rp a request plan
* @return the associated query
*/
-static const GNUNET_HashCode *
+static const struct GNUNET_HashCode *
get_rp_key (struct GSF_RequestPlan *rp)
{
return &GSF_pending_request_get_data_ (rp->prl_head->pr)->query;
@@ -512,7 +512,7 @@ struct MergeContext
* GNUNET_NO if not (merge success)
*/
static int
-merge_pr (void *cls, const GNUNET_HashCode * query, void *element)
+merge_pr (void *cls, const struct GNUNET_HashCode * query, void *element)
{
struct MergeContext *mpr = cls;
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
/**
* Array of hash codes of replies we've already seen.
*/
- GNUNET_HashCode *replies_seen;
+ struct GNUNET_HashCode *replies_seen;
/**
* Bloomfilter masking replies we've already seen.
@@ -263,15 +263,15 @@ refresh_bloomfilter (struct GSF_PendingRequest *pr)
struct GSF_PendingRequest *
GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
- const GNUNET_HashCode * namespace,
+ const struct GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * namespace,
const struct GNUNET_PeerIdentity *target,
const char *bf_data, size_t bf_size,
uint32_t mingle, uint32_t anonymity_level,
uint32_t priority, int32_t ttl,
GNUNET_PEER_Id sender_pid,
GNUNET_PEER_Id origin_pid,
- const GNUNET_HashCode * replies_seen,
+ const struct GNUNET_HashCode * replies_seen,
unsigned int replies_seen_count,
GSF_PendingRequestReplyHandler rh, void *rh_cls)
{
@@ -324,9 +324,9 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
{
pr->replies_seen_size = replies_seen_count;
pr->replies_seen =
- GNUNET_malloc (sizeof (GNUNET_HashCode) * pr->replies_seen_size);
+ GNUNET_malloc (sizeof (struct GNUNET_HashCode) * pr->replies_seen_size);
memcpy (pr->replies_seen, replies_seen,
- replies_seen_count * sizeof (GNUNET_HashCode));
+ replies_seen_count * sizeof (struct GNUNET_HashCode));
pr->replies_seen_count = replies_seen_count;
}
if (NULL != bf_data)
@@ -398,11 +398,11 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
if ((pra->public_data.type != prb->public_data.type) ||
(0 !=
memcmp (&pra->public_data.query, &prb->public_data.query,
- sizeof (GNUNET_HashCode))) ||
+ sizeof (struct GNUNET_HashCode))) ||
((pra->public_data.type == GNUNET_BLOCK_TYPE_FS_SBLOCK) &&
(0 !=
memcmp (&pra->public_data.namespace, &prb->public_data.namespace,
- sizeof (GNUNET_HashCode)))))
+ sizeof (struct GNUNET_HashCode)))))
return GNUNET_NO;
return GNUNET_OK;
}
@@ -419,11 +419,11 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
*/
void
GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
- const GNUNET_HashCode * replies_seen,
+ const struct GNUNET_HashCode * replies_seen,
unsigned int replies_seen_count)
{
unsigned int i;
- GNUNET_HashCode mhash;
+ struct GNUNET_HashCode mhash;
if (replies_seen_count + pr->replies_seen_count < pr->replies_seen_count)
return; /* integer overflow */
@@ -434,7 +434,7 @@ GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
GNUNET_array_grow (pr->replies_seen, pr->replies_seen_size,
replies_seen_count + pr->replies_seen_count);
memcpy (&pr->replies_seen[pr->replies_seen_count], replies_seen,
- sizeof (GNUNET_HashCode) * replies_seen_count);
+ sizeof (struct GNUNET_HashCode) * replies_seen_count);
pr->replies_seen_count += replies_seen_count;
refresh_bloomfilter (pr);
}
@@ -477,7 +477,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
{
char lbuf[GNUNET_SERVER_MAX_MESSAGE_SIZE];
struct GetMessage *gm;
- GNUNET_HashCode *ext;
+ struct GNUNET_HashCode *ext;
size_t msize;
unsigned int k;
uint32_t bm;
@@ -515,7 +515,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
k++;
}
bf_size = GNUNET_CONTAINER_bloomfilter_get_size (pr->bf);
- msize = sizeof (struct GetMessage) + bf_size + k * sizeof (GNUNET_HashCode);
+ msize = sizeof (struct GetMessage) + bf_size + k * sizeof (struct GNUNET_HashCode);
GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE);
if (buf_size < msize)
return msize;
@@ -537,13 +537,13 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
gm->filter_mutator = htonl (pr->mingle);
gm->hash_bitmap = htonl (bm);
gm->query = pr->public_data.query;
- ext = (GNUNET_HashCode *) & gm[1];
+ ext = (struct GNUNET_HashCode *) & gm[1];
k = 0;
if (!do_route)
GNUNET_PEER_resolve (pr->sender_pid,
(struct GNUNET_PeerIdentity *) &ext[k++]);
if (GNUNET_BLOCK_TYPE_FS_SBLOCK == pr->public_data.type)
- memcpy (&ext[k++], &pr->public_data.namespace, sizeof (GNUNET_HashCode));
+ memcpy (&ext[k++], &pr->public_data.namespace, sizeof (struct GNUNET_HashCode));
if (GNUNET_YES == pr->public_data.has_target)
ext[k++] = pr->public_data.target.hashPubKey;
if (pr->bf != NULL)
@@ -565,7 +565,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-clean_request (void *cls, const GNUNET_HashCode * key, void *value)
+clean_request (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GSF_PendingRequest *pr = value;
GSF_LocalLookupContinuation cont;
@@ -763,11 +763,11 @@ update_request_performance_data (struct ProcessReplyClosure *prq,
* @return GNUNET_YES (we should continue to iterate)
*/
static int
-process_reply (void *cls, const GNUNET_HashCode * key, void *value)
+process_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ProcessReplyClosure *prq = cls;
struct GSF_PendingRequest *pr = value;
- GNUNET_HashCode chash;
+ struct GNUNET_HashCode chash;
struct GNUNET_TIME_Absolute last_transmission;
if (NULL == pr->rh)
@@ -783,7 +783,7 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value)
&pr->public_data.namespace,
(prq->type ==
GNUNET_BLOCK_TYPE_FS_SBLOCK) ?
- sizeof (GNUNET_HashCode) : 0, prq->data,
+ sizeof (struct GNUNET_HashCode) : 0, prq->data,
prq->size);
switch (prq->eval)
{
@@ -1000,7 +1000,7 @@ test_put_load_too_high (uint32_t priority)
*/
static void
handle_dht_reply (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -1057,7 +1057,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
const void *xquery;
size_t xquery_size;
struct GNUNET_PeerIdentity pi;
- char buf[sizeof (GNUNET_HashCode) * 2] GNUNET_ALIGN;
+ char buf[sizeof (struct GNUNET_HashCode) * 2] GNUNET_ALIGN;
if (0 != pr->public_data.anonymity_level)
return;
@@ -1071,8 +1071,8 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
if (GNUNET_BLOCK_TYPE_FS_SBLOCK == pr->public_data.type)
{
xquery = buf;
- memcpy (buf, &pr->public_data.namespace, sizeof (GNUNET_HashCode));
- xquery_size = sizeof (GNUNET_HashCode);
+ memcpy (buf, &pr->public_data.namespace, sizeof (struct GNUNET_HashCode));
+ xquery_size = sizeof (struct GNUNET_HashCode);
}
if (0 != (pr->public_data.options & GSF_PRO_FORWARD_ONLY))
{
@@ -1151,7 +1151,7 @@ odc_warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* maybe 0 if no unique identifier is available
*/
static void
-process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
+process_local_reply (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -1159,7 +1159,7 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
struct GSF_PendingRequest *pr = cls;
GSF_LocalLookupContinuation cont;
struct ProcessReplyClosure prq;
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
unsigned int old_rf;
GNUNET_SCHEDULER_cancel (pr->warn_task);
@@ -1477,7 +1477,7 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
size_t dsize;
enum GNUNET_BLOCK_Type type;
struct GNUNET_TIME_Absolute expiration;
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
struct ProcessReplyClosure prq;
struct GNUNET_TIME_Relative block_time;
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
/**
* Primary query hash for this request.
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
/**
* Namespace to query, only set if the type is SBLOCK.
*/
- GNUNET_HashCode namespace;
+ struct GNUNET_HashCode namespace;
/**
* Identity of a peer hosting the content, only set if
@@ -220,15 +220,15 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls,
struct GSF_PendingRequest *
GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
- const GNUNET_HashCode * namespace,
+ const struct GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * namespace,
const struct GNUNET_PeerIdentity *target,
const char *bf_data, size_t bf_size,
uint32_t mingle, uint32_t anonymity_level,
uint32_t priority, int32_t ttl,
GNUNET_PEER_Id sender_pid,
GNUNET_PEER_Id origin_pid,
- const GNUNET_HashCode * replies_seen,
+ const struct GNUNET_HashCode * replies_seen,
unsigned int replies_seen_count,
GSF_PendingRequestReplyHandler rh, void *rh_cls);
@@ -243,7 +243,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
*/
void
GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
- const GNUNET_HashCode * replies_seen,
+ const struct GNUNET_HashCode * replies_seen,
unsigned int replies_seen_count);
@@ -305,7 +305,7 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup);
* @return GNUNET_YES to continue to iterate
*/
typedef int (*GSF_PendingRequestIterator) (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
struct GSF_PendingRequest * pr);
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
/**
* Query for the block.
*/
- GNUNET_HashCode query;
+ struct GNUNET_HashCode query;
/**
* When does this block expire?
@@ -467,7 +467,7 @@ consider_gathering ()
* maybe 0 if no unique identifier is available
*/
static void
-process_migration_content (void *cls, const GNUNET_HashCode * key, size_t size,
+process_migration_content (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
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)
* maybe 0 if no unique identifier is available
*/
static void
-process_dht_put_content (void *cls, const GNUNET_HashCode * key, size_t size,
+process_dht_put_content (void *cls, const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
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 @@
*/
static enum GNUNET_BLOCK_EvaluationResult
block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
size_t reply_block_size)
{
const struct SBlock *sb;
- GNUNET_HashCode chash;
- GNUNET_HashCode mhash;
- const GNUNET_HashCode *nsid;
- GNUNET_HashCode sh;
+ struct GNUNET_HashCode chash;
+ struct GNUNET_HashCode mhash;
+ const struct GNUNET_HashCode *nsid;
+ struct GNUNET_HashCode sh;
switch (type)
{
@@ -107,7 +107,7 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
}
return GNUNET_BLOCK_EVALUATION_OK_MORE;
case GNUNET_BLOCK_TYPE_FS_SBLOCK:
- if (xquery_size != sizeof (GNUNET_HashCode))
+ if (xquery_size != sizeof (struct GNUNET_HashCode))
{
GNUNET_break_op (0);
return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID;
@@ -124,7 +124,7 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
GNUNET_CRYPTO_hash (&sb->subspace,
sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
&sh);
- if (0 != memcmp (nsid, &sh, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (nsid, &sh, sizeof (struct GNUNET_HashCode)))
{
GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "block-fs",
_
@@ -167,7 +167,7 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
static int
block_plugin_fs_get_key (void *cls, enum GNUNET_BLOCK_Type type,
const void *block, size_t block_size,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
const struct KBlock *kb;
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 @@
static struct PeerContext p1;
-static GNUNET_HashCode nsid;
+static struct GNUNET_HashCode nsid;
static struct GNUNET_FS_Uri *sks_expect_uri;
@@ -314,7 +314,7 @@ adv_cont (void *cls, const struct GNUNET_FS_Uri *uri, const char *emsg)
static void
-ns_iterator (void *cls, const char *name, const GNUNET_HashCode * id)
+ns_iterator (void *cls, const char *name, const struct GNUNET_HashCode * id)
{
int *ok = cls;
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,
struct GNSNameRecordBlock *nrb;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
struct GNUNET_CRYPTO_ShortHashCode zhash;
- GNUNET_HashCode xor_hash;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode xor_hash;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
uint32_t rd_payload_length;
char* nrb_data = NULL;
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,
static void
process_auth_discovery_dht_result(void* cls,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -327,10 +327,10 @@ process_auth_discovery_ns_result(void* cls,
{
uint32_t xquery;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
- GNUNET_HashCode lookup_key;
+ struct GNUNET_HashCode lookup_key;
struct GNUNET_CRYPTO_HashAsciiEncoded lookup_key_string;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
int i;
struct GetPseuAuthorityHandle* gph = (struct GetPseuAuthorityHandle*)cls;
@@ -692,7 +692,7 @@ dht_lookup_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
process_record_result_dht(void* cls,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -817,9 +817,9 @@ resolve_record_dht(struct ResolverHandle *rh)
{
uint32_t xquery;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
- GNUNET_HashCode lookup_key;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode lookup_key;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
struct GNUNET_CRYPTO_HashAsciiEncoded lookup_key_string;
struct RecordLookupHandle *rlh = (struct RecordLookupHandle *)rh->proc_cls;
struct ResolverHandle *rh_heap_root;
@@ -1158,7 +1158,7 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh,
static void
process_delegation_result_dht(void* cls,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -1174,7 +1174,7 @@ process_delegation_result_dht(void* cls,
int i;
int rd_size;
struct GNUNET_CRYPTO_ShortHashCode zone, name_hash;
- GNUNET_HashCode zone_hash_double, name_hash_double;
+ struct GNUNET_HashCode zone_hash_double, name_hash_double;
rh = (struct ResolverHandle *)cls;
@@ -1692,9 +1692,9 @@ resolve_delegation_dht(struct ResolverHandle *rh)
{
uint32_t xquery;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
- GNUNET_HashCode lookup_key;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode lookup_key;
struct ResolverHandle *rh_heap_root;
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 @@
*/
static enum GNUNET_BLOCK_EvaluationResult
block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
size_t reply_block_size)
{
char* name;
- GNUNET_HashCode pkey_hash_double;
- GNUNET_HashCode query_key;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode mhash;
- GNUNET_HashCode chash;
+ struct GNUNET_HashCode pkey_hash_double;
+ struct GNUNET_HashCode query_key;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode mhash;
+ struct GNUNET_HashCode chash;
struct GNUNET_CRYPTO_ShortHashCode pkey_hash;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
struct GNSNameRecordBlock *nrb;
@@ -218,14 +218,14 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
static int
block_plugin_gns_get_key (void *cls, enum GNUNET_BLOCK_Type type,
const void *block, size_t block_size,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD)
return GNUNET_SYSERR;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
struct GNUNET_CRYPTO_ShortHashCode pkey_hash;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode pkey_hash_double;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode pkey_hash_double;
struct GNSNameRecordBlock *nrb = (struct GNSNameRecordBlock *)block;
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)
struct GNSNameRecordBlock *nrb;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
struct GNUNET_CRYPTO_ShortHashCode zone_hash;
- GNUNET_HashCode xor_hash;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode xor_hash;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
uint32_t rd_payload_length;
char* nrb_data = NULL;
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)
struct GNSNameRecordBlock *nrb;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
struct GNUNET_CRYPTO_ShortHashCode zone_hash;
- GNUNET_HashCode xor_hash;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode xor_hash;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
uint32_t rd_payload_length;
char* nrb_data = NULL;
struct GNUNET_CRYPTO_RsaSignature *sig;
@@ -348,9 +348,9 @@ put_www_dht(void *cls, int success)
struct GNSNameRecordBlock *nrb;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
struct GNUNET_CRYPTO_ShortHashCode zone_hash;
- GNUNET_HashCode xor_hash;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode xor_hash;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
uint32_t rd_payload_length;
char* nrb_data = NULL;
struct GNUNET_CRYPTO_RsaSignature *sig;
@@ -428,9 +428,9 @@ put_pkey_dht(void *cls, int32_t success, const char *emsg)
struct GNSNameRecordBlock *nrb;
struct GNUNET_CRYPTO_ShortHashCode name_hash;
struct GNUNET_CRYPTO_ShortHashCode zone_hash;
- GNUNET_HashCode xor_hash;
- GNUNET_HashCode name_hash_double;
- GNUNET_HashCode zone_hash_double;
+ struct GNUNET_HashCode xor_hash;
+ struct GNUNET_HashCode name_hash_double;
+ struct GNUNET_HashCode zone_hash_double;
uint32_t rd_payload_length;
char* nrb_data = NULL;
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
* The descriptor for the service
* (a peer may provide more than one service)
*/
- GNUNET_HashCode service_descriptor;
+ struct GNUNET_HashCode service_descriptor;
/**
* 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
* used as the key for decryption; the xor of this identifier
* and the hash of the "keyspace" is the datastore-query hash).
*/
- GNUNET_HashCode identifier;
+ struct GNUNET_HashCode identifier;
/**
* Public key of the namespace.
@@ -153,7 +153,7 @@ struct OnDemandBlock
* file that was indexed (used to uniquely
* identify the plaintext file).
*/
- GNUNET_HashCode file_id;
+ struct GNUNET_HashCode file_id;
/**
* 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;
* @param hc where to store the result.
*/
void
-GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, uint32_t mingle_number,
- GNUNET_HashCode * hc);
+GNUNET_BLOCK_mingle_hash (const struct GNUNET_HashCode * in, uint32_t mingle_number,
+ struct GNUNET_HashCode * hc);
/**
@@ -204,7 +204,7 @@ GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
enum GNUNET_BLOCK_EvaluationResult
GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
@@ -227,7 +227,7 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
int
GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
enum GNUNET_BLOCK_Type type, const void *block,
- size_t block_size, GNUNET_HashCode * key);
+ size_t block_size, struct GNUNET_HashCode * key);
@@ -243,7 +243,7 @@ GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
*/
struct GNUNET_CONTAINER_BloomFilter *
GNUNET_BLOCK_construct_bloomfilter (int32_t bf_mutator,
- const GNUNET_HashCode * seen_results,
+ const struct GNUNET_HashCode * seen_results,
unsigned int seen_results_count);
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
GNUNET_BLOCK_Type
type,
const
- GNUNET_HashCode
+ struct GNUNET_HashCode
* query,
struct
GNUNET_CONTAINER_BloomFilter
@@ -90,7 +90,7 @@ typedef int (*GNUNET_BLOCK_GetKeyFunction) (void *cls,
enum GNUNET_BLOCK_Type type,
const void *block,
size_t block_size,
- GNUNET_HashCode * key);
+ struct GNUNET_HashCode * key);
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);
*/
typedef int (*GNUNET_CHAT_MessageCallback) (void *cls,
struct GNUNET_CHAT_Room * room,
- const GNUNET_HashCode * sender,
+ const struct GNUNET_HashCode * sender,
const struct
GNUNET_CONTAINER_MetaData *
member_info, const char *message,
@@ -156,7 +156,7 @@ typedef int (*GNUNET_CHAT_MessageConfirmation) (void *cls,
uint32_t orig_seq_number,
struct GNUNET_TIME_Absolute
timestamp,
- const GNUNET_HashCode *
+ const struct GNUNET_HashCode *
receiver);
/**
@@ -195,7 +195,7 @@ GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_CHAT_MemberListCallback memberCallback,
void *member_cls,
GNUNET_CHAT_MessageConfirmation confirmationCallback,
- void *confirmation_cls, GNUNET_HashCode * me);
+ void *confirmation_cls, struct GNUNET_HashCode * me);
/**
* 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
/**
* @brief 512-bit hashcode
*/
-typedef struct GNUNET_HashCode
+struct GNUNET_HashCode
{
uint32_t bits[512 / 8 / sizeof (uint32_t)]; /* = 16 */
-}
-GNUNET_HashCode;
+};
/**
@@ -237,7 +236,7 @@ GNUNET_HashCode;
*/
struct GNUNET_PeerIdentity
{
- GNUNET_HashCode hashPubKey;
+ struct GNUNET_HashCode hashPubKey;
};
GNUNET_NETWORK_STRUCT_END
@@ -428,7 +427,7 @@ GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
* @return string
*/
const char *
-GNUNET_h2s (const GNUNET_HashCode * hc);
+GNUNET_h2s (const struct GNUNET_HashCode * hc);
/**
@@ -441,7 +440,7 @@ GNUNET_h2s (const GNUNET_HashCode * hc);
* @return string
*/
const char *
-GNUNET_h2s_full (const GNUNET_HashCode * hc);
+GNUNET_h2s_full (const struct GNUNET_HashCode * hc);
/**
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"
* Size of the 'struct EncryptedMessage' of the core (which
* is the per-message overhead of the core).
*/
-#define GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE (24 + sizeof (GNUNET_HashCode))
+#define GNUNET_CONSTANTS_CORE_SIZE_ENCRYPTED_MESSAGE (24 + sizeof (struct GNUNET_HashCode))
/**
* 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;
* @return GNUNET_YES if next was updated
* GNUNET_NO if there are no more entries
*/
-typedef int (*GNUNET_HashCodeIterator) (void *cls, GNUNET_HashCode * next);
+typedef int (*GNUNET_HashCodeIterator) (void *cls, struct GNUNET_HashCode * next);
/**
@@ -121,7 +121,7 @@ GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
*/
int
GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
- *bf, const GNUNET_HashCode * e);
+ *bf, const struct GNUNET_HashCode * e);
/**
@@ -131,7 +131,7 @@ GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
*/
void
GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
- const GNUNET_HashCode * e);
+ const struct GNUNET_HashCode * e);
/**
@@ -141,7 +141,7 @@ GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
*/
void
GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf,
- const GNUNET_HashCode * e);
+ const struct GNUNET_HashCode * e);
/**
@@ -534,7 +534,7 @@ enum GNUNET_CONTAINER_MultiHashMapOption
* GNUNET_NO if not.
*/
typedef int (*GNUNET_CONTAINER_HashMapIterator) (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value);
@@ -571,7 +571,7 @@ GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
*/
void *
GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key);
+ *map, const struct GNUNET_HashCode * key);
/**
@@ -587,7 +587,7 @@ GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
*/
int
GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key, void *value);
+ const struct GNUNET_HashCode * key, void *value);
/**
* Remove all entries for the given key from the map.
@@ -599,7 +599,7 @@ GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
*/
int
GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key);
+ *map, const struct GNUNET_HashCode * key);
/**
@@ -614,7 +614,7 @@ GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
int
GNUNET_CONTAINER_multihashmap_contains (const struct
GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key);
+ const struct GNUNET_HashCode * key);
/**
@@ -630,7 +630,7 @@ GNUNET_CONTAINER_multihashmap_contains (const struct
int
GNUNET_CONTAINER_multihashmap_contains_value (const struct
GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key,
+ *map, const struct GNUNET_HashCode * key,
const void *value);
@@ -648,7 +648,7 @@ GNUNET_CONTAINER_multihashmap_contains_value (const struct
*/
int
GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key, void *value,
+ const struct GNUNET_HashCode * key, void *value,
enum GNUNET_CONTAINER_MultiHashMapOption
opt);
@@ -692,7 +692,7 @@ GNUNET_CONTAINER_multihashmap_iterate (const struct
int
GNUNET_CONTAINER_multihashmap_get_multiple (const struct
GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
GNUNET_CONTAINER_HashMapIterator it,
void *it_cls);
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
/**
- * @brief 0-terminated ASCII encoding of a GNUNET_HashCode.
+ * @brief 0-terminated ASCII encoding of a struct GNUNET_HashCode.
*/
struct GNUNET_CRYPTO_HashAsciiEncoded
{
@@ -251,7 +251,7 @@ GNUNET_NETWORK_STRUCT_END
* @brief IV for sym cipher
*
* NOTE: must be smaller (!) in size than the
- * GNUNET_HashCode.
+ * struct GNUNET_HashCode.
*/
struct GNUNET_CRYPTO_AesInitializationVector
{
@@ -448,7 +448,7 @@ GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector *iv,
* safely cast to char*, a '\\0' termination is set).
*/
void
-GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
+GNUNET_CRYPTO_hash_to_enc (const struct GNUNET_HashCode * block,
struct GNUNET_CRYPTO_HashAsciiEncoded *result);
@@ -465,7 +465,7 @@ GNUNET_CRYPTO_short_hash_to_enc (const struct GNUNET_CRYPTO_ShortHashCode * bloc
/**
- * Convert ASCII encoding back to a 'GNUNET_HashCode'
+ * Convert ASCII encoding back to a 'struct GNUNET_HashCode'
*
* @param enc the encoding
* @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
*/
int
GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen,
- GNUNET_HashCode * result);
+ struct GNUNET_HashCode * result);
/**
@@ -491,7 +491,7 @@ GNUNET_CRYPTO_short_hash_from_string2 (const char *enc, size_t enclen,
/**
- * Convert ASCII encoding back to GNUNET_HashCode
+ * Convert ASCII encoding back to struct GNUNET_HashCode
*
* @param enc the encoding
* @param result where to store the hash code
@@ -536,8 +536,8 @@ GNUNET_CRYPTO_short_hash_cmp (const struct GNUNET_CRYPTO_ShortHashCode * h1,
* @return number between 0 and UINT32_MAX
*/
uint32_t
-GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
- const GNUNET_HashCode * b);
+GNUNET_CRYPTO_hash_distance_u32 (const struct GNUNET_HashCode * a,
+ const struct GNUNET_HashCode * b);
/**
@@ -548,7 +548,7 @@ GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
* @param ret pointer to where to write the hashcode
*/
void
-GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
+GNUNET_CRYPTO_hash (const void *block, size_t size, struct GNUNET_HashCode * ret);
/**
@@ -598,7 +598,7 @@ GNUNET_CRYPTO_short_hash_from_truncation (const struct GNUNET_HashCode *dh,
void
GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
const void *plaintext, size_t plaintext_len,
- GNUNET_HashCode * hmac);
+ struct GNUNET_HashCode * hmac);
/**
@@ -609,7 +609,7 @@ GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
* @param res resulting hash, NULL on error
*/
typedef void (*GNUNET_CRYPTO_HashCompletedCallback) (void *cls,
- const GNUNET_HashCode *
+ const struct GNUNET_HashCode *
res);
@@ -652,7 +652,7 @@ GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
*/
void
GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
- GNUNET_HashCode * result);
+ struct GNUNET_HashCode * result);
/**
@@ -663,9 +663,9 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
* @param result set to b - a
*/
void
-GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
- const GNUNET_HashCode * b,
- GNUNET_HashCode * result);
+GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a,
+ const struct GNUNET_HashCode * b,
+ struct GNUNET_HashCode * result);
/**
@@ -676,9 +676,9 @@ GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
* @param result set to a + delta
*/
void
-GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
- const GNUNET_HashCode * delta,
- GNUNET_HashCode * result);
+GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a,
+ const struct GNUNET_HashCode * delta,
+ struct GNUNET_HashCode * result);
/**
@@ -689,8 +689,8 @@ GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
* @param result set to a ^ b
*/
void
-GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
- GNUNET_HashCode * result);
+GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_HashCode * b,
+ struct GNUNET_HashCode * result);
/**
@@ -701,7 +701,7 @@ GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
* @param iv set to a valid initialization vector
*/
void
-GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
+GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc,
struct GNUNET_CRYPTO_AesSessionKey *skey,
struct GNUNET_CRYPTO_AesInitializationVector
*iv);
@@ -715,11 +715,11 @@ GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
* @return Bit \a bit from hashcode \a code, -1 for invalid index
*/
int
-GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
+GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bit);
/**
* Determine how many low order bits match in two
- * GNUNET_HashCodes. i.e. - 010011 and 011111 share
+ * struct GNUNET_HashCodes. i.e. - 010011 and 011111 share
* the first two lowest order bits, and therefore the
* return value is two (NOT XOR distance, nor how many
* bits match absolutely!).
@@ -730,8 +730,8 @@ GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
* @return the number of bits that match
*/
unsigned int
-GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
- const GNUNET_HashCode * second);
+GNUNET_CRYPTO_hash_matching_bits (const struct GNUNET_HashCode * first,
+ const struct GNUNET_HashCode * second);
/**
@@ -743,7 +743,7 @@ GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
* @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
*/
int
-GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2);
+GNUNET_CRYPTO_hash_cmp (const struct GNUNET_HashCode * h1, const struct GNUNET_HashCode * h2);
/**
@@ -756,9 +756,9 @@ GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2);
* @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2.
*/
int
-GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
- const GNUNET_HashCode * h2,
- const GNUNET_HashCode * target);
+GNUNET_CRYPTO_hash_xorcmp (const struct GNUNET_HashCode * h1,
+ const struct GNUNET_HashCode * h2,
+ const struct GNUNET_HashCode * target);
/**
@@ -949,7 +949,7 @@ GNUNET_CRYPTO_setup_hostkey (const char *cfg_name);
* @return some private key purely dependent on input
*/
struct GNUNET_CRYPTO_RsaPrivateKey *
-GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc);
+GNUNET_CRYPTO_rsa_key_create_from_hash (const struct GNUNET_HashCode * hc);
/**
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);
*/
typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
size_t size, const char *data,
enum GNUNET_BLOCK_Type type);
@@ -101,7 +101,7 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
*/
int
GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
- const GNUNET_HashCode * key, size_t size,
+ const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time);
@@ -119,7 +119,7 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
*/
unsigned int
GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
- const GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
+ const struct GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
GNUNET_DATACACHE_Iterator iter, void *iter_cls);
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"
* @param size number of bytes that were made available
*/
typedef void (*GNUNET_DATACACHE_DeleteNotifyCallback) (void *cls,
- const GNUNET_HashCode *
+ const struct GNUNET_HashCode *
key, size_t size);
@@ -109,7 +109,7 @@ struct GNUNET_DATACACHE_PluginFunctions
* @param discard_time when to discard the value in any case
* @return 0 on error, number of bytes used otherwise
*/
- size_t (*put) (void *cls, const GNUNET_HashCode * key, size_t size,
+ size_t (*put) (void *cls, const struct GNUNET_HashCode * key, size_t size,
const char *data, enum GNUNET_BLOCK_Type type,
struct GNUNET_TIME_Absolute discard_time);
@@ -125,7 +125,7 @@ struct GNUNET_DATACACHE_PluginFunctions
* @param iter_cls closure for iter
* @return the number of results found
*/
- unsigned int (*get) (void *cls, const GNUNET_HashCode * key,
+ unsigned int (*get) (void *cls, const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type,
GNUNET_DATACACHE_Iterator iter, void *iter_cls);
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
* @return GNUNET_OK to keep the item
* GNUNET_NO to delete the item
*/
-typedef int (*PluginDatumProcessor) (void *cls, const GNUNET_HashCode * key,
+typedef int (*PluginDatumProcessor) (void *cls, const struct GNUNET_HashCode * key,
uint32_t size, const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
@@ -127,7 +127,7 @@ typedef unsigned long long (*PluginEstimateSize) (void *cls);
* @return GNUNET_OK on success,
* GNUNET_SYSERR on failure
*/
-typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size,
+typedef int (*PluginPut) (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
uint32_t replication,
@@ -142,7 +142,7 @@ typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size,
* @param count how many values are stored under this key in the datastore
*/
typedef void (*PluginKeyProcessor) (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
unsigned int count);
@@ -178,8 +178,8 @@ typedef void (*PluginGetKeys) (void *cls,
* @param proc_cls closure for proc
*/
typedef void (*PluginGetKey) (void *cls, uint64_t offset,
- const GNUNET_HashCode * key,
- const GNUNET_HashCode * vhash,
+ const struct GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * vhash,
enum GNUNET_BLOCK_Type type,
PluginDatumProcessor proc, void *proc_cls);
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,
*/
struct GNUNET_DATASTORE_QueueEntry *
GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
- const GNUNET_HashCode * key, size_t size,
+ const struct GNUNET_HashCode * key, size_t size,
const void *data, enum GNUNET_BLOCK_Type type,
uint32_t priority, uint32_t anonymity,
uint32_t replication,
@@ -245,7 +245,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
*/
struct GNUNET_DATASTORE_QueueEntry *
GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
- const GNUNET_HashCode * key, size_t size,
+ const struct GNUNET_HashCode * key, size_t size,
const void *data, unsigned int queue_priority,
unsigned int max_queue_size,
struct GNUNET_TIME_Relative timeout,
@@ -268,7 +268,7 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
* maybe 0 if no unique identifier is available
*/
typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
size_t size, const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority,
@@ -300,7 +300,7 @@ typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
*/
struct GNUNET_DATASTORE_QueueEntry *
GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
enum GNUNET_BLOCK_Type type,
unsigned int queue_priority,
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,
* (size too big)
*/
struct GNUNET_DHT_PutHandle *
-GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const GNUNET_HashCode * key,
+GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const struct GNUNET_HashCode * key,
uint32_t desired_replication_level,
enum GNUNET_DHT_RouteOption options,
enum GNUNET_BLOCK_Type type, size_t size, const char *data,
@@ -205,7 +205,7 @@ GNUNET_DHT_put_cancel (struct GNUNET_DHT_PutHandle *ph);
*/
typedef void (*GNUNET_DHT_GetIterator) (void *cls,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *
get_path, unsigned int get_path_length,
const struct GNUNET_PeerIdentity *
@@ -234,7 +234,7 @@ typedef void (*GNUNET_DHT_GetIterator) (void *cls,
*/
struct GNUNET_DHT_GetHandle *
GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
- enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
+ enum GNUNET_BLOCK_Type type, const struct GNUNET_HashCode * key,
uint32_t desired_replication_level,
enum GNUNET_DHT_RouteOption options, const void *xquery,
size_t xquery_size, GNUNET_DHT_GetIterator iter,
@@ -279,7 +279,7 @@ typedef void (*GNUNET_DHT_MonitorGetCB) (void *cls,
uint32_t desired_replication_level,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
- const GNUNET_HashCode * key);
+ const struct GNUNET_HashCode * key);
/**
* Callback called on each GET reply going through the DHT.
@@ -304,7 +304,7 @@ typedef void (*GNUNET_DHT_MonitorGetRespCB) (void *cls,
* put_path,
unsigned int put_path_length,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size);
@@ -331,7 +331,7 @@ typedef void (*GNUNET_DHT_MonitorPutCB) (void *cls,
unsigned int path_length,
const struct GNUNET_PeerIdentity *path,
struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const void *data,
size_t size);
@@ -351,7 +351,7 @@ typedef void (*GNUNET_DHT_MonitorPutCB) (void *cls,
struct GNUNET_DHT_MonitorHandle *
GNUNET_DHT_monitor_start (struct GNUNET_DHT_Handle *handle,
enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
GNUNET_DHT_MonitorGetCB get_cb,
GNUNET_DHT_MonitorGetRespCB get_resp_cb,
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,
* @param key wherer to store the unique key
*/
void
-GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key);
+GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, struct GNUNET_HashCode * key);
/**
* 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,
* @return an FS URI for the given namespace and identifier
*/
struct GNUNET_FS_Uri *
-GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id);
+GNUNET_FS_uri_sks_create_from_nsid (struct GNUNET_HashCode * nsid, const char *id);
/**
@@ -354,7 +354,7 @@ GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id);
*/
int
GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
- GNUNET_HashCode * nsid);
+ struct GNUNET_HashCode * nsid);
/**
@@ -1383,7 +1383,7 @@ struct GNUNET_FS_ProgressInfo
/**
* Hash-identifier for the namespace.
*/
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
} namespace;
@@ -2112,7 +2112,7 @@ GNUNET_FS_publish_sks_cancel (struct GNUNET_FS_PublishSksContext *psc);
* @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
*/
typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename,
- const GNUNET_HashCode * file_id);
+ const struct GNUNET_HashCode * file_id);
/**
@@ -2252,7 +2252,7 @@ GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze);
* @param id hash identifier for the namespace
*/
typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name,
- const GNUNET_HashCode * id);
+ const struct GNUNET_HashCode * id);
/**
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"
* @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
*/
typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls,
- const GNUNET_HashCode * pseudonym,
+ const struct GNUNET_HashCode * pseudonym,
const char *name,
const char *unique_name,
const struct GNUNET_CONTAINER_MetaData
@@ -67,7 +67,7 @@ typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls,
*/
int
GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, int delta);
+ const struct GNUNET_HashCode * nsid, int delta);
/**
* Add a pseudonym to the set of known pseudonyms.
@@ -80,7 +80,7 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
void
GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * id,
+ const struct GNUNET_HashCode * id,
const struct GNUNET_CONTAINER_MetaData *meta);
@@ -127,7 +127,7 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
*/
char *
GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, const char *name, unsigned int *suffix);
+ const struct GNUNET_HashCode * nsid, const char *name, unsigned int *suffix);
/**
* Get namespace name, metadata and rank
@@ -152,7 +152,7 @@ GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
int
GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta,
+ const struct GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta,
int32_t *ret_rank, char **ret_name, int *name_is_a_dup);
@@ -166,7 +166,7 @@ GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
int
GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *ns_uname, GNUNET_HashCode * nsid);
+ const char *ns_uname, struct GNUNET_HashCode * nsid);
/**
* Set the pseudonym metadata, rank and name.
@@ -182,7 +182,7 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
int
GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, const char *name,
+ const struct GNUNET_HashCode * nsid, const char *name,
const struct GNUNET_CONTAINER_MetaData *md, int rank);
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
/**
* Destionation of the edge.
*/
- GNUNET_HashCode destination;
+ struct GNUNET_HashCode destination;
};
/**
@@ -134,7 +134,7 @@ GNUNET_REGEX_get_computed_regex (struct GNUNET_REGEX_Automaton *a);
*/
unsigned int
GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
- GNUNET_HashCode * key);
+ struct GNUNET_HashCode * key);
/**
* 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,
*/
int
GNUNET_REGEX_check_proof (const char *proof,
- const GNUNET_HashCode *key);
+ const struct GNUNET_HashCode *key);
/**
* Iterator callback function.
@@ -159,7 +159,7 @@ GNUNET_REGEX_check_proof (const char *proof,
* @param edges edges leaving current state.
*/
typedef void (*GNUNET_REGEX_KeyIterator)(void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
const char *proof,
int accepting,
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,
int result_af,
uint8_t protocol,
const struct GNUNET_PeerIdentity *peer,
- const GNUNET_HashCode *serv,
+ const struct GNUNET_HashCode *serv,
int nac,
struct GNUNET_TIME_Absolute expiration_time,
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;
static int
map_check_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
int *fail = cls;
@@ -142,7 +142,7 @@ map_check_it (void *cls,
static int
map_cleanup_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
struct PeerContainer *pc = value;
@@ -451,7 +451,7 @@ return mlen;
int map_ping_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
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,
* GNUNET_NO if not.
*/
static int
-match_iterator (void *cls, const GNUNET_HashCode *key, void *value)
+match_iterator (void *cls, const struct GNUNET_HashCode *key, void *value)
{
struct LockMatch *match = cls;
struct Lock *lock = value;
@@ -803,7 +803,7 @@ client_disconnect_cb (void *cls, struct GNUNET_SERVER_Client *client)
*/
static int
lock_delete_iterator (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
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,
* GNUNET_NO if not.
*/
static int
-match_iterator (void *cls, const GNUNET_HashCode *key, void *value)
+match_iterator (void *cls, const struct GNUNET_HashCode *key, void *value)
{
struct LockingRequestMatch *match = cls;
struct GNUNET_LOCKMANAGER_LockingRequest *lr = value;
@@ -355,7 +355,7 @@ call_status_cb_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
*/
static int
release_iterator(void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
struct GNUNET_LOCKMANAGER_Handle *h = cls;
@@ -472,7 +472,7 @@ handle_replies (void *cls,
*/
static int
free_iterator(void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
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;
* GNUNET_NO if not.
*/
static int
-announce_application (void *cls, const GNUNET_HashCode * key, void *value)
+announce_application (void *cls, const struct GNUNET_HashCode * key, void *value)
{
/* FIXME are hashes in multihash map equal on all aquitectures? */
/* FIXME: keep return value of 'put' to possibly cancel!? */
@@ -733,7 +733,7 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
*/
static void
dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -818,7 +818,7 @@ client_get (struct GNUNET_SERVER_Client *client)
static int
client_is_subscribed (uint16_t message_type, struct MeshClient *c)
{
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc);
return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc);
@@ -907,7 +907,7 @@ client_knows_tunnel (struct MeshClient *c, struct MeshTunnel *t)
static void
client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash);
GNUNET_break (GNUNET_YES ==
@@ -931,7 +931,7 @@ client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
static void
client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t)
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
if (c == t->owner)
{
@@ -1031,7 +1031,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg,
{
/* This client doesn't know the tunnel */
struct GNUNET_MESH_TunnelNotification tmsg;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
tmsg.header.size = htons (sizeof (tmsg));
tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
@@ -1232,7 +1232,7 @@ peer_info_get_short (const GNUNET_PEER_Id peer)
* @return always GNUNET_YES, to keep iterating
*/
static int
-peer_info_delete_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
+peer_info_delete_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshTunnel *t = cls;
struct MeshPeerInfo *peer = value;
@@ -1476,7 +1476,7 @@ peer_info_connect (struct MeshPeerInfo *peer, struct MeshTunnel *t)
}
else
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
path_destroy (p);
send_client_peer_connected (t, myid);
@@ -1913,7 +1913,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static struct MeshTunnel *
tunnel_get_incoming (MESH_TunnelNumber tid)
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV);
GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
@@ -1938,7 +1938,7 @@ tunnel_get_by_local_id (struct MeshClient *c, MESH_TunnelNumber tid)
}
else
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash);
@@ -1958,7 +1958,7 @@ static struct MeshTunnel *
tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid)
{
struct MESH_TunnelID id;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
id.oid = pi;
id.tid = tid;
@@ -2334,7 +2334,7 @@ static int
tunnel_destroy (struct MeshTunnel *t)
{
struct MeshClient *c;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
unsigned int i;
int r;
@@ -2498,7 +2498,7 @@ tunnel_delete_peer (struct MeshTunnel *t, GNUNET_PEER_Id peer)
* @return GNUNET_OK on success
*/
static int
-tunnel_destroy_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+tunnel_destroy_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshTunnel *t = value;
struct MeshClient *c = cls;
@@ -2916,7 +2916,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
MESH_TunnelNumber tid;
struct GNUNET_MESH_ManipulatePath *msg;
struct GNUNET_PeerIdentity *pi;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
struct MeshPeerPath *path;
struct MeshPeerInfo *dest_peer_info;
struct MeshPeerInfo *orig_peer_info;
@@ -3574,7 +3574,7 @@ static struct GNUNET_CORE_MessageHandler core_handlers[] = {
* @return GNUNET_OK on success
*/
static int
-deregister_app (void *cls, const GNUNET_HashCode * key, void *value)
+deregister_app (void *cls, const struct GNUNET_HashCode * key, void *value)
{
GNUNET_break (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (applications, key,
@@ -3689,7 +3689,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
*/
static void
dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -3737,7 +3737,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
*/
static void
dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -3888,7 +3888,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
if (napps > 0)
{
GNUNET_MESH_ApplicationType at;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
c->apps = GNUNET_CONTAINER_multihashmap_create (napps);
for (i = 0; i < napps; i++)
@@ -3911,7 +3911,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
if (ntypes > 0)
{
uint16_t u16;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
t = (uint16_t *) & a[napps];
c->types = GNUNET_CONTAINER_multihashmap_create (ntypes);
@@ -4238,7 +4238,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client,
struct GNUNET_MESH_ConnectPeerByType *connect_msg;
struct MeshClient *c;
struct MeshTunnel *t;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
MESH_TunnelNumber tid;
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)
* GNUNET_NO if not.
*/
static int
-shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
+shutdown_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshTunnel *t = value;
@@ -4735,7 +4735,7 @@ shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
* GNUNET_NO if not.
*/
static int
-shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value)
+shutdown_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshPeerInfo *p = value;
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;
* GNUNET_NO if not.
*/
static int
-announce_application (void *cls, const GNUNET_HashCode * key, void *value)
+announce_application (void *cls, const struct GNUNET_HashCode * key, void *value)
{
/* FIXME are hashes in multihash map equal on all aquitectures? */
/* FIXME: keep return value of 'put' to possibly cancel!? */
@@ -733,7 +733,7 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
*/
static void
dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -818,7 +818,7 @@ client_get (struct GNUNET_SERVER_Client *client)
static int
client_is_subscribed (uint16_t message_type, struct MeshClient *c)
{
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
GNUNET_CRYPTO_hash (&message_type, sizeof (uint16_t), &hc);
return GNUNET_CONTAINER_multihashmap_contains (c->types, &hc);
@@ -907,7 +907,7 @@ client_knows_tunnel (struct MeshClient *c, struct MeshTunnel *t)
static void
client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
GNUNET_CRYPTO_hash(&t->local_tid_dest, sizeof (MESH_TunnelNumber), &hash);
GNUNET_break (GNUNET_YES ==
@@ -931,7 +931,7 @@ client_ignore_tunnel (struct MeshClient *c, struct MeshTunnel *t)
static void
client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t)
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
if (c == t->owner)
{
@@ -1031,7 +1031,7 @@ send_subscribed_clients (const struct GNUNET_MessageHeader *msg,
{
/* This client doesn't know the tunnel */
struct GNUNET_MESH_TunnelNotification tmsg;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
tmsg.header.size = htons (sizeof (tmsg));
tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
@@ -1232,7 +1232,7 @@ peer_info_get_short (const GNUNET_PEER_Id peer)
* @return always GNUNET_YES, to keep iterating
*/
static int
-peer_info_delete_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
+peer_info_delete_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshTunnel *t = cls;
struct MeshPeerInfo *peer = value;
@@ -1476,7 +1476,7 @@ peer_info_connect (struct MeshPeerInfo *peer, struct MeshTunnel *t)
}
else
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
path_destroy (p);
send_client_peer_connected (t, myid);
@@ -1913,7 +1913,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static struct MeshTunnel *
tunnel_get_incoming (MESH_TunnelNumber tid)
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
GNUNET_assert (tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV);
GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
@@ -1938,7 +1938,7 @@ tunnel_get_by_local_id (struct MeshClient *c, MESH_TunnelNumber tid)
}
else
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash);
return GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash);
@@ -1958,7 +1958,7 @@ static struct MeshTunnel *
tunnel_get_by_pi (GNUNET_PEER_Id pi, MESH_TunnelNumber tid)
{
struct MESH_TunnelID id;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
id.oid = pi;
id.tid = tid;
@@ -2334,7 +2334,7 @@ static int
tunnel_destroy (struct MeshTunnel *t)
{
struct MeshClient *c;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
unsigned int i;
int r;
@@ -2498,7 +2498,7 @@ tunnel_delete_peer (struct MeshTunnel *t, GNUNET_PEER_Id peer)
* @return GNUNET_OK on success
*/
static int
-tunnel_destroy_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+tunnel_destroy_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshTunnel *t = value;
struct MeshClient *c = cls;
@@ -2916,7 +2916,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
MESH_TunnelNumber tid;
struct GNUNET_MESH_ManipulatePath *msg;
struct GNUNET_PeerIdentity *pi;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
struct MeshPeerPath *path;
struct MeshPeerInfo *dest_peer_info;
struct MeshPeerInfo *orig_peer_info;
@@ -3574,7 +3574,7 @@ static struct GNUNET_CORE_MessageHandler core_handlers[] = {
* @return GNUNET_OK on success
*/
static int
-deregister_app (void *cls, const GNUNET_HashCode * key, void *value)
+deregister_app (void *cls, const struct GNUNET_HashCode * key, void *value)
{
GNUNET_break (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (applications, key,
@@ -3689,7 +3689,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
*/
static void
dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -3737,7 +3737,7 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp,
*/
static void
dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
const struct GNUNET_PeerIdentity *get_path,
unsigned int get_path_length,
const struct GNUNET_PeerIdentity *put_path,
@@ -3888,7 +3888,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
if (napps > 0)
{
GNUNET_MESH_ApplicationType at;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
c->apps = GNUNET_CONTAINER_multihashmap_create (napps);
for (i = 0; i < napps; i++)
@@ -3911,7 +3911,7 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
if (ntypes > 0)
{
uint16_t u16;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
t = (uint16_t *) & a[napps];
c->types = GNUNET_CONTAINER_multihashmap_create (ntypes);
@@ -4238,7 +4238,7 @@ handle_local_connect_by_type (void *cls, struct GNUNET_SERVER_Client *client,
struct GNUNET_MESH_ConnectPeerByType *connect_msg;
struct MeshClient *c;
struct MeshTunnel *t;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
MESH_TunnelNumber tid;
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)
* GNUNET_NO if not.
*/
static int
-shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
+shutdown_tunnel (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshTunnel *t = value;
@@ -4735,7 +4735,7 @@ shutdown_tunnel (void *cls, const GNUNET_HashCode * key, void *value)
* GNUNET_NO if not.
*/
static int
-shutdown_peer (void *cls, const GNUNET_HashCode * key, void *value)
+shutdown_peer (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MeshPeerInfo *p = value;
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)
* @return GNUNET_YES if we should continue to iterate, GNUNET_NO if not.
*/
static int
-iterate_free (void *cls, const GNUNET_HashCode * key, void *value)
+iterate_free (void *cls, const struct GNUNET_HashCode * key, void *value)
{
GNUNET_free (value);
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
}
int zone_to_disk_it (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct GNUNET_NAMESTORE_CryptoContainer * c = value;
@@ -391,7 +391,7 @@ handle_lookup_name_it (void *cls,
struct GNUNET_CRYPTO_RsaSignature *signature_new = NULL;
struct GNUNET_TIME_Absolute e;
struct GNUNET_CRYPTO_ShortHashCode zone_key_hash;
- GNUNET_HashCode long_hash;
+ struct GNUNET_HashCode long_hash;
char *rd_tmp;
char *name_tmp;
size_t rd_ser_len;
@@ -862,7 +862,7 @@ static void handle_record_create (void *cls,
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
struct RecordCreateResponseMessage rcr_msg;
struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
- GNUNET_HashCode long_hash;
+ struct GNUNET_HashCode long_hash;
size_t name_len;
size_t msg_size;
size_t msg_size_exp;
@@ -1116,7 +1116,7 @@ static void handle_record_remove (void *cls,
struct GNUNET_NAMESTORE_CryptoContainer *cc = NULL;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
struct GNUNET_CRYPTO_ShortHashCode pubkey_hash;
- GNUNET_HashCode long_hash;
+ struct GNUNET_HashCode long_hash;
char * pkey_tmp = NULL;
char * name_tmp = NULL;
char * rd_ser = NULL;
@@ -1462,7 +1462,7 @@ void zone_iteraterate_proc (void *cls,
struct GNUNET_CRYPTO_RsaSignature * new_signature;
struct GNUNET_NAMESTORE_CryptoContainer *cc;
struct GNUNET_CRYPTO_ShortHashCode hash;
- GNUNET_HashCode long_hash;
+ struct GNUNET_HashCode long_hash;
struct GNUNET_TIME_Absolute e;
unsigned int rd_count_filtered = 0;
int include;
@@ -1837,7 +1837,7 @@ static void handle_iteration_next (void *cls,
int zonekey_file_it (void *cls, const char *filename)
{
- GNUNET_HashCode long_hash;
+ struct GNUNET_HashCode long_hash;
int *counter = cls;
if ((filename != NULL) && (NULL != strstr(filename, ".zkey")))
{
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;
static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
struct GNUNET_CRYPTO_RsaSignature *s_signature;
-static GNUNET_HashCode s_zone;
+static struct GNUNET_HashCode s_zone;
struct GNUNET_NAMESTORE_RecordData *s_rd;
static char *s_name;
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;
static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
-static GNUNET_HashCode zone;
+static struct GNUNET_HashCode zone;
static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2;
static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2;
-static GNUNET_HashCode zone2;
+static struct GNUNET_HashCode zone2;
static struct GNUNET_NAMESTORE_ZoneIterator *zi;
static int res;
@@ -222,7 +222,7 @@ void zone_proc (void *cls,
/* verify signature returned from name store */
if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key, expire, name, rd_count, rd, signature))
{
- GNUNET_HashCode zone_key_hash;
+ struct GNUNET_HashCode zone_key_hash;
GNUNET_CRYPTO_hash (zone_key, sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone_key_hash);
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);
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;
static struct GNUNET_CRYPTO_RsaPrivateKey * privkey;
static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey;
-static GNUNET_HashCode zone;
+static struct GNUNET_HashCode zone;
static struct GNUNET_CRYPTO_RsaPrivateKey * privkey2;
static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pubkey2;
-static GNUNET_HashCode zone2;
+static struct GNUNET_HashCode zone2;
static struct GNUNET_NAMESTORE_ZoneIterator *zi;
static 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
get_matching_bits (struct GNUNET_TIME_Absolute timestamp,
const struct GNUNET_PeerIdentity *id)
{
- GNUNET_HashCode timestamp_hash;
+ struct GNUNET_HashCode timestamp_hash;
GNUNET_CRYPTO_hash (&timestamp.abs_value, sizeof (timestamp.abs_value),
&timestamp_hash);
@@ -699,7 +699,7 @@ setup_flood_message (unsigned int slot, struct GNUNET_TIME_Absolute ts)
* @return GNUNET_OK (continue to iterate)
*/
static int
-schedule_current_round (void *cls, const GNUNET_HashCode * key, void *value)
+schedule_current_round (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct NSEPeerEntry *peer_entry = value;
struct GNUNET_TIME_Relative delay;
@@ -791,7 +791,7 @@ update_flood_message (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @return the number of leading zero bits.
*/
static unsigned int
-count_leading_zeroes (const GNUNET_HashCode * hash)
+count_leading_zeroes (const struct GNUNET_HashCode * hash)
{
unsigned int hash_count;
@@ -817,7 +817,7 @@ check_proof_of_work (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey,
{
char buf[sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) +
sizeof (val)] GNUNET_ALIGN;
- GNUNET_HashCode result;
+ struct GNUNET_HashCode result;
memcpy (buf, &val, sizeof (val));
memcpy (&buf[sizeof (val)], pkey,
@@ -862,7 +862,7 @@ find_proof (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
uint64_t counter;
char buf[sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded) +
sizeof (uint64_t)] GNUNET_ALIGN;
- GNUNET_HashCode result;
+ struct GNUNET_HashCode result;
unsigned int i;
proof_task = GNUNET_SCHEDULER_NO_TASK;
@@ -952,7 +952,7 @@ verify_message_crypto (const struct GNUNET_NSE_FloodMessage *incoming_flood)
* @return GNUNET_OK (continue to iterate)
*/
static int
-update_flood_times (void *cls, const GNUNET_HashCode * key, void *value)
+update_flood_times (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct NSEPeerEntry *exclude = cls;
struct NSEPeerEntry *peer_entry = value;
@@ -1382,7 +1382,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
GNUNET_SCHEDULER_shutdown ();
return;
}
- if (nse_work_required >= sizeof (GNUNET_HashCode) * 8)
+ if (nse_work_required >= sizeof (struct GNUNET_HashCode) * 8)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("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,
* @return GNUNET_YES (continue to iterate)
*/
static int
-add_to_tc (void *cls, const GNUNET_HashCode * key, void *value)
+add_to_tc (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_SERVER_TransmitContext *tc = cls;
struct HostEntry *pos = value;
@@ -594,7 +594,7 @@ handle_get_all (void *cls, struct GNUNET_SERVER_Client *client,
* FIXME.
*/
static int
-do_notify_entry (void *cls, const GNUNET_HashCode * key, void *value)
+do_notify_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_SERVER_Client *client = cls;
struct HostEntry *he = value;
@@ -631,7 +631,7 @@ handle_notify (void *cls, struct GNUNET_SERVER_Client *client,
* FIXME.
*/
static int
-free_host_entry (void *cls, const GNUNET_HashCode * key, void *value)
+free_host_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct HostEntry *he = value;
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
/**
* Hash of the state.
*/
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
/**
* Proof for this state.
@@ -2435,7 +2435,7 @@ GNUNET_REGEX_get_computed_regex (struct GNUNET_REGEX_Automaton *a)
*/
unsigned int
GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
unsigned int size;
@@ -2461,7 +2461,7 @@ GNUNET_REGEX_get_first_key (const char *input_string, unsigned int string_len,
* @return GNUNET_OK if the proof is valid for the given key
*/
int
-GNUNET_REGEX_check_proof (const char *proof, const GNUNET_HashCode * key)
+GNUNET_REGEX_check_proof (const char *proof, const struct GNUNET_HashCode * key)
{
return GNUNET_OK;
}
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 @@
#include "gnunet_regex_lib.h"
void
-key_iterator (void *cls, const GNUNET_HashCode * key, const char *proof,
+key_iterator (void *cls, const struct GNUNET_HashCode * key, const char *proof,
int accepting, unsigned int num_edges,
const struct GNUNET_REGEX_Edge *edges)
{
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
* @param hash set to uid (extended with zeros)
*/
static void
-hash_from_uid (uint32_t uid, GNUNET_HashCode * hash)
+hash_from_uid (uint32_t uid, struct GNUNET_HashCode * hash)
{
- memset (hash, 0, sizeof (GNUNET_HashCode));
+ memset (hash, 0, sizeof (struct GNUNET_HashCode));
*((uint32_t *) hash) = uid;
}
@@ -1050,7 +1050,7 @@ hash_from_uid (uint32_t uid, GNUNET_HashCode * hash)
* @param hash set to uid (extended with zeros)
*/
static void
-uid_from_hash (const GNUNET_HashCode * hash, uint32_t * uid)
+uid_from_hash (const struct GNUNET_HashCode * hash, uint32_t * uid)
{
memcpy (uid, hash, sizeof (uint32_t));
}
@@ -1579,8 +1579,8 @@ remove_connections (struct GNUNET_TESTING_PeerGroup *pg, unsigned int first,
struct PeerConnection **second_tail;
#else
- GNUNET_HashCode hash_first;
- GNUNET_HashCode hash_second;
+ struct GNUNET_HashCode hash_first;
+ struct GNUNET_HashCode hash_second;
hash_from_uid (first, &hash_first);
hash_from_uid (second, &hash_second);
@@ -2470,7 +2470,7 @@ create_clique (struct GNUNET_TESTING_PeerGroup *pg,
* GNUNET_NO if not.
*/
static int
-unblacklist_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+unblacklist_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct UnblacklistContext *un_ctx = cls;
uint32_t second_pos;
@@ -2760,7 +2760,7 @@ create_ring (struct GNUNET_TESTING_PeerGroup *pg,
* "fixing" now.
*/
static int
-friend_file_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+friend_file_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
FILE *temp_friend_handle = cls;
struct GNUNET_TESTING_Daemon *peer = value;
@@ -2797,7 +2797,7 @@ struct BlacklistContext
* @return GNUNET_YES to continue iteration
*/
static int
-blacklist_file_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+blacklist_file_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct BlacklistContext *blacklist_ctx = cls;
struct GNUNET_TESTING_Daemon *peer = value;
@@ -3682,7 +3682,7 @@ schedule_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @return GNUNET_YES to continue iteration
*/
static int
-connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ConnectTopologyContext *ct_ctx = cls;
struct PeerData *first = ct_ctx->first;
@@ -3713,7 +3713,7 @@ connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_YES to continue iteration
*/
static int
-copy_topology_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+copy_topology_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct PeerData *first = cls;
@@ -4108,12 +4108,12 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg,
* @return GNUNET_YES to continue iteration
*/
static int
-random_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+random_connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct RandomContext *random_ctx = cls;
double random_number;
uint32_t second_pos;
- GNUNET_HashCode first_hash;
+ struct GNUNET_HashCode first_hash;
random_number =
((double)
@@ -4153,11 +4153,11 @@ random_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_YES to continue iteration
*/
static int
-minimum_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+minimum_connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct MinimumContext *min_ctx = cls;
uint32_t second_pos;
- GNUNET_HashCode first_hash;
+ struct GNUNET_HashCode first_hash;
unsigned int i;
if (GNUNET_CONTAINER_multihashmap_size
@@ -4211,10 +4211,10 @@ minimum_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_YES to continue iteration
*/
static int
-dfs_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
+dfs_connect_iterator (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct DFSContext *dfs_ctx = cls;
- GNUNET_HashCode first_hash;
+ struct GNUNET_HashCode first_hash;
if (dfs_ctx->current == dfs_ctx->chosen)
{
@@ -4538,7 +4538,7 @@ struct FindClosestContext
* GNUNET_NO if not.
*/
static int
-find_closest_peers (void *cls, const GNUNET_HashCode * key, void *value)
+find_closest_peers (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct FindClosestContext *closest_ctx = cls;
struct GNUNET_TESTING_Daemon *daemon = value;
@@ -4627,7 +4627,7 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
struct PeerConnection *peer_iter;
#else
struct DFSContext dfs_ctx;
- GNUNET_HashCode second_hash;
+ struct GNUNET_HashCode second_hash;
#endif
#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)
* @return GNUNET_YES (always: continue to iterate)
*/
static int
-free_peer (void *cls, const GNUNET_HashCode * pid, void *value)
+free_peer (void *cls, const struct GNUNET_HashCode * pid, void *value)
{
struct Peer *pos = value;
@@ -573,7 +573,7 @@ struct FindAdvHelloContext
* @return GNUNET_YES (continue iteration)
*/
static int
-find_advertisable_hello (void *cls, const GNUNET_HashCode * pid, void *value)
+find_advertisable_hello (void *cls, const struct GNUNET_HashCode * pid, void *value)
{
struct FindAdvHelloContext *fah = cls;
struct Peer *pos = value;
@@ -659,7 +659,7 @@ schedule_next_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
* @return GNUNET_YES (always)
*/
static int
-reschedule_hellos (void *cls, const GNUNET_HashCode * pid, void *value)
+reschedule_hellos (void *cls, const struct GNUNET_HashCode * pid, void *value)
{
struct Peer *peer = value;
struct Peer *skip = cls;
@@ -743,7 +743,7 @@ connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
* @return GNUNET_YES (continue to iterate)
*/
static int
-try_add_peers (void *cls, const GNUNET_HashCode * pid, void *value)
+try_add_peers (void *cls, const struct GNUNET_HashCode * pid, void *value)
{
struct Peer *pos = value;
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)
* @return GNUNET_OK (continue to iterate)
*/
static int
-free_blacklist_entry (void *cls, const GNUNET_HashCode * key, void *value)
+free_blacklist_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
{
char *be = value;
@@ -701,7 +701,7 @@ GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
* @return GNUNET_OK if the entry does not match, GNUNET_NO if it matches
*/
static int
-test_blacklisted (void *cls, const GNUNET_HashCode * key, void *value)
+test_blacklisted (void *cls, const struct GNUNET_HashCode * key, void *value)
{
const char *transport_name = cls;
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
{
struct NeighbourMapEntry *n;
const struct SessionDisconnectMessage *sdm;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received DISCONNECT message from peer `%s'\n",
@@ -2972,7 +2972,7 @@ struct IteratorContext
* @return GNUNET_OK (continue to iterate)
*/
static int
-neighbours_iterate (void *cls, const GNUNET_HashCode * key, void *value)
+neighbours_iterate (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct IteratorContext *ic = cls;
struct NeighbourMapEntry *n = value;
@@ -3111,7 +3111,7 @@ GST_neighbours_start (void *cls,
* @return GNUNET_OK (continue to iterate)
*/
static int
-disconnect_all_neighbours (void *cls, const GNUNET_HashCode * key, void *value)
+disconnect_all_neighbours (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct NeighbourMapEntry *n = value;
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
* GNUNET_NO if the entry does match
*/
static int
-validation_entry_match (void *cls, const GNUNET_HashCode * key, void *value)
+validation_entry_match (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ValidationEntryMatchContext *vemc = cls;
struct ValidationEntry *ve = value;
@@ -357,7 +357,7 @@ validation_entry_match (void *cls, const GNUNET_HashCode * key, void *value)
* @return GNUNET_YES (continue to iterate)
*/
static int
-cleanup_validation_entry (void *cls, const GNUNET_HashCode * key, void *value)
+cleanup_validation_entry (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct ValidationEntry *ve = value;
@@ -1171,7 +1171,7 @@ struct IteratorContext
* @return GNUNET_OK (continue to iterate)
*/
static int
-iterate_addresses (void *cls, const GNUNET_HashCode * key, void *value)
+iterate_addresses (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct IteratorContext *ic = cls;
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
static int
session_lookup_by_client_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
struct SessionClientCtx *sc_ctx = cls;
@@ -1129,7 +1129,7 @@ struct SessionItCtx
static int
session_lookup_it (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct SessionItCtx * si_ctx = cls;
@@ -1391,7 +1391,7 @@ tcp_plugin_get_session (void *cls,
static int
session_disconnect_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
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)
* @return GNUNET_OK (continue to iterate)
*/
static int
-disconnect_and_free_it (void *cls, const GNUNET_HashCode * key, void *value)
+disconnect_and_free_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
disconnect_session(value);
return GNUNET_OK;
@@ -857,7 +857,7 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target,
static int
session_cmp_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
struct SessionCompareContext * cctx = cls;
@@ -1461,7 +1461,7 @@ struct LookupContext
static int
-lookup_session_by_addr_it (void *cls, const GNUNET_HashCode * key, void *value)
+lookup_session_by_addr_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct LookupContext *l_ctx = cls;
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
};
int lookup_session_it (void *cls,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
void *value)
{
struct LookupCtx *lctx = cls;
@@ -394,7 +394,7 @@ disconnect_session (struct Session *s)
}
static int
-get_session_delete_it (void *cls, const GNUNET_HashCode * key, void *value)
+get_session_delete_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct Session *s = value;
disconnect_session (s);
@@ -630,7 +630,7 @@ struct gsi_ctx
static int
-get_session_it (void *cls, const GNUNET_HashCode * key, void *value)
+get_session_it (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct gsi_ctx *gsi = cls;
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,
* GNUNET_NO if not.
*/
static int
-neighbour_delete (void *cls, const GNUNET_HashCode * key, void *value)
+neighbour_delete (void *cls, const struct GNUNET_HashCode * key, void *value)
{
struct GNUNET_TRANSPORT_Handle *handle = cls;
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)
* @return string form; will be overwritten by next call to GNUNET_h2s.
*/
const char *
-GNUNET_h2s (const GNUNET_HashCode * hc)
+GNUNET_h2s (const struct GNUNET_HashCode * hc)
{
static struct GNUNET_CRYPTO_HashAsciiEncoded ret;
@@ -921,7 +921,7 @@ GNUNET_h2s (const GNUNET_HashCode * hc)
* @return string form; will be overwritten by next call to GNUNET_h2s_full.
*/
const char *
-GNUNET_h2s_full (const GNUNET_HashCode * hc)
+GNUNET_h2s_full (const struct GNUNET_HashCode * hc)
{
static struct GNUNET_CRYPTO_HashAsciiEncoded ret;
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,
*/
static void
iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf,
- BitIterator callback, void *arg, const GNUNET_HashCode * key)
+ BitIterator callback, void *arg, const struct GNUNET_HashCode * key)
{
- GNUNET_HashCode tmp[2];
+ struct GNUNET_HashCode tmp[2];
int bitCount;
unsigned int round;
unsigned int slot = 0;
@@ -354,7 +354,7 @@ iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf,
GNUNET_assert (bf->bitArraySize * 8LL > bf->bitArraySize);
while (bitCount > 0)
{
- while (slot < (sizeof (GNUNET_HashCode) / sizeof (uint32_t)))
+ while (slot < (sizeof (struct GNUNET_HashCode) / sizeof (uint32_t)))
{
if (GNUNET_YES !=
callback (arg, bf,
@@ -368,7 +368,7 @@ iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf,
}
if (bitCount > 0)
{
- GNUNET_CRYPTO_hash (&tmp[round & 1], sizeof (GNUNET_HashCode),
+ GNUNET_CRYPTO_hash (&tmp[round & 1], sizeof (struct GNUNET_HashCode),
&tmp[(round + 1) & 1]);
round++;
slot = 0;
@@ -696,7 +696,7 @@ GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf)
*/
int
GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
- *bf, const GNUNET_HashCode * e)
+ *bf, const struct GNUNET_HashCode * e)
{
int res;
@@ -716,7 +716,7 @@ GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
*/
void
GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
- const GNUNET_HashCode * e)
+ const struct GNUNET_HashCode * e)
{
if (NULL == bf)
return;
@@ -801,7 +801,7 @@ GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
*/
void
GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf,
- const GNUNET_HashCode * e)
+ const struct GNUNET_HashCode * e)
{
if (NULL == bf)
return;
@@ -827,7 +827,7 @@ GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf,
void *iterator_cls, size_t size,
unsigned int k)
{
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
unsigned int i;
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
/**
* Key for the entry.
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Value of the entry.
@@ -130,7 +130,7 @@ GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
*/
static unsigned int
idx_of (const struct GNUNET_CONTAINER_MultiHashMap *m,
- const GNUNET_HashCode * key)
+ const struct GNUNET_HashCode * key)
{
GNUNET_assert (m != NULL);
return (*(unsigned int *) key) % m->map_length;
@@ -163,14 +163,14 @@ GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap
*/
void *
GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key)
+ *map, const struct GNUNET_HashCode * key)
{
struct MapEntry *e;
e = map->map[idx_of (map, key)];
while (e != NULL)
{
- if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
return e->value;
e = e->next;
}
@@ -197,7 +197,7 @@ GNUNET_CONTAINER_multihashmap_iterate (const struct
unsigned int i;
struct MapEntry *e;
struct MapEntry *n;
- GNUNET_HashCode kc;
+ struct GNUNET_HashCode kc;
count = 0;
GNUNET_assert (map != NULL);
@@ -233,7 +233,7 @@ GNUNET_CONTAINER_multihashmap_iterate (const struct
*/
int
GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key, void *value)
+ const struct GNUNET_HashCode * key, void *value)
{
struct MapEntry *e;
struct MapEntry *p;
@@ -244,7 +244,7 @@ GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
e = map->map[i];
while (e != NULL)
{
- if ((0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) &&
+ if ((0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode))) &&
(value == e->value))
{
if (p == NULL)
@@ -272,7 +272,7 @@ GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
*/
int
GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key)
+ *map, const struct GNUNET_HashCode * key)
{
struct MapEntry *e;
struct MapEntry *p;
@@ -285,7 +285,7 @@ GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
e = map->map[i];
while (e != NULL)
{
- if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
{
if (p == NULL)
map->map[i] = e->next;
@@ -321,14 +321,14 @@ GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
int
GNUNET_CONTAINER_multihashmap_contains (const struct
GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key)
+ const struct GNUNET_HashCode * key)
{
struct MapEntry *e;
e = map->map[idx_of (map, key)];
while (e != NULL)
{
- if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
return GNUNET_YES;
e = e->next;
}
@@ -349,7 +349,7 @@ GNUNET_CONTAINER_multihashmap_contains (const struct
int
GNUNET_CONTAINER_multihashmap_contains_value (const struct
GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key,
+ *map, const struct GNUNET_HashCode * key,
const void *value)
{
struct MapEntry *e;
@@ -357,7 +357,7 @@ GNUNET_CONTAINER_multihashmap_contains_value (const struct
e = map->map[idx_of (map, key)];
while (e != NULL)
{
- if ((0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) &&
+ if ((0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode))) &&
(e->value == value))
return GNUNET_YES;
e = e->next;
@@ -416,7 +416,7 @@ grow (struct GNUNET_CONTAINER_MultiHashMap *map)
*/
int
GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key, void *value,
+ const struct GNUNET_HashCode * key, void *value,
enum GNUNET_CONTAINER_MultiHashMapOption opt)
{
struct MapEntry *e;
@@ -429,7 +429,7 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
e = map->map[i];
while (e != NULL)
{
- if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
{
if (opt == GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)
return GNUNET_SYSERR;
@@ -467,7 +467,7 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
int
GNUNET_CONTAINER_multihashmap_get_multiple (const struct
GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key,
+ const struct GNUNET_HashCode * key,
GNUNET_CONTAINER_HashMapIterator it,
void *it_cls)
{
@@ -480,7 +480,7 @@ GNUNET_CONTAINER_multihashmap_get_multiple (const struct
while (NULL != (e = n))
{
n = e->next;
- if (0 != memcmp (key, &e->key, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (key, &e->key, sizeof (struct GNUNET_HashCode)))
continue;
if ((it != NULL) && (GNUNET_OK != it (it_cls, key, e->value)))
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 @@
* @param ret pointer to where to write the hashcode
*/
void
-GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret)
+GNUNET_CRYPTO_hash (const void *block, size_t size, struct GNUNET_HashCode * ret)
{
gcry_md_hash_buffer (GCRY_MD_SHA512, ret, block, size);
}
@@ -140,7 +140,7 @@ struct GNUNET_CRYPTO_FileHashContext
*/
static void
file_hash_finish (struct GNUNET_CRYPTO_FileHashContext *fhc,
- const GNUNET_HashCode * res)
+ const struct GNUNET_HashCode * res)
{
fhc->callback (fhc->callback_cls, res);
GNUNET_free (fhc->filename);
@@ -161,7 +161,7 @@ static void
file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_CRYPTO_FileHashContext *fhc = cls;
- GNUNET_HashCode *res;
+ struct GNUNET_HashCode *res;
size_t delta;
fhc->task = GNUNET_SCHEDULER_NO_TASK;
@@ -179,7 +179,7 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
fhc->offset += delta;
if (fhc->offset == fhc->fsize)
{
- res = (GNUNET_HashCode *) gcry_md_read (fhc->md, GCRY_MD_SHA512);
+ res = (struct GNUNET_HashCode *) gcry_md_read (fhc->md, GCRY_MD_SHA512);
file_hash_finish (fhc, res);
return;
}
@@ -272,7 +272,7 @@ GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc)
* safely cast to char*, a '\\0' termination is set).
*/
void
-GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
+GNUNET_CRYPTO_hash_to_enc (const struct GNUNET_HashCode * block,
struct GNUNET_CRYPTO_HashAsciiEncoded *result)
{
char *np;
@@ -296,7 +296,7 @@ GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
*/
int
GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen,
- GNUNET_HashCode * result)
+ struct GNUNET_HashCode * result)
{
char upper_enc[enclen];
char* up_ptr = upper_enc;
@@ -321,8 +321,8 @@ GNUNET_CRYPTO_hash_from_string2 (const char *enc, size_t enclen,
* hashcode proximity.
*/
unsigned int
-GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
- const GNUNET_HashCode * b)
+GNUNET_CRYPTO_hash_distance_u32 (const struct GNUNET_HashCode * a,
+ const struct GNUNET_HashCode * b)
{
unsigned int x1 = (a->bits[1] - b->bits[1]) >> 16;
unsigned int x2 = (b->bits[1] - a->bits[1]) >> 16;
@@ -339,11 +339,11 @@ GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
*/
void
GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
- GNUNET_HashCode * result)
+ struct GNUNET_HashCode * result)
{
int i;
- for (i = (sizeof (GNUNET_HashCode) / sizeof (uint32_t)) - 1; i >= 0; i--)
+ for (i = (sizeof (struct GNUNET_HashCode) / sizeof (uint32_t)) - 1; i >= 0; i--)
result->bits[i] = GNUNET_CRYPTO_random_u32 (mode, UINT32_MAX);
}
@@ -356,13 +356,13 @@ GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
* @param result set to b - a
*/
void
-GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
- const GNUNET_HashCode * b,
- GNUNET_HashCode * result)
+GNUNET_CRYPTO_hash_difference (const struct GNUNET_HashCode * a,
+ const struct GNUNET_HashCode * b,
+ struct GNUNET_HashCode * result)
{
int i;
- for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
+ for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
result->bits[i] = b->bits[i] - a->bits[i];
}
@@ -375,12 +375,12 @@ GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
* @param result set to a + delta
*/
void
-GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
- const GNUNET_HashCode * delta, GNUNET_HashCode * result)
+GNUNET_CRYPTO_hash_sum (const struct GNUNET_HashCode * a,
+ const struct GNUNET_HashCode * delta, struct GNUNET_HashCode * result)
{
int i;
- for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
+ for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
result->bits[i] = delta->bits[i] + a->bits[i];
}
@@ -393,12 +393,12 @@ GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
* @param result set to a ^ b
*/
void
-GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
- GNUNET_HashCode * result)
+GNUNET_CRYPTO_hash_xor (const struct GNUNET_HashCode * a, const struct GNUNET_HashCode * b,
+ struct GNUNET_HashCode * result)
{
int i;
- for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
+ for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
result->bits[i] = a->bits[i] ^ b->bits[i];
}
@@ -411,11 +411,11 @@ GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
* @param iv set to a valid initialization vector
*/
void
-GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
+GNUNET_CRYPTO_hash_to_aes_key (const struct GNUNET_HashCode * hc,
struct GNUNET_CRYPTO_AesSessionKey *skey,
struct GNUNET_CRYPTO_AesInitializationVector *iv)
{
- GNUNET_assert (sizeof (GNUNET_HashCode) >=
+ GNUNET_assert (sizeof (struct GNUNET_HashCode) >=
GNUNET_CRYPTO_AES_KEY_LENGTH +
sizeof (struct GNUNET_CRYPTO_AesInitializationVector));
memcpy (skey, hc, GNUNET_CRYPTO_AES_KEY_LENGTH);
@@ -433,16 +433,16 @@ GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
* @return Bit \a bit from hashcode \a code, -1 for invalid index
*/
int
-GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit)
+GNUNET_CRYPTO_hash_get_bit (const struct GNUNET_HashCode * code, unsigned int bit)
{
- GNUNET_assert (bit < 8 * sizeof (GNUNET_HashCode));
+ GNUNET_assert (bit < 8 * sizeof (struct GNUNET_HashCode));
return (((unsigned char *) code)[bit >> 3] & (1 << (bit & 7))) > 0;
}
/**
* Determine how many low order bits match in two
- * GNUNET_HashCodes. i.e. - 010011 and 011111 share
+ * struct GNUNET_HashCodes. i.e. - 010011 and 011111 share
* the first two lowest order bits, and therefore the
* return value is two (NOT XOR distance, nor how many
* bits match absolutely!).
@@ -453,16 +453,16 @@ GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit)
* @return the number of bits that match
*/
unsigned int
-GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
- const GNUNET_HashCode * second)
+GNUNET_CRYPTO_hash_matching_bits (const struct GNUNET_HashCode * first,
+ const struct GNUNET_HashCode * second)
{
unsigned int i;
- for (i = 0; i < sizeof (GNUNET_HashCode) * 8; i++)
+ for (i = 0; i < sizeof (struct GNUNET_HashCode) * 8; i++)
if (GNUNET_CRYPTO_hash_get_bit (first, i) !=
GNUNET_CRYPTO_hash_get_bit (second, i))
return i;
- return sizeof (GNUNET_HashCode) * 8;
+ return sizeof (struct GNUNET_HashCode) * 8;
}
@@ -475,7 +475,7 @@ GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
* @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
*/
int
-GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2)
+GNUNET_CRYPTO_hash_cmp (const struct GNUNET_HashCode * h1, const struct GNUNET_HashCode * h2)
{
unsigned int *i1;
unsigned int *i2;
@@ -483,7 +483,7 @@ GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2)
i1 = (unsigned int *) h1;
i2 = (unsigned int *) h2;
- for (i = (sizeof (GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
+ for (i = (sizeof (struct GNUNET_HashCode) / sizeof (unsigned int)) - 1; i >= 0; i--)
{
if (i1[i] > i2[i])
return 1;
@@ -504,15 +504,15 @@ GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2)
* @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2.
*/
int
-GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
- const GNUNET_HashCode * h2,
- const GNUNET_HashCode * target)
+GNUNET_CRYPTO_hash_xorcmp (const struct GNUNET_HashCode * h1,
+ const struct GNUNET_HashCode * h2,
+ const struct GNUNET_HashCode * target)
{
int i;
unsigned int d1;
unsigned int d2;
- for (i = sizeof (GNUNET_HashCode) / sizeof (unsigned int) - 1; i >= 0; i--)
+ for (i = sizeof (struct GNUNET_HashCode) / sizeof (unsigned int) - 1; i >= 0; i--)
{
d1 = ((unsigned int *) h1)[i] ^ ((unsigned int *) target)[i];
d2 = ((unsigned int *) h2)[i] ^ ((unsigned int *) target)[i];
@@ -576,7 +576,7 @@ GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
void
GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
const void *plaintext, size_t plaintext_len,
- GNUNET_HashCode * hmac)
+ struct GNUNET_HashCode * hmac)
{
gcry_md_hd_t md;
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
static void
-mpz_randomize (gcry_mpi_t n, unsigned int nbits, GNUNET_HashCode * rnd)
+mpz_randomize (gcry_mpi_t n, unsigned int nbits, struct GNUNET_HashCode * rnd)
{
- GNUNET_HashCode hc;
- GNUNET_HashCode tmp;
- int bits_per_hc = sizeof (GNUNET_HashCode) * 8;
+ struct GNUNET_HashCode hc;
+ struct GNUNET_HashCode tmp;
+ int bits_per_hc = sizeof (struct GNUNET_HashCode) * 8;
int cnt;
int i;
@@ -88,8 +88,8 @@ mpz_randomize (gcry_mpi_t n, unsigned int nbits, GNUNET_HashCode * rnd)
int j;
if (i > 0)
- GNUNET_CRYPTO_hash (&hc, sizeof (GNUNET_HashCode), &tmp);
- for (j = 0; j < sizeof (GNUNET_HashCode) / sizeof (uint32_t); j++)
+ GNUNET_CRYPTO_hash (&hc, sizeof (struct GNUNET_HashCode), &tmp);
+ for (j = 0; j < sizeof (struct GNUNET_HashCode) / sizeof (uint32_t); j++)
{
#if HAVE_GCRY_MPI_LSHIFT
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)
}
hc = tmp;
}
- GNUNET_CRYPTO_hash (&hc, sizeof (GNUNET_HashCode), rnd);
+ GNUNET_CRYPTO_hash (&hc, sizeof (struct GNUNET_HashCode), rnd);
i = gcry_mpi_get_nbits (n);
while (i > nbits)
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)
* Return true if n is probably a prime
*/
static int
-is_prime (gcry_mpi_t n, int steps, GNUNET_HashCode * hc)
+is_prime (gcry_mpi_t n, int steps, struct GNUNET_HashCode * hc)
{
gcry_mpi_t x;
gcry_mpi_t y;
@@ -218,7 +218,7 @@ adjust (unsigned char *buf, size_t size, size_t target)
static void
-gen_prime (gcry_mpi_t * ptest, unsigned int nbits, GNUNET_HashCode * hc)
+gen_prime (gcry_mpi_t * ptest, unsigned int nbits, struct GNUNET_HashCode * hc)
{
/* Note: 2 is not included because it can be tested more easily by
* 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)
*/
static void
generate_kblock_key (KBlock_secret_key *sk, unsigned int nbits,
- GNUNET_HashCode * hc)
+ struct GNUNET_HashCode * hc)
{
gcry_mpi_t t1, t2;
gcry_mpi_t phi; /* helper: (p-1)(q-1) */
@@ -490,10 +490,10 @@ GNUNET_NETWORK_STRUCT_END
* given HashCode as input to the PRNG.
*/
static struct KskRsaPrivateKeyBinaryEncoded *
-makeKblockKeyInternal (const GNUNET_HashCode * hc)
+makeKblockKeyInternal (const struct GNUNET_HashCode * hc)
{
KBlock_secret_key sk;
- GNUNET_HashCode hx;
+ struct GNUNET_HashCode hx;
unsigned char *pbu[6];
gcry_mpi_t *pkv[6];
size_t sizes[6];
@@ -564,7 +564,7 @@ struct KBlockKeyCacheLine
/**
* Hash from which the key was generated.
*/
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
/**
* The encoded key.
@@ -594,13 +594,13 @@ static unsigned int cacheSize;
* @return corresponding private key; must not be freed!
*/
struct GNUNET_CRYPTO_RsaPrivateKey *
-GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc)
+GNUNET_CRYPTO_rsa_key_create_from_hash (const struct GNUNET_HashCode * hc)
{
struct KBlockKeyCacheLine *line;
unsigned int i;
for (i = 0; i < cacheSize; i++)
- if (0 == memcmp (hc, &cache[i]->hc, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (hc, &cache[i]->hc, sizeof (struct GNUNET_HashCode)))
return GNUNET_CRYPTO_rsa_decode_key ((const char*) cache[i]->pke,
ntohs (cache[i]->pke->len));
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,
size_t isize;
size_t erroff;
- GNUNET_assert (size <= sizeof (GNUNET_HashCode));
+ GNUNET_assert (size <= sizeof (struct GNUNET_HashCode));
pubkey = public2PrivateKey (publicKey);
if (pubkey == NULL)
return GNUNET_SYSERR;
@@ -936,7 +936,7 @@ GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
gcry_sexp_t data;
size_t ssize;
gcry_mpi_t rval;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
char *buff;
int bufSize;
@@ -949,7 +949,7 @@ GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
[bufSize -
strlen
("0123456789012345678901234567890123456789012345678901234567890123))")
- - 1], &hc, sizeof (GNUNET_HashCode));
+ - 1], &hc, sizeof (struct GNUNET_HashCode));
GNUNET_assert (0 == gcry_sexp_new (&data, buff, bufSize, 0));
GNUNET_free (buff);
GNUNET_assert (0 == gcry_pk_sign (&result, data, key->sexp));
@@ -988,7 +988,7 @@ GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
size_t size;
gcry_mpi_t val;
struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
- GNUNET_HashCode hc;
+ struct GNUNET_HashCode hc;
char *buff;
int bufSize;
size_t erroff;
@@ -1012,7 +1012,7 @@ GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
[strlen (FORMATSTRING) -
strlen
("0123456789012345678901234567890123456789012345678901234567890123))")],
- &hc, sizeof (GNUNET_HashCode));
+ &hc, sizeof (struct GNUNET_HashCode));
GNUNET_assert (0 == gcry_sexp_new (&data, buff, bufSize, 0));
GNUNET_free (buff);
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 @@
static void
perfHash ()
{
- GNUNET_HashCode hc1;
- GNUNET_HashCode hc2;
- GNUNET_HashCode hc3;
+ struct GNUNET_HashCode hc1;
+ struct GNUNET_HashCode hc2;
+ struct GNUNET_HashCode hc3;
int i;
char *buf;
@@ -43,8 +43,8 @@ perfHash ()
GNUNET_CRYPTO_hash ("foo", 3, &hc1);
for (i = 0; i < 1024; i++)
{
- GNUNET_CRYPTO_hash (&hc1, sizeof (GNUNET_HashCode), &hc2);
- GNUNET_CRYPTO_hash (&hc2, sizeof (GNUNET_HashCode), &hc1);
+ GNUNET_CRYPTO_hash (&hc1, sizeof (struct GNUNET_HashCode), &hc2);
+ GNUNET_CRYPTO_hash (&hc2, sizeof (struct GNUNET_HashCode), &hc1);
GNUNET_CRYPTO_hash (buf, 1024 * 64, &hc3);
}
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;
* @param rating rating of pseudonym
*/
static void
-internal_notify (const GNUNET_HashCode * id,
+internal_notify (const struct GNUNET_HashCode * id,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
struct DiscoveryCallback *pos;
@@ -169,7 +169,7 @@ GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
*/
static char *
get_data_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *prefix, const GNUNET_HashCode * psid)
+ const char *prefix, const struct GNUNET_HashCode * psid)
{
struct GNUNET_CRYPTO_HashAsciiEncoded enc;
@@ -192,7 +192,7 @@ get_data_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
static void
write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid,
+ const struct GNUNET_HashCode * nsid,
const struct GNUNET_CONTAINER_MetaData *meta,
int32_t ranking, const char *ns_name)
{
@@ -238,7 +238,7 @@ write_pseudonym_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
static int
read_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid,
+ const struct GNUNET_HashCode * nsid,
struct GNUNET_CONTAINER_MetaData **meta, int32_t * ranking,
char **ns_name)
{
@@ -303,9 +303,9 @@ read_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
char *
GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, const char *name, unsigned int *suffix)
+ const struct GNUNET_HashCode * nsid, const char *name, unsigned int *suffix)
{
- GNUNET_HashCode nh;
+ struct GNUNET_HashCode nh;
uint64_t len;
char *fn;
struct GNUNET_DISK_FileHandle *fh;
@@ -328,23 +328,23 @@ GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_DISK_PERM_USER_WRITE);
i = 0;
idx = -1;
- while ((len >= sizeof (GNUNET_HashCode)) &&
- (sizeof (GNUNET_HashCode) ==
- GNUNET_DISK_file_read (fh, &nh, sizeof (GNUNET_HashCode))))
+ while ((len >= sizeof (struct GNUNET_HashCode)) &&
+ (sizeof (struct GNUNET_HashCode) ==
+ GNUNET_DISK_file_read (fh, &nh, sizeof (struct GNUNET_HashCode))))
{
- if (0 == memcmp (&nh, nsid, sizeof (GNUNET_HashCode)))
+ if (0 == memcmp (&nh, nsid, sizeof (struct GNUNET_HashCode)))
{
idx = i;
break;
}
i++;
- len -= sizeof (GNUNET_HashCode);
+ len -= sizeof (struct GNUNET_HashCode);
}
if (idx == -1)
{
idx = i;
- if (sizeof (GNUNET_HashCode) !=
- GNUNET_DISK_file_write (fh, nsid, sizeof (GNUNET_HashCode)))
+ if (sizeof (struct GNUNET_HashCode) !=
+ GNUNET_DISK_file_write (fh, nsid, sizeof (struct GNUNET_HashCode)))
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "write", fn);
}
GNUNET_DISK_file_close (fh);
@@ -376,7 +376,7 @@ GNUNET_PSEUDONYM_name_uniquify (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
int
GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta,
+ const struct GNUNET_HashCode * nsid, struct GNUNET_CONTAINER_MetaData **ret_meta,
int32_t *ret_rank, char **ret_name, int *name_is_a_dup)
{
struct GNUNET_CONTAINER_MetaData *meta;
@@ -450,13 +450,13 @@ GNUNET_PSEUDONYM_get_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
int
GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *ns_uname, GNUNET_HashCode * nsid)
+ const char *ns_uname, struct GNUNET_HashCode * nsid)
{
size_t slen;
uint64_t len;
unsigned int idx;
char *name;
- GNUNET_HashCode nh;
+ struct GNUNET_HashCode nh;
char *fn;
struct GNUNET_DISK_FileHandle *fh;
@@ -476,7 +476,7 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
if ((GNUNET_OK != GNUNET_DISK_file_test (fn) ||
(GNUNET_OK != GNUNET_DISK_file_size (fn, &len, GNUNET_YES, GNUNET_YES))) ||
- ((idx + 1) * sizeof (GNUNET_HashCode) > len))
+ ((idx + 1) * sizeof (struct GNUNET_HashCode) > len))
{
GNUNET_free (fn);
return GNUNET_SYSERR;
@@ -487,10 +487,10 @@ GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_DISK_PERM_USER_READ |
GNUNET_DISK_PERM_USER_WRITE);
GNUNET_free (fn);
- GNUNET_DISK_file_seek (fh, idx * sizeof (GNUNET_HashCode),
+ GNUNET_DISK_file_seek (fh, idx * sizeof (struct GNUNET_HashCode),
GNUNET_DISK_SEEK_SET);
- if (sizeof (GNUNET_HashCode) !=
- GNUNET_DISK_file_read (fh, nsid, sizeof (GNUNET_HashCode)))
+ if (sizeof (struct GNUNET_HashCode) !=
+ GNUNET_DISK_file_read (fh, nsid, sizeof (struct GNUNET_HashCode)))
{
GNUNET_DISK_file_close (fh);
return GNUNET_SYSERR;
@@ -535,7 +535,7 @@ list_pseudonym_helper (void *cls, const char *fullname)
{
struct ListPseudonymClosure *c = cls;
int ret;
- GNUNET_HashCode id;
+ struct GNUNET_HashCode id;
int32_t rating;
struct GNUNET_CONTAINER_MetaData *meta;
const char *fn;
@@ -612,7 +612,7 @@ GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
int
GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, int delta)
+ const struct GNUNET_HashCode * nsid, int delta)
{
struct GNUNET_CONTAINER_MetaData *meta;
int ret;
@@ -648,7 +648,7 @@ GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
int
GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, const char *name,
+ const struct GNUNET_HashCode * nsid, const char *name,
const struct GNUNET_CONTAINER_MetaData *md, int rank)
{
GNUNET_assert (cfg != NULL);
@@ -670,7 +670,7 @@ GNUNET_PSEUDONYM_set_info (const struct GNUNET_CONFIGURATION_Handle *cfg,
*/
void
GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * id,
+ const struct GNUNET_HashCode * id,
const struct GNUNET_CONTAINER_MetaData *meta)
{
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 @@
* Generate a random hashcode.
*/
static void
-nextHC (GNUNET_HashCode * hc)
+nextHC (struct GNUNET_HashCode * hc)
{
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, hc);
}
static int
-add_iterator (void *cls, GNUNET_HashCode * next)
+add_iterator (void *cls, struct GNUNET_HashCode * next)
{
int *ret = cls;
- GNUNET_HashCode pos;
+ struct GNUNET_HashCode pos;
if (0 == (*ret)--)
return GNUNET_NO;
@@ -59,7 +59,7 @@ main (int argc, char *argv[])
{
struct GNUNET_CONTAINER_BloomFilter *bf;
struct GNUNET_CONTAINER_BloomFilter *bfi;
- GNUNET_HashCode tmp;
+ struct GNUNET_HashCode tmp;
int i;
int ok1;
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
testMap (int i)
{
struct GNUNET_CONTAINER_MultiHashMap *m;
- GNUNET_HashCode k1;
- GNUNET_HashCode k2;
+ struct GNUNET_HashCode k1;
+ struct GNUNET_HashCode k2;
const char *ret;
int j;
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];
static int
test (int number)
{
- GNUNET_HashCode h1;
- GNUNET_HashCode h2;
+ struct GNUNET_HashCode h1;
+ struct GNUNET_HashCode h2;
struct GNUNET_CRYPTO_HashAsciiEncoded enc;
- memset (&h1, number, sizeof (GNUNET_HashCode));
+ memset (&h1, number, sizeof (struct GNUNET_HashCode));
GNUNET_CRYPTO_hash_to_enc (&h1, &enc);
if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string ((char *) &enc, &h2))
{
printf ("enc2hash failed!\n");
return 1;
}
- if (0 != memcmp (&h1, &h2, sizeof (GNUNET_HashCode)))
+ if (0 != memcmp (&h1, &h2, sizeof (struct GNUNET_HashCode)))
return 1;
return 0;
}
@@ -67,10 +67,10 @@ testArithmetic ()
{
static struct GNUNET_CRYPTO_AesSessionKey zskey;
static struct GNUNET_CRYPTO_AesInitializationVector ziv;
- GNUNET_HashCode h1;
- GNUNET_HashCode h2;
- GNUNET_HashCode d;
- GNUNET_HashCode s;
+ struct GNUNET_HashCode h1;
+ struct GNUNET_HashCode h2;
+ struct GNUNET_HashCode d;
+ struct GNUNET_HashCode s;
struct GNUNET_CRYPTO_AesSessionKey skey;
struct GNUNET_CRYPTO_AesInitializationVector iv;
@@ -107,10 +107,10 @@ testArithmetic ()
}
static void
-finished_task (void *cls, const GNUNET_HashCode * res)
+finished_task (void *cls, const struct GNUNET_HashCode * res)
{
int *ret = cls;
- GNUNET_HashCode want;
+ struct GNUNET_HashCode want;
GNUNET_CRYPTO_hash (block, sizeof (block), &want);
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 ()
{
const char *want =
"010601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b73c215f7a5e6b09bec55713c901786c09324a150980e014bdb0d04426934929c3b4971a9711af5455536cd6eeb8bfa004ee904972a737455f53c752987d8c82b755bc02882b44950c4acdc1672ba74c3b94d81a4c1ea3d74e7700ae5594c3a4f3c559e4bff2df6844fac302e4b66175e14dc8bad3ce44281d2fec1a1abef06301010000";
- GNUNET_HashCode in;
+ struct GNUNET_HashCode in;
struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
int i;
@@ -79,7 +79,7 @@ testCorrectKey ()
static int
testMultiKey (const char *word)
{
- GNUNET_HashCode in;
+ struct GNUNET_HashCode in;
struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey1;
@@ -228,7 +228,7 @@ int
main (int argc, char *argv[])
{
int failureCount = 0;
- GNUNET_HashCode in;
+ struct GNUNET_HashCode in;
struct GNUNET_CRYPTO_RsaPrivateKey *hostkey;
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 @@
static struct GNUNET_CONTAINER_MetaData *meta;
-static GNUNET_HashCode id1;
+static struct GNUNET_HashCode id1;
static int
-iter (void *cls, const GNUNET_HashCode * pseudonym,
+iter (void *cls, const struct GNUNET_HashCode * pseudonym,
const char *name, const char *unique_name,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
int *ok = cls;
- if ((0 == memcmp (pseudonym, &id1, sizeof (GNUNET_HashCode))) &&
+ if ((0 == memcmp (pseudonym, &id1, sizeof (struct GNUNET_HashCode))) &&
(!GNUNET_CONTAINER_meta_data_test_equal (md, meta)))
{
*ok = GNUNET_NO;
@@ -54,7 +54,7 @@ iter (void *cls, const GNUNET_HashCode * pseudonym,
}
static int
-noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
+noti_callback (void *cls, const struct GNUNET_HashCode * pseudonym,
const char *name, const char *unique_name,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
@@ -65,7 +65,7 @@ noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
}
static int
-fake_noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
+fake_noti_callback (void *cls, const struct GNUNET_HashCode * pseudonym,
const char *name, const char *unique_name,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
@@ -76,7 +76,7 @@ fake_noti_callback (void *cls, const GNUNET_HashCode * pseudonym,
}
static int
-false_callback (void *cls, const GNUNET_HashCode * pseudonym,
+false_callback (void *cls, const struct GNUNET_HashCode * pseudonym,
const char *name, const char *unique_name,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
@@ -87,11 +87,11 @@ int
main (int argc, char *argv[])
{
int ok;
- GNUNET_HashCode rid1;
- GNUNET_HashCode id2;
- GNUNET_HashCode rid2;
- GNUNET_HashCode fid;
- GNUNET_HashCode id3;
+ struct GNUNET_HashCode rid1;
+ struct GNUNET_HashCode id2;
+ struct GNUNET_HashCode rid2;
+ struct GNUNET_HashCode fid;
+ struct GNUNET_HashCode id3;
int old;
int newVal;
@@ -174,8 +174,8 @@ main (int argc, char *argv[])
CHECK (GNUNET_SYSERR == GNUNET_PSEUDONYM_name_to_id (cfg, name1, &rid1));
CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name2_unique, &rid2));
CHECK (GNUNET_OK == GNUNET_PSEUDONYM_name_to_id (cfg, name1_unique, &rid1));
- CHECK (0 == memcmp (&id1, &rid1, sizeof (GNUNET_HashCode)));
- CHECK (0 == memcmp (&id2, &rid2, sizeof (GNUNET_HashCode)));
+ CHECK (0 == memcmp (&id1, &rid1, sizeof (struct GNUNET_HashCode)));
+ CHECK (0 == memcmp (&id2, &rid2, sizeof (struct GNUNET_HashCode)));
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &fid);
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
* Key under which this entry is in the 'destination_map' (only valid
* if 'heap_node != NULL').
*/
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
/**
* Pre-allocated tunnel for this destination, or NULL for none.
@@ -91,7 +91,7 @@ struct DestinationEntry
/**
* The description of the service (only used for service tunnels).
*/
- GNUNET_HashCode service_descriptor;
+ struct GNUNET_HashCode service_descriptor;
/**
* Peer offering the service.
@@ -371,7 +371,7 @@ static unsigned long long max_tunnel_mappings;
static void
get_destination_key_from_ip (int af,
const void *address,
- GNUNET_HashCode *key)
+ struct GNUNET_HashCode *key)
{
switch (af)
{
@@ -411,11 +411,11 @@ get_tunnel_key_from_ips (int af,
uint16_t source_port,
const void *destination_ip,
uint16_t destination_port,
- GNUNET_HashCode *key)
+ struct GNUNET_HashCode *key)
{
char *off;
- memset (key, 0, sizeof (GNUNET_HashCode));
+ memset (key, 0, sizeof (struct GNUNET_HashCode));
/* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash,
so we put the ports in there (and hope for few collisions) */
off = (char*) key;
@@ -501,7 +501,7 @@ send_client_reply (struct GNUNET_SERVER_Client *client,
static void
free_tunnel_state (struct TunnelState *ts)
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct TunnelMessageQueueEntry *tnq;
struct GNUNET_MESH_Tunnel *tunnel;
@@ -872,7 +872,7 @@ route_packet (struct DestinationEntry *destination,
const void *payload,
size_t payload_length)
{
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct TunnelState *ts;
struct TunnelMessageQueueEntry *tnq;
size_t alen;
@@ -1510,7 +1510,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
{
const struct GNUNET_TUN_Layer2PacketHeader *tun;
size_t mlen;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct DestinationEntry *de;
GNUNET_STATISTICS_update (stats,
@@ -2336,7 +2336,7 @@ allocate_v4_address (struct in_addr *v4)
struct in_addr addr;
struct in_addr mask;
struct in_addr rnd;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
unsigned int tries;
GNUNET_assert (1 == inet_pton (AF_INET, ipv4addr, &addr));
@@ -2387,7 +2387,7 @@ allocate_v6_address (struct in6_addr *v6)
struct in6_addr mask;
struct in6_addr rnd;
int i;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
unsigned int tries;
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
struct in6_addr v6;
void *addr;
struct DestinationEntry *de;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct TunnelState *ts;
/* validate and parse request */
@@ -2703,7 +2703,7 @@ service_redirect_to_service (void *cls GNUNET_UNUSED, struct GNUNET_SERVER_Clien
struct in6_addr v6;
void *addr;
struct DestinationEntry *de;
- GNUNET_HashCode key;
+ struct GNUNET_HashCode key;
struct TunnelState *ts;
/* parse request */
@@ -2835,7 +2835,7 @@ tunnel_cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel
*/
static int
cleanup_destination (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct DestinationEntry *de = value;
@@ -2855,7 +2855,7 @@ cleanup_destination (void *cls,
*/
static int
cleanup_tunnel (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct TunnelState *ts = value;
@@ -2940,7 +2940,7 @@ cleanup (void *cls GNUNET_UNUSED,
*/
static int
cleanup_tunnel_client (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
struct GNUNET_SERVER_Client *client = cls;
@@ -2965,7 +2965,7 @@ cleanup_tunnel_client (void *cls,
*/
static int
cleanup_destination_client (void *cls,
- const GNUNET_HashCode *key,
+ const struct GNUNET_HashCode *key,
void *value)
{
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,
int dst_af;
int req_af;
struct GNUNET_PeerIdentity peer;
- GNUNET_HashCode sd;
+ struct GNUNET_HashCode sd;
const void *addr;
struct in_addr v4;
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
/**
* Service descriptor identifying the service.
*/
- GNUNET_HashCode service_descriptor;
+ struct GNUNET_HashCode service_descriptor;
/**
* 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
/**
* For service redirection, service descriptor.
*/
- GNUNET_HashCode serv;
+ struct GNUNET_HashCode serv;
/**
* At what time should the created service mapping expire?
@@ -464,7 +464,7 @@ GNUNET_VPN_redirect_to_peer (struct GNUNET_VPN_Handle *vh,
int result_af,
uint8_t protocol,
const struct GNUNET_PeerIdentity *peer,
- const GNUNET_HashCode *serv,
+ const struct GNUNET_HashCode *serv,
int nac,
struct GNUNET_TIME_Absolute expiration_time,
GNUNET_VPN_AllocationCallback cb,