aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-02 10:34:48 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-02 10:34:48 +0000
commitb36b0e9f8ee778f309f202e55b408522023625fa (patch)
tree556092938bd1814ed0c17054af3cf46af7cb25c3
parent6372edeff7c14b4311d6da8b4f8fa2163c11f7db (diff)
downloadgnunet-b36b0e9f8ee778f309f202e55b408522023625fa.tar.gz
gnunet-b36b0e9f8ee778f309f202e55b408522023625fa.zip
-minor cleanup
-rw-r--r--src/vpn/gnunet-daemon-exit.c116
1 files changed, 59 insertions, 57 deletions
diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c
index e35f99024..6d5dc7797 100644
--- a/src/vpn/gnunet-daemon-exit.c
+++ b/src/vpn/gnunet-daemon-exit.c
@@ -34,52 +34,6 @@
34 34
35#include "gnunet-vpn-packet.h" 35#include "gnunet-vpn-packet.h"
36 36
37/**
38 * The handle to the configuration used throughout the process
39 */
40static const struct GNUNET_CONFIGURATION_Handle *cfg;
41
42/**
43 * The handle to the helper
44 */
45static struct GNUNET_HELPER_Handle *helper_handle;
46
47/**
48 * Arguments to the exit helper.
49 */
50static char *exit_argv[7];
51
52/**
53 * Final status code.
54 */
55static int ret;
56
57/**
58 * The handle to mesh
59 */
60static struct GNUNET_MESH_Handle *mesh_handle;
61
62/**
63 * This hashmaps contains the mapping from peer, service-descriptor,
64 * source-port and destination-port to a struct redirect_state
65 */
66static struct GNUNET_CONTAINER_MultiHashMap *udp_connections;
67
68static struct GNUNET_CONTAINER_Heap *udp_connections_heap;
69
70static struct GNUNET_CONTAINER_MultiHashMap *tcp_connections;
71
72static struct GNUNET_CONTAINER_Heap *tcp_connections_heap;
73
74/**
75 * If there are at least this many udp-Connections, old ones will be removed
76 */
77static long long unsigned int max_udp_connections = 200;
78
79/**
80 * If there are at least this many tcp-Connections, old ones will be removed
81 */
82static long long unsigned int max_tcp_connections = 200;
83 37
84struct remote_addr 38struct remote_addr
85{ 39{
@@ -148,17 +102,6 @@ struct redirect_state
148 struct redirect_info redirect_info; 102 struct redirect_info redirect_info;
149}; 103};
150 104
151/**
152 * This hashmaps saves interesting things about the configured UDP services
153 */
154static struct GNUNET_CONTAINER_MultiHashMap *udp_services;
155
156/**
157 * This hashmaps saves interesting things about the configured TCP services
158 */
159
160static struct GNUNET_CONTAINER_MultiHashMap *tcp_services;
161
162struct tunnel_notify_queue 105struct tunnel_notify_queue
163{ 106{
164 struct tunnel_notify_queue *next; 107 struct tunnel_notify_queue *next;
@@ -176,6 +119,65 @@ struct tunnel_state
176 119
177 120
178/** 121/**
122 * The handle to the configuration used throughout the process
123 */
124static const struct GNUNET_CONFIGURATION_Handle *cfg;
125
126/**
127 * The handle to the helper
128 */
129static struct GNUNET_HELPER_Handle *helper_handle;
130
131/**
132 * Arguments to the exit helper.
133 */
134static char *exit_argv[7];
135
136/**
137 * Final status code.
138 */
139static int ret;
140
141/**
142 * The handle to mesh
143 */
144static struct GNUNET_MESH_Handle *mesh_handle;
145
146/**
147 * This hashmaps contains the mapping from peer, service-descriptor,
148 * source-port and destination-port to a struct redirect_state
149 */
150static struct GNUNET_CONTAINER_MultiHashMap *udp_connections;
151
152static struct GNUNET_CONTAINER_Heap *udp_connections_heap;
153
154static struct GNUNET_CONTAINER_MultiHashMap *tcp_connections;
155
156static struct GNUNET_CONTAINER_Heap *tcp_connections_heap;
157
158/**
159 * If there are at least this many udp-Connections, old ones will be removed
160 */
161static long long unsigned int max_udp_connections = 200;
162
163/**
164 * If there are at least this many tcp-Connections, old ones will be removed
165 */
166static long long unsigned int max_tcp_connections = 200;
167
168/**
169 * This hashmaps saves interesting things about the configured UDP services
170 */
171static struct GNUNET_CONTAINER_MultiHashMap *udp_services;
172
173/**
174 * This hashmaps saves interesting things about the configured TCP services
175 */
176
177static struct GNUNET_CONTAINER_MultiHashMap *tcp_services;
178
179
180/**
179 * Function that frees everything from a hashmap 181 * Function that frees everything from a hashmap
180 */ 182 */
181static int 183static int