From 8fd23d4249be748356e591e0dd70ea82f70dcec5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 31 Jan 2009 01:47:38 +0000 Subject: moved to new handling if ifconfig parameters (more windows friendly) --- src/options.cpp | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'src/options.cpp') diff --git a/src/options.cpp b/src/options.cpp index b39790b..8d4240b 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -167,8 +167,6 @@ Options::Options() : key_(u_int32_t(0)), salt_(u_int32_t(0)) dev_name_ = ""; dev_type_ = ""; - ifconfig_param_local_ = ""; - ifconfig_param_remote_netmask_ = ""; post_up_script_ = ""; sender_id_ = 0; @@ -357,7 +355,7 @@ bool Options::parse(int argc, char* argv[]) PARSE_SCALAR_PARAM("-d","--dev", dev_name_) PARSE_SCALAR_PARAM("-t","--type", dev_type_) - PARSE_SCALAR_PARAM2("-n","--ifconfig", ifconfig_param_local_, ifconfig_param_remote_netmask_) + PARSE_SCALAR_PARAM("-n","--ifconfig", ifconfig_param_) #ifndef NO_EXEC PARSE_SCALAR_PARAM("-x","--post-up-script", post_up_script_) #endif @@ -463,8 +461,7 @@ void Options::printUsage() std::cout << " [-d|--dev] device name" << std::endl; std::cout << " [-t|--type] device type" << std::endl; - std::cout << " [-n|--ifconfig] the local address for the tun/tap device" << std::endl; - std::cout << " the remote address(tun) or netmask(tap)" << std::endl; + std::cout << " [-n|--ifconfig] / the local address for the tun/tap device and the used prefix length" << std::endl; #ifndef NO_EXEC std::cout << " [-x|--post-up-script]