From d399c8468aedc975d52632624786681a3a7ceacc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 3 Feb 2009 23:56:14 +0000 Subject: new ifconfig syntax (only command line parser yet) --- src/tun_helper.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/tun_helper.h') diff --git a/src/tun_helper.h b/src/tun_helper.h index b403891..47c8033 100644 --- a/src/tun_helper.h +++ b/src/tun_helper.h @@ -37,7 +37,7 @@ #include -void tun_conf(tun_device_t* dev, const char* dev_name, const char* dev_type, const char* ifcfg_lp, const char* ifcfg_rnmp, u_int16_t mtu) +void tun_conf(tun_device_t* dev, const char* dev_name, const char* dev_type, const char* ifcfg_addr, u_int16_t ifcfg_prefix, u_int16_t mtu) { if(!dev) return; @@ -56,12 +56,12 @@ void tun_conf(tun_device_t* dev, const char* dev_name, const char* dev_type, con dev->type_ = TYPE_TAP; } - dev->local_ = NULL; - dev->remote_netmask_ = NULL; - if(ifcfg_lp) - dev->local_ = strdup(ifcfg_lp); - if(ifcfg_rnmp) - dev->remote_netmask_ = strdup(ifcfg_rnmp); + dev->net_addr_ = NULL; + dev->prefix_length_ = 0; + if(ifcfg_addr) { + dev->net_addr_ = strdup(ifcfg_addr); + dev->prefix_length_ = ifcfg_prefix; + } } -- cgit v1.2.3