aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-service-vpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpn/gnunet-service-vpn.c')
-rw-r--r--src/vpn/gnunet-service-vpn.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index b7756a35a..219949bd3 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -62,7 +62,7 @@ struct DestinationEntry
62 * Key under which this entry is in the 'destination_map' (only valid 62 * Key under which this entry is in the 'destination_map' (only valid
63 * if 'heap_node != NULL'). 63 * if 'heap_node != NULL').
64 */ 64 */
65 GNUNET_HashCode key; 65 struct GNUNET_HashCode key;
66 66
67 /** 67 /**
68 * Pre-allocated tunnel for this destination, or NULL for none. 68 * Pre-allocated tunnel for this destination, or NULL for none.
@@ -91,7 +91,7 @@ struct DestinationEntry
91 /** 91 /**
92 * The description of the service (only used for service tunnels). 92 * The description of the service (only used for service tunnels).
93 */ 93 */
94 GNUNET_HashCode service_descriptor; 94 struct GNUNET_HashCode service_descriptor;
95 95
96 /** 96 /**
97 * Peer offering the service. 97 * Peer offering the service.
@@ -371,7 +371,7 @@ static unsigned long long max_tunnel_mappings;
371static void 371static void
372get_destination_key_from_ip (int af, 372get_destination_key_from_ip (int af,
373 const void *address, 373 const void *address,
374 GNUNET_HashCode *key) 374 struct GNUNET_HashCode *key)
375{ 375{
376 switch (af) 376 switch (af)
377 { 377 {
@@ -411,11 +411,11 @@ get_tunnel_key_from_ips (int af,
411 uint16_t source_port, 411 uint16_t source_port,
412 const void *destination_ip, 412 const void *destination_ip,
413 uint16_t destination_port, 413 uint16_t destination_port,
414 GNUNET_HashCode *key) 414 struct GNUNET_HashCode *key)
415{ 415{
416 char *off; 416 char *off;
417 417
418 memset (key, 0, sizeof (GNUNET_HashCode)); 418 memset (key, 0, sizeof (struct GNUNET_HashCode));
419 /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash, 419 /* the GNUnet hashmap only uses the first sizeof(unsigned int) of the hash,
420 so we put the ports in there (and hope for few collisions) */ 420 so we put the ports in there (and hope for few collisions) */
421 off = (char*) key; 421 off = (char*) key;
@@ -501,7 +501,7 @@ send_client_reply (struct GNUNET_SERVER_Client *client,
501static void 501static void
502free_tunnel_state (struct TunnelState *ts) 502free_tunnel_state (struct TunnelState *ts)
503{ 503{
504 GNUNET_HashCode key; 504 struct GNUNET_HashCode key;
505 struct TunnelMessageQueueEntry *tnq; 505 struct TunnelMessageQueueEntry *tnq;
506 struct GNUNET_MESH_Tunnel *tunnel; 506 struct GNUNET_MESH_Tunnel *tunnel;
507 507
@@ -872,7 +872,7 @@ route_packet (struct DestinationEntry *destination,
872 const void *payload, 872 const void *payload,
873 size_t payload_length) 873 size_t payload_length)
874{ 874{
875 GNUNET_HashCode key; 875 struct GNUNET_HashCode key;
876 struct TunnelState *ts; 876 struct TunnelState *ts;
877 struct TunnelMessageQueueEntry *tnq; 877 struct TunnelMessageQueueEntry *tnq;
878 size_t alen; 878 size_t alen;
@@ -1510,7 +1510,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED,
1510{ 1510{
1511 const struct GNUNET_TUN_Layer2PacketHeader *tun; 1511 const struct GNUNET_TUN_Layer2PacketHeader *tun;
1512 size_t mlen; 1512 size_t mlen;
1513 GNUNET_HashCode key; 1513 struct GNUNET_HashCode key;
1514 struct DestinationEntry *de; 1514 struct DestinationEntry *de;
1515 1515
1516 GNUNET_STATISTICS_update (stats, 1516 GNUNET_STATISTICS_update (stats,
@@ -2336,7 +2336,7 @@ allocate_v4_address (struct in_addr *v4)
2336 struct in_addr addr; 2336 struct in_addr addr;
2337 struct in_addr mask; 2337 struct in_addr mask;
2338 struct in_addr rnd; 2338 struct in_addr rnd;
2339 GNUNET_HashCode key; 2339 struct GNUNET_HashCode key;
2340 unsigned int tries; 2340 unsigned int tries;
2341 2341
2342 GNUNET_assert (1 == inet_pton (AF_INET, ipv4addr, &addr)); 2342 GNUNET_assert (1 == inet_pton (AF_INET, ipv4addr, &addr));
@@ -2387,7 +2387,7 @@ allocate_v6_address (struct in6_addr *v6)
2387 struct in6_addr mask; 2387 struct in6_addr mask;
2388 struct in6_addr rnd; 2388 struct in6_addr rnd;
2389 int i; 2389 int i;
2390 GNUNET_HashCode key; 2390 struct GNUNET_HashCode key;
2391 unsigned int tries; 2391 unsigned int tries;
2392 2392
2393 GNUNET_assert (1 == inet_pton (AF_INET6, ipv6addr, &addr)); 2393 GNUNET_assert (1 == inet_pton (AF_INET6, ipv6addr, &addr));
@@ -2564,7 +2564,7 @@ service_redirect_to_ip (void *cls GNUNET_UNUSED, struct GNUNET_SERVER_Client *cl
2564 struct in6_addr v6; 2564 struct in6_addr v6;
2565 void *addr; 2565 void *addr;
2566 struct DestinationEntry *de; 2566 struct DestinationEntry *de;
2567 GNUNET_HashCode key; 2567 struct GNUNET_HashCode key;
2568 struct TunnelState *ts; 2568 struct TunnelState *ts;
2569 2569
2570 /* validate and parse request */ 2570 /* validate and parse request */
@@ -2703,7 +2703,7 @@ service_redirect_to_service (void *cls GNUNET_UNUSED, struct GNUNET_SERVER_Clien
2703 struct in6_addr v6; 2703 struct in6_addr v6;
2704 void *addr; 2704 void *addr;
2705 struct DestinationEntry *de; 2705 struct DestinationEntry *de;
2706 GNUNET_HashCode key; 2706 struct GNUNET_HashCode key;
2707 struct TunnelState *ts; 2707 struct TunnelState *ts;
2708 2708
2709 /* parse request */ 2709 /* parse request */
@@ -2835,7 +2835,7 @@ tunnel_cleaner (void *cls, const struct GNUNET_MESH_Tunnel *tunnel, void *tunnel
2835 */ 2835 */
2836static int 2836static int
2837cleanup_destination (void *cls, 2837cleanup_destination (void *cls,
2838 const GNUNET_HashCode *key, 2838 const struct GNUNET_HashCode *key,
2839 void *value) 2839 void *value)
2840{ 2840{
2841 struct DestinationEntry *de = value; 2841 struct DestinationEntry *de = value;
@@ -2855,7 +2855,7 @@ cleanup_destination (void *cls,
2855 */ 2855 */
2856static int 2856static int
2857cleanup_tunnel (void *cls, 2857cleanup_tunnel (void *cls,
2858 const GNUNET_HashCode *key, 2858 const struct GNUNET_HashCode *key,
2859 void *value) 2859 void *value)
2860{ 2860{
2861 struct TunnelState *ts = value; 2861 struct TunnelState *ts = value;
@@ -2940,7 +2940,7 @@ cleanup (void *cls GNUNET_UNUSED,
2940 */ 2940 */
2941static int 2941static int
2942cleanup_tunnel_client (void *cls, 2942cleanup_tunnel_client (void *cls,
2943 const GNUNET_HashCode *key, 2943 const struct GNUNET_HashCode *key,
2944 void *value) 2944 void *value)
2945{ 2945{
2946 struct GNUNET_SERVER_Client *client = cls; 2946 struct GNUNET_SERVER_Client *client = cls;
@@ -2965,7 +2965,7 @@ cleanup_tunnel_client (void *cls,
2965 */ 2965 */
2966static int 2966static int
2967cleanup_destination_client (void *cls, 2967cleanup_destination_client (void *cls,
2968 const GNUNET_HashCode *key, 2968 const struct GNUNET_HashCode *key,
2969 void *value) 2969 void *value)
2970{ 2970{
2971 struct GNUNET_SERVER_Client *client = cls; 2971 struct GNUNET_SERVER_Client *client = cls;