From bd105ce7b32e4223da7c9eb1de2d25e643fe5b01 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 28 Jan 2009 11:16:23 +0000 Subject: deactivated option for ld_kdr cleanup at options parser and manpage --- src/options.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/options.c') diff --git a/src/options.c b/src/options.c index 8876017..db7d4e1 100644 --- a/src/options.c +++ b/src/options.c @@ -186,25 +186,25 @@ int options_parse(options_t* opt, int argc, char* argv[]) PARSE_STRING_PARAM("-P","--write-pid", opt->pid_file_) PARSE_STRING_PARAM("-i","--interface", opt->local_addr_) PARSE_STRING_PARAM("-p","--port", opt->local_port_) + PARSE_INT_PARAM("-s","--sender-id", opt->sender_id_) PARSE_STRING_PARAM("-r","--remote-host", opt->remote_addr_) PARSE_STRING_PARAM("-o","--remote-port", opt->remote_port_) PARSE_STRING_PARAM("-d","--dev", opt->dev_name_) PARSE_STRING_PARAM("-t","--type", opt->dev_type_) PARSE_STRING_PARAM2("-n","--ifconfig", opt->ifconfig_param_local_, opt->ifconfig_param_remote_netmask_) PARSE_STRING_PARAM("-x","--post-up-script", opt->post_up_script_) - PARSE_INT_PARAM("-s","--sender-id", opt->sender_id_) PARSE_INT_PARAM("-m","--mux", opt->mux_) PARSE_INT_PARAM("-w","--window-size", opt->seq_window_size_) #ifndef NO_CRYPT - PARSE_STRING_PARAM("-c","--cipher", opt->cipher_) PARSE_STRING_PARAM("-k","--kd-prf", opt->kd_prf_) - PARSE_INT_PARAM("-l","--ld-kdr", opt->ld_kdr_) - PARSE_STRING_PARAM("-a","--auth-algo", opt->auth_algo_) +// PARSE_INT_PARAM("-l","--ld-kdr", opt->ld_kdr_) #ifndef NO_PASSPHRASE PARSE_STRING_PARAM_SEC("-E","--passphrase", opt->passphrase_) #endif PARSE_HEXSTRING_PARAM_SEC("-K","--key", opt->key_) PARSE_HEXSTRING_PARAM_SEC("-A","--salt", opt->salt_) + PARSE_STRING_PARAM("-c","--cipher", opt->cipher_) + PARSE_STRING_PARAM("-a","--auth-algo", opt->auth_algo_) #endif else return i; @@ -240,9 +240,9 @@ void options_default(options_t* opt) opt->username_ = strdup("nobody"); opt->chroot_dir_ = strdup("/var/run/uanytun"); opt->pid_file_ = NULL; - opt->sender_id_ = 0; opt->local_addr_ = NULL; opt->local_port_ = strdup("4444"); + opt->sender_id_ = 0; opt->remote_addr_ = NULL; opt->remote_port_ = strdup("4444"); opt->dev_name_ = NULL; @@ -250,17 +250,17 @@ void options_default(options_t* opt) opt->ifconfig_param_local_ = NULL; opt->ifconfig_param_remote_netmask_ = NULL; opt->post_up_script_ = NULL; + opt->mux_ = 0; opt->seq_window_size_ = 0; #ifndef NO_CRYPT - opt->cipher_ = strdup("aes-ctr"); opt->kd_prf_ = strdup("aes-ctr"); opt->ld_kdr_ = 0; - opt->auth_algo_ = strdup("sha1"); opt->passphrase_ = NULL; + opt->cipher_ = strdup("aes-ctr"); + opt->auth_algo_ = strdup("sha1"); #else opt->cipher_ = strdup("null"); #endif - opt->mux_ = 0; opt->key_.buf_ = NULL; opt->key_.length_ = 0; opt->salt_.buf_ = NULL; @@ -301,10 +301,10 @@ void options_clear(options_t* opt) if(opt->cipher_) free(opt->cipher_); #ifndef NO_CRYPT - if(opt->kd_prf_) - free(opt->kd_prf_); if(opt->auth_algo_) free(opt->auth_algo_); + if(opt->kd_prf_) + free(opt->kd_prf_); if(opt->passphrase_) free(opt->passphrase_); #endif @@ -325,6 +325,7 @@ void options_print_usage() printf(" [-P|--write-pid] write pid to this file\n"); printf(" [-i|--interface] local ip address to bind to\n"); printf(" [-p|--port] local port to bind to\n"); + printf(" [-s|--sender-id ] the sender id to use\n"); printf(" [-r|--remote-host] remote host\n"); printf(" [-o|--remote-port] remote port\n"); printf(" [-d|--dev] device name\n"); @@ -332,19 +333,18 @@ void options_print_usage() printf(" [-n|--ifconfig] the local address for the tun/tap device\n"); printf(" the remote address(tun) or netmask(tap)\n"); printf(" [-x|--post-up-script]