summaryrefslogtreecommitdiff
path: root/src/tun_helper.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-03 23:56:14 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-03 23:56:14 +0000
commitd399c8468aedc975d52632624786681a3a7ceacc (patch)
tree9ecd5d78a56ccef3e18a001685b88c0447da09d2 /src/tun_helper.h
parentdroping privileges without chroot is now possible (diff)
new ifconfig syntax (only command line parser yet)
Diffstat (limited to 'src/tun_helper.h')
-rw-r--r--src/tun_helper.h14
1 files changed, 7 insertions, 7 deletions
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 <string.h>
-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;
+ }
}