diff options
author | Christian Pointner <equinox@anytun.org> | 2008-12-28 13:15:53 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-12-28 13:15:53 +0000 |
commit | 8094722a717c708f7e8b684b3fd45612f8649b5d (patch) | |
tree | e7b541c68658f242acbe6e3094ec2edcd83b9c80 /src/uanytun.c | |
parent | some cleanup (diff) |
added options parser
Diffstat (limited to 'src/uanytun.c')
-rw-r--r-- | src/uanytun.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/uanytun.c b/src/uanytun.c index c302764..68df6b6 100644 --- a/src/uanytun.c +++ b/src/uanytun.c @@ -40,6 +40,8 @@ #include "log.h" #include "signal.h" +#include "options.h" + #include "tun.h" #include "udp.h" @@ -111,6 +113,13 @@ int main(int argc, char* argv[]) log_init("uanytun", DAEMON); signal_init(); + options_t* opt; + int ret = options_parse(&opt, argc, argv); + if(ret) + exit(ret); + + options_print(opt); + // chrootAndDrop("/var/run/", "nobody"); // daemonize(); // log_printf(INFO, "running in background now"); @@ -144,6 +153,7 @@ int main(int argc, char* argv[]) /* tun_close(&dev); */ /* udp_close(&sock); */ + options_clear(&opt); return 0; } |