diff options
-rw-r--r-- | src/include/gnunet_nat_lib.h | 38 | ||||
-rw-r--r-- | src/nat/Makefile.am | 7 | ||||
-rw-r--r-- | src/nat/nat_mini.c | 333 | ||||
-rw-r--r-- | src/nat/test_nat_mini.c | 142 | ||||
-rw-r--r-- | src/util/os_priority.c | 1 |
5 files changed, 521 insertions, 0 deletions
diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h index 357758677..57eaac606 100644 --- a/src/include/gnunet_nat_lib.h +++ b/src/include/gnunet_nat_lib.h | |||
@@ -201,6 +201,44 @@ int | |||
201 | GNUNET_NAT_mini_get_external_ipv4 (struct in_addr *addr); | 201 | GNUNET_NAT_mini_get_external_ipv4 (struct in_addr *addr); |
202 | 202 | ||
203 | 203 | ||
204 | /** | ||
205 | * Handle to a mapping created with upnpc. | ||
206 | */ | ||
207 | struct GNUNET_NAT_MiniHandle; | ||
208 | |||
209 | |||
210 | /** | ||
211 | * Start mapping the given port using (mini)upnpc. This function | ||
212 | * should typically not be used directly (it is used within the | ||
213 | * general-purpose 'GNUNET_NAT_register' code). However, it can be | ||
214 | * used if specifically UPnP-based NAT traversal is to be used or | ||
215 | * tested. | ||
216 | * | ||
217 | * @param port port to map | ||
218 | * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP | ||
219 | * @param ac function to call with mapping result | ||
220 | * @param ac_cls closure for 'ac' | ||
221 | * @return NULL on error | ||
222 | */ | ||
223 | struct GNUNET_NAT_MiniHandle * | ||
224 | GNUNET_NAT_mini_map_start (uint16_t port, | ||
225 | int is_tcp, | ||
226 | GNUNET_NAT_AddressCallback ac, | ||
227 | void *ac_cls); | ||
228 | |||
229 | |||
230 | /** | ||
231 | * Remove a mapping created with (mini)upnpc. Calling | ||
232 | * this function will give 'upnpc' 1s to remove tha mapping, | ||
233 | * so while this function is non-blocking, a task will be | ||
234 | * left with the scheduler for up to 1s past this call. | ||
235 | * | ||
236 | * @param mini the handle | ||
237 | */ | ||
238 | void | ||
239 | GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini); | ||
240 | |||
241 | |||
204 | #endif | 242 | #endif |
205 | 243 | ||
206 | /* end of gnunet_nat_lib.h */ | 244 | /* end of gnunet_nat_lib.h */ |
diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index 769b68bd1..6076e3294 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am | |||
@@ -57,6 +57,7 @@ libgnunetnat_la_LDFLAGS = \ | |||
57 | 57 | ||
58 | check_PROGRAMS = \ | 58 | check_PROGRAMS = \ |
59 | test_nat \ | 59 | test_nat \ |
60 | test_nat_mini \ | ||
60 | test_nat_test | 61 | test_nat_test |
61 | 62 | ||
62 | if ENABLE_TEST_RUN | 63 | if ENABLE_TEST_RUN |
@@ -69,6 +70,12 @@ test_nat_LDADD = \ | |||
69 | $(top_builddir)/src/nat/libgnunetnat.la \ | 70 | $(top_builddir)/src/nat/libgnunetnat.la \ |
70 | $(top_builddir)/src/util/libgnunetutil.la | 71 | $(top_builddir)/src/util/libgnunetutil.la |
71 | 72 | ||
73 | test_nat_mini_SOURCES = \ | ||
74 | test_nat_mini.c | ||
75 | test_nat_mini_LDADD = \ | ||
76 | $(top_builddir)/src/nat/libgnunetnat.la \ | ||
77 | $(top_builddir)/src/util/libgnunetutil.la | ||
78 | |||
72 | 79 | ||
73 | test_nat_test_SOURCES = \ | 80 | test_nat_test_SOURCES = \ |
74 | test_nat_test.c | 81 | test_nat_test.c |
diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c index 2ecdf3575..8f13d298f 100644 --- a/src/nat/nat_mini.c +++ b/src/nat/nat_mini.c | |||
@@ -28,6 +28,22 @@ | |||
28 | #include "gnunet_nat_lib.h" | 28 | #include "gnunet_nat_lib.h" |
29 | #include "nat.h" | 29 | #include "nat.h" |
30 | 30 | ||
31 | /** | ||
32 | * How long do we give upnpc to create a mapping? | ||
33 | */ | ||
34 | #define MAP_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) | ||
35 | |||
36 | |||
37 | /** | ||
38 | * How long do we give upnpc to remove a mapping? | ||
39 | */ | ||
40 | #define UNMAP_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) | ||
41 | |||
42 | /** | ||
43 | * How often do we check for changes in the mapping? | ||
44 | */ | ||
45 | #define MAP_REFRESH_FREQ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15) | ||
46 | |||
31 | 47 | ||
32 | /** | 48 | /** |
33 | * Try to get the external IPv4 address of this peer. | 49 | * Try to get the external IPv4 address of this peer. |
@@ -89,5 +105,322 @@ GNUNET_NAT_mini_get_external_ipv4 (struct in_addr *addr) | |||
89 | } | 105 | } |
90 | 106 | ||
91 | 107 | ||
108 | /** | ||
109 | * Handle to a mapping created with upnpc. | ||
110 | */ | ||
111 | struct GNUNET_NAT_MiniHandle | ||
112 | { | ||
113 | |||
114 | /** | ||
115 | * Function to call on mapping changes. | ||
116 | */ | ||
117 | GNUNET_NAT_AddressCallback ac; | ||
118 | |||
119 | /** | ||
120 | * Closure for 'ac'. | ||
121 | */ | ||
122 | void *ac_cls; | ||
123 | |||
124 | /** | ||
125 | * Command used to install the map. | ||
126 | */ | ||
127 | struct GNUNET_OS_CommandHandle *map_cmd; | ||
128 | |||
129 | /** | ||
130 | * Command used to refresh our map information. | ||
131 | */ | ||
132 | struct GNUNET_OS_CommandHandle *refresh_cmd; | ||
133 | |||
134 | /** | ||
135 | * Command used to remove the mapping. | ||
136 | */ | ||
137 | struct GNUNET_OS_CommandHandle *unmap_cmd; | ||
138 | |||
139 | /** | ||
140 | * Our current external mapping (if we have one). | ||
141 | */ | ||
142 | struct sockaddr_in current_addr; | ||
143 | |||
144 | /** | ||
145 | * We check the mapping periodically to see if it | ||
146 | * still works. This task triggers the check. | ||
147 | */ | ||
148 | GNUNET_SCHEDULER_TaskIdentifier refresh_task; | ||
149 | |||
150 | /** | ||
151 | * Are we mapping TCP or UDP? | ||
152 | */ | ||
153 | int is_tcp; | ||
154 | |||
155 | /** | ||
156 | * Did we succeed with creating a mapping? | ||
157 | */ | ||
158 | int did_map; | ||
159 | |||
160 | /** | ||
161 | * Which port are we mapping? | ||
162 | */ | ||
163 | uint16_t port; | ||
164 | |||
165 | }; | ||
166 | |||
167 | |||
168 | /** | ||
169 | * Run upnpc -l to find out if our mapping changed. | ||
170 | * | ||
171 | * @param cls the 'struct GNUNET_NAT_MiniHandle' | ||
172 | * @param tc scheduler context | ||
173 | */ | ||
174 | static void | ||
175 | do_refresh (void *cls, | ||
176 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
177 | |||
178 | |||
179 | /** | ||
180 | * Process the output from 'upnpc -l' to see if our | ||
181 | * external mapping changed. If so, do the notifications. | ||
182 | * | ||
183 | * @param cls the 'struct GNUNET_NAT_MiniHandle' | ||
184 | * @param line line of output, NULL at the end | ||
185 | */ | ||
186 | static void | ||
187 | process_refresh_output (void *cls, | ||
188 | const char *line) | ||
189 | { | ||
190 | struct GNUNET_NAT_MiniHandle *mini = cls; | ||
191 | enum GNUNET_OS_ProcessStatusType type; | ||
192 | unsigned long code; | ||
193 | |||
194 | if (NULL == line) | ||
195 | { | ||
196 | GNUNET_OS_command_stop (mini->refresh_cmd, | ||
197 | &type, &code); | ||
198 | mini->refresh_cmd = NULL; | ||
199 | mini->refresh_task = GNUNET_SCHEDULER_add_delayed (MAP_REFRESH_FREQ, | ||
200 | &do_refresh, | ||
201 | mini); | ||
202 | return; | ||
203 | } | ||
204 | /* FIXME: parse 'line' */ | ||
205 | fprintf (stderr, | ||
206 | "Refresh output: `%s'\n", | ||
207 | line); | ||
208 | } | ||
209 | |||
210 | |||
211 | /** | ||
212 | * Run upnpc -l to find out if our mapping changed. | ||
213 | * | ||
214 | * @param cls the 'struct GNUNET_NAT_MiniHandle' | ||
215 | * @param tc scheduler context | ||
216 | */ | ||
217 | static void | ||
218 | do_refresh (void *cls, | ||
219 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
220 | { | ||
221 | struct GNUNET_NAT_MiniHandle *mini = cls; | ||
222 | |||
223 | mini->refresh_task = GNUNET_SCHEDULER_NO_TASK; | ||
224 | mini->refresh_cmd = GNUNET_OS_command_run (&process_refresh_output, | ||
225 | mini, | ||
226 | MAP_TIMEOUT, | ||
227 | "upnpc", | ||
228 | "upnpc", | ||
229 | "-l", | ||
230 | NULL); | ||
231 | } | ||
232 | |||
233 | |||
234 | /** | ||
235 | * Process the output from the 'upnpc -r' command. | ||
236 | * | ||
237 | * @param cls the 'struct GNUNET_NAT_MiniHandle' | ||
238 | * @param line line of output, NULL at the end | ||
239 | */ | ||
240 | static void | ||
241 | process_map_output (void *cls, | ||
242 | const char *line) | ||
243 | { | ||
244 | struct GNUNET_NAT_MiniHandle *mini = cls; | ||
245 | enum GNUNET_OS_ProcessStatusType type; | ||
246 | unsigned long code; | ||
247 | const char *ipaddr; | ||
248 | char *ipa; | ||
249 | const char *pstr; | ||
250 | unsigned int port; | ||
251 | |||
252 | if (NULL == line) | ||
253 | { | ||
254 | GNUNET_OS_command_stop (mini->map_cmd, | ||
255 | &type, &code); | ||
256 | mini->map_cmd = NULL; | ||
257 | if (mini->did_map == GNUNET_YES) | ||
258 | mini->refresh_task = GNUNET_SCHEDULER_add_delayed (MAP_REFRESH_FREQ, | ||
259 | &do_refresh, | ||
260 | mini); | ||
261 | return; | ||
262 | } | ||
263 | /* | ||
264 | The upnpc output we're after looks like this: | ||
265 | |||
266 | "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000" | ||
267 | */ | ||
268 | if ( (NULL == (ipaddr = strstr (line, " "))) || | ||
269 | (NULL == (pstr = strstr (ipaddr, ":"))) || | ||
270 | (1 != sscanf (pstr + 1, "%u", &port)) ) | ||
271 | { | ||
272 | fprintf (stderr, | ||
273 | "Skipping output `%s'\n", | ||
274 | line); | ||
275 | return; /* skip line */ | ||
276 | } | ||
277 | ipa = GNUNET_strdup (ipaddr + 1); | ||
278 | strstr (ipa, ":")[0] = '\0'; | ||
279 | if (1 != inet_pton (AF_INET, | ||
280 | ipa, | ||
281 | &mini->current_addr.sin_addr)) | ||
282 | { | ||
283 | GNUNET_free (ipa); | ||
284 | fprintf (stderr, | ||
285 | "Skipping output `%s'\n", | ||
286 | line); | ||
287 | return; /* skip line */ | ||
288 | } | ||
289 | GNUNET_free (ipa); | ||
290 | |||
291 | mini->current_addr.sin_port = htons (port); | ||
292 | mini->current_addr.sin_family = AF_INET; | ||
293 | #if HAVE_SOCKADDR_IN_SIN_LEN | ||
294 | mini->current_addr.sin_len = sizeof (struct sockaddr_in); | ||
295 | #endif | ||
296 | mini->did_map = GNUNET_YES; | ||
297 | mini->ac (mini->ac_cls, GNUNET_YES, | ||
298 | (const struct sockaddr*) &mini->current_addr, | ||
299 | sizeof (mini->current_addr)); | ||
300 | } | ||
301 | |||
302 | |||
303 | /** | ||
304 | * Start mapping the given port using (mini)upnpc. This function | ||
305 | * should typically not be used directly (it is used within the | ||
306 | * general-purpose 'GNUNET_NAT_register' code). However, it can be | ||
307 | * used if specifically UPnP-based NAT traversal is to be used or | ||
308 | * tested. | ||
309 | * | ||
310 | * @param port port to map | ||
311 | * @param is_tcp GNUNET_YES to map TCP, GNUNET_NO for UDP | ||
312 | * @param ac function to call with mapping result | ||
313 | * @param ac_cls closure for 'ac' | ||
314 | * @return NULL on error | ||
315 | */ | ||
316 | struct GNUNET_NAT_MiniHandle * | ||
317 | GNUNET_NAT_mini_map_start (uint16_t port, | ||
318 | int is_tcp, | ||
319 | GNUNET_NAT_AddressCallback ac, | ||
320 | void *ac_cls) | ||
321 | { | ||
322 | struct GNUNET_NAT_MiniHandle *ret; | ||
323 | char pstr[6]; | ||
324 | |||
325 | ret = GNUNET_malloc (sizeof (struct GNUNET_NAT_MiniHandle)); | ||
326 | ret->ac = ac; | ||
327 | ret->ac_cls = ac_cls; | ||
328 | ret->is_tcp = is_tcp; | ||
329 | ret->port = port; | ||
330 | GNUNET_snprintf (pstr, sizeof (pstr), | ||
331 | "%u", | ||
332 | (unsigned int) port); | ||
333 | ret->map_cmd = GNUNET_OS_command_run (&process_map_output, | ||
334 | ret, | ||
335 | MAP_TIMEOUT, | ||
336 | "upnpc", | ||
337 | "upnpc", | ||
338 | "-r", pstr, | ||
339 | is_tcp ? "tcp" : "udp", | ||
340 | NULL); | ||
341 | |||
342 | return ret; | ||
343 | } | ||
344 | |||
345 | |||
346 | /** | ||
347 | * Process output from our 'unmap' command. | ||
348 | * | ||
349 | * @param cls the 'struct GNUNET_NAT_MiniHandle' | ||
350 | * @param line line of output, NULL at the end | ||
351 | */ | ||
352 | static void | ||
353 | process_unmap_output (void *cls, | ||
354 | const char *line) | ||
355 | { | ||
356 | struct GNUNET_NAT_MiniHandle *mini = cls; | ||
357 | enum GNUNET_OS_ProcessStatusType type; | ||
358 | unsigned long code; | ||
359 | |||
360 | if (NULL == line) | ||
361 | { | ||
362 | GNUNET_OS_command_stop (mini->unmap_cmd, | ||
363 | &type, &code); | ||
364 | mini->unmap_cmd = NULL; | ||
365 | GNUNET_free (mini); | ||
366 | return; | ||
367 | } | ||
368 | /* we don't really care about the output... */ | ||
369 | } | ||
370 | |||
371 | |||
372 | /** | ||
373 | * Remove a mapping created with (mini)upnpc. Calling | ||
374 | * this function will give 'upnpc' 1s to remove tha mapping, | ||
375 | * so while this function is non-blocking, a task will be | ||
376 | * left with the scheduler for up to 1s past this call. | ||
377 | * | ||
378 | * @param mini the handle | ||
379 | */ | ||
380 | void | ||
381 | GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini) | ||
382 | { | ||
383 | char pstr[6]; | ||
384 | enum GNUNET_OS_ProcessStatusType type; | ||
385 | unsigned long code; | ||
386 | |||
387 | if (! mini->did_map) | ||
388 | { | ||
389 | if (mini->map_cmd != NULL) | ||
390 | { | ||
391 | GNUNET_OS_command_stop (mini->map_cmd, | ||
392 | &type, &code); | ||
393 | mini->map_cmd = NULL; | ||
394 | } | ||
395 | GNUNET_free (mini); | ||
396 | return; | ||
397 | } | ||
398 | if (GNUNET_SCHEDULER_NO_TASK != mini->refresh_task) | ||
399 | { | ||
400 | GNUNET_SCHEDULER_cancel (mini->refresh_task); | ||
401 | mini->refresh_task = GNUNET_SCHEDULER_NO_TASK; | ||
402 | } | ||
403 | if (mini->refresh_cmd != NULL) | ||
404 | { | ||
405 | GNUNET_OS_command_stop (mini->refresh_cmd, | ||
406 | &type, &code); | ||
407 | mini->refresh_cmd = NULL; | ||
408 | } | ||
409 | mini->ac (mini->ac_cls, GNUNET_NO, | ||
410 | (const struct sockaddr*) &mini->current_addr, | ||
411 | sizeof (mini->current_addr)); | ||
412 | GNUNET_snprintf (pstr, sizeof (pstr), | ||
413 | "%u", | ||
414 | (unsigned int) mini->port); | ||
415 | mini->unmap_cmd = GNUNET_OS_command_run (&process_unmap_output, | ||
416 | mini, | ||
417 | UNMAP_TIMEOUT, | ||
418 | "upnpc", | ||
419 | "upnpc", | ||
420 | "-d", pstr, | ||
421 | mini->is_tcp ? "tcp" : "udp", | ||
422 | NULL); | ||
423 | } | ||
424 | |||
92 | 425 | ||
93 | /* end of nat_mini.c */ | 426 | /* end of nat_mini.c */ |
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c new file mode 100644 index 000000000..57abca3d0 --- /dev/null +++ b/src/nat/test_nat_mini.c | |||
@@ -0,0 +1,142 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2009, 2011 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 3, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * Testcase for port redirection and public IP address retrieval. | ||
23 | * This test never fails, because there need to be a NAT box set up for tha * | ||
24 | * @file nat/test_nat_mini.c | ||
25 | * @brief Testcase for NAT library - mini | ||
26 | * @author Christian Grothoff | ||
27 | * | ||
28 | * TODO: actually use ARM to start resolver service to make DNS work! | ||
29 | */ | ||
30 | |||
31 | #include "platform.h" | ||
32 | #include "gnunet_common.h" | ||
33 | #include "gnunet_util_lib.h" | ||
34 | #include "gnunet_program_lib.h" | ||
35 | #include "gnunet_scheduler_lib.h" | ||
36 | #include "gnunet_nat_lib.h" | ||
37 | |||
38 | |||
39 | #define VERBOSE GNUNET_YES | ||
40 | |||
41 | |||
42 | /* Time to wait before stopping NAT, in seconds */ | ||
43 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) | ||
44 | |||
45 | |||
46 | |||
47 | |||
48 | |||
49 | /** | ||
50 | * Function called on each address that the NAT service | ||
51 | * believes to be valid for the transport. | ||
52 | */ | ||
53 | static void | ||
54 | addr_callback (void *cls, int add_remove, | ||
55 | const struct sockaddr *addr, socklen_t addrlen) | ||
56 | { | ||
57 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
58 | "Address changed: %s `%s' (%u bytes)\n", | ||
59 | add_remove == GNUNET_YES ? "added" : "removed", | ||
60 | GNUNET_a2s (addr, addrlen), | ||
61 | (unsigned int) addrlen); | ||
62 | } | ||
63 | |||
64 | |||
65 | /** | ||
66 | * Function that terminates the test. | ||
67 | */ | ||
68 | static void | ||
69 | stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
70 | { | ||
71 | struct GNUNET_NAT_MiniHandle *mini = cls; | ||
72 | |||
73 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
74 | "Stopping NAT and quitting...\n"); | ||
75 | GNUNET_NAT_mini_map_stop (mini); | ||
76 | } | ||
77 | |||
78 | #define PORT 10000 | ||
79 | |||
80 | /** | ||
81 | * Main function run with scheduler. | ||
82 | */ | ||
83 | static void | ||
84 | run (void *cls, | ||
85 | char *const *args, | ||
86 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
87 | { | ||
88 | struct GNUNET_NAT_MiniHandle *mini; | ||
89 | |||
90 | GNUNET_log_setup ("test-nat-mini", "DEBUG", NULL); | ||
91 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
92 | "Requesting NAT redirection for port %u...\n", | ||
93 | PORT); | ||
94 | mini = GNUNET_NAT_mini_map_start (PORT, | ||
95 | GNUNET_YES /* tcp */, | ||
96 | &addr_callback, NULL); | ||
97 | if (NULL == mini) | ||
98 | { | ||
99 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
100 | "Could not start UPnP interaction\n"); | ||
101 | return; | ||
102 | } | ||
103 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &stop, mini); | ||
104 | } | ||
105 | |||
106 | |||
107 | int | ||
108 | main (int argc, char *const argv[]) | ||
109 | { | ||
110 | struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
111 | GNUNET_GETOPT_OPTION_END | ||
112 | }; | ||
113 | |||
114 | char *const argv_prog[] = { | ||
115 | "test-nat-mini", | ||
116 | "-c", | ||
117 | "test_nat_data.conf", | ||
118 | "-L", | ||
119 | #if VERBOSE | ||
120 | "DEBUG", | ||
121 | #else | ||
122 | "WARNING", | ||
123 | #endif | ||
124 | NULL | ||
125 | }; | ||
126 | |||
127 | GNUNET_log_setup ("test-nat-mini", | ||
128 | #if VERBOSE | ||
129 | "DEBUG", | ||
130 | #else | ||
131 | "WARNING", | ||
132 | #endif | ||
133 | NULL); | ||
134 | |||
135 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
136 | "UPnP test for NAT library, timeout set to %d seconds\n", TIMEOUT); | ||
137 | GNUNET_PROGRAM_run (5, argv_prog, "test-nat-mini", | ||
138 | "nohelp", options, &run, NULL); | ||
139 | return 0; | ||
140 | } | ||
141 | |||
142 | /* end of test_nat_mini.c */ | ||
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index a5e63635d..1cff5d140 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -1075,6 +1075,7 @@ GNUNET_OS_start_process_v (const int *lsocks, | |||
1075 | #endif | 1075 | #endif |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | |||
1078 | /** | 1079 | /** |
1079 | * Retrieve the status of a process | 1080 | * Retrieve the status of a process |
1080 | * @param proc process ID | 1081 | * @param proc process ID |