diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-12 19:07:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-12 19:07:40 +0000 |
commit | 6c471eeb15e27f8226492b4860a3c2acb94c5f25 (patch) | |
tree | a3a9dcba12ee5356c03056c10b7aba5367b2ef34 /src/vpn | |
parent | 16bcbbea7133fd2265d46bd2ae1dc70e8c9ba96f (diff) |
-consistently use struct GNUNET_HashCode
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/gnunet-service-vpn.c | 32 | ||||
-rw-r--r-- | src/vpn/gnunet-vpn.c | 2 | ||||
-rw-r--r-- | src/vpn/vpn.h | 2 | ||||
-rw-r--r-- | src/vpn/vpn_api.c | 4 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c index b7756a35a7..219949bd31 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 b75b1d29a0..a03a12e870 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 bec3a5b59c..12c9a7c81d 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 5b70d19dfd..e4da5fae00 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, |