aboutsummaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/gnunet-vpn.c72
1 files changed, 46 insertions, 26 deletions
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c
index 2e7daf7f7..0adbd5c96 100644
--- a/src/vpn/gnunet-vpn.c
+++ b/src/vpn/gnunet-vpn.c
@@ -78,7 +78,7 @@ static int udp;
78/** 78/**
79 * Selected level of verbosity. 79 * Selected level of verbosity.
80 */ 80 */
81static int verbosity; 81static unsigned int verbosity;
82 82
83/** 83/**
84 * Global return value. 84 * Global return value.
@@ -286,33 +286,53 @@ run (void *cls,
286int 286int
287main (int argc, char *const *argv) 287main (int argc, char *const *argv)
288{ 288{
289 static const struct GNUNET_GETOPT_CommandLineOption options[] = { 289 struct GNUNET_GETOPT_CommandLineOption options[] = {
290 {'4', "ipv4", NULL, 290 GNUNET_GETOPT_OPTION_SET_ONE ('4',
291 gettext_noop ("request that result should be an IPv4 address"), 291 "ipv4",
292 0, &GNUNET_GETOPT_set_one, &ipv4}, 292 gettext_noop ("request that result should be an IPv4 address"),
293 {'6', "ipv6", NULL, 293 &ipv4),
294 gettext_noop ("request that result should be an IPv6 address"), 294
295 0, &GNUNET_GETOPT_set_one, &ipv6}, 295 GNUNET_GETOPT_OPTION_SET_ONE ('6',
296 {'d', "duration", "TIME", 296 "ipv6",
297 gettext_noop ("how long should the mapping be valid for new tunnels?"), 297 gettext_noop ("request that result should be an IPv6 address"),
298 1, &GNUNET_GETOPT_set_relative_time, &duration}, 298 &ipv6),
299 {'i', "ip", "IP", 299
300 gettext_noop ("destination IP for the tunnel"), 300 GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d',
301 1, &GNUNET_GETOPT_set_string, &target_ip}, 301 "duration",
302 {'p', "peer", "PEERID", 302 "TIME",
303 gettext_noop ("peer offering the service we would like to access"), 303 gettext_noop ("how long should the mapping be valid for new tunnels?"),
304 1, &GNUNET_GETOPT_set_string, &peer_id}, 304 &duration),
305 {'s', "service", "NAME", 305
306 gettext_noop ("name of the service we would like to access"), 306 GNUNET_GETOPT_OPTION_STRING ('i',
307 1, &GNUNET_GETOPT_set_string, &service_name}, 307 "ip",
308 {'t', "tcp", NULL, 308 "IP",
309 gettext_noop ("service is offered via TCP"), 309 gettext_noop ("destination IP for the tunnel"),
310 0, &GNUNET_GETOPT_set_one, &tcp}, 310 &target_ip),
311 {'u', "udp", NULL, 311
312 gettext_noop ("service is offered via UDP"), 312 GNUNET_GETOPT_OPTION_STRING ('p',
313 0, &GNUNET_GETOPT_set_one, &udp}, 313 "peer",
314 "PEERID",
315 gettext_noop ("peer offering the service we would like to access"),
316 &peer_id),
317
318 GNUNET_GETOPT_OPTION_STRING ('s',
319 "service",
320 "NAME",
321 gettext_noop ("name of the service we would like to access"),
322 &service_name),
323
324 GNUNET_GETOPT_OPTION_SET_ONE ('t',
325 "tcp",
326 gettext_noop ("service is offered via TCP"),
327 &tcp),
328
329 GNUNET_GETOPT_OPTION_SET_ONE ('u',
330 "udp",
331 gettext_noop ("service is offered via UDP"),
332 &udp),
314 333
315 GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), 334 GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
335
316 GNUNET_GETOPT_OPTION_END 336 GNUNET_GETOPT_OPTION_END
317 }; 337 };
318 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) 338 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))