summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2014-02-07 19:07:48 +0000
committerChristian Pointner <equinox@anytun.org>2014-02-07 19:07:48 +0000
commitcf6655a6e29d23132190b6c04c08ab372214b9a4 (patch)
tree7aca25034e17fcf03bde80cc816dc3d9027f2195 /src/options.c
parentcreated branch for RAIL mode (diff)
* inital commit for RAIL mode
- added information about it at manpage - updated output for --help * white space cleanups * updated copyright header
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/options.c b/src/options.c
index 331a3c3..d3116ba 100644
--- a/src/options.c
+++ b/src/options.c
@@ -13,9 +13,9 @@
* message authentication based on the methodes used by SRTP. It is
* intended to deliver a generic, scaleable and secure solution for
* tunneling and relaying of packets of any protocol.
- *
*
- * Copyright (C) 2007-2010 Christian Pointner <equinox@anytun.org>
+ *
+ * Copyright (C) 2007-2014 Christian Pointner <equinox@anytun.org>
*
* This file is part of uAnytun.
*
@@ -152,9 +152,9 @@ int options_parse_hex_string(const char* hex, buffer_t* buffer)
if(hex_len%2)
return 1;
- if(buffer->buf_)
+ if(buffer->buf_)
free(buffer->buf_);
-
+
buffer->length_ = hex_len/2;
buffer->buf_ = malloc(buffer->length_);
if(!buffer->buf_) {
@@ -189,7 +189,7 @@ int options_parse_ifconfig(const char* arg, ifconfig_param_t* ifcfg)
free(str);
return 1;
}
-
+
ifcfg->prefix_length_ = atoi(ptr);
ifcfg->net_addr_ = strdup(str);
free(str);
@@ -268,7 +268,7 @@ int options_parse(options_t* opt, int argc, char* argv[])
PARSE_STRING_PARAM("-a","--auth-algo", opt->auth_algo_)
PARSE_INT_PARAM("-b","--auth-tag-length", opt->auth_tag_length_)
#endif
- else
+ else
return i;
}
if(ipv4_only && ipv6_only)
@@ -308,13 +308,13 @@ void options_parse_post(options_t* opt)
return;
#ifndef NO_CRYPT
- if(!strcmp(opt->cipher_, "null") && !strcmp(opt->auth_algo_, "null") &&
+ if(!strcmp(opt->cipher_, "null") && !strcmp(opt->auth_algo_, "null") &&
strcmp(opt->kd_prf_, "null")) {
if(opt->kd_prf_)
free(opt->kd_prf_);
opt->kd_prf_ = strdup("null");
}
- if((strcmp(opt->cipher_, "null") || strcmp(opt->auth_algo_, "null")) &&
+ if((strcmp(opt->cipher_, "null") || strcmp(opt->auth_algo_, "null")) &&
!strcmp(opt->kd_prf_, "null")) {
log_printf(WARNING, "using NULL key derivation with encryption and or authentication enabled!");
}
@@ -433,14 +433,14 @@ void options_print_usage()
printf(" [-C|--chroot] <path> chroot to this directory\n");
printf(" [-P|--write-pid] <path> write pid to this file\n");
printf(" [-i|--interface] <ip-address> local ip address to bind to\n");
- printf(" [-p|--port] <port> local port to bind to\n");
+ printf(" [-p|--port] <port> local port to bind to (use port:port for range - RAIL)\n");
printf(" [-s|--sender-id ] <sender id> the sender id to use\n");
printf(" [-L|--log] <target>:<level>[,<param1>[,<param2>..]]\n");
printf(" add a log target, can be invoked several times\n");
printf(" [-U|--debug] don't daemonize and log to stdout with maximum log level\n");
printf(" [-r|--remote-host] <hostname|ip> remote host\n");
- printf(" [-o|--remote-port] <port> remote port\n");
+ printf(" [-o|--remote-port] <port> remote port (use port:port for range - RAIL)\n");
printf(" [-4|--ipv4-only] always resolv IPv4 addresses\n");
printf(" [-6|--ipv6-only] always resolv IPv6 addresses\n");
printf(" [-d|--dev] <name> device name\n");