* 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!? */
*/
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,
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);
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 ==
static void
client_delete_tunnel (struct MeshClient *c, struct MeshTunnel *t)
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
if (c == t->owner)
{
{
/* 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);
* @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;
}
else
{
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
path_destroy (p);
send_client_peer_connected (t, myid);
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);
}
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);
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;
tunnel_destroy (struct MeshTunnel *t)
{
struct MeshClient *c;
- GNUNET_HashCode hash;
+ struct GNUNET_HashCode hash;
unsigned int i;
int r;
* @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;
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;
* @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,
*/
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,
*/
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,
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++)
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);
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");
* 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;
* 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;