X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=main.c;h=09185b147fc4de92054c0e4bab505aa589d1f465;hb=c4c7a8db3384ca5d6f13737d90d75f1f2394dcc9;hp=11eb42d6b8914e0db45af06c3dafdffd2eb73ce3;hpb=6edc6740fc0511b08eed19a16abf67656f82b8cd;p=project%2Fmdnsd.git diff --git a/main.c b/main.c index 11eb42d..09185b1 100644 --- a/main.c +++ b/main.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include @@ -38,6 +37,8 @@ #include "announce.h" #include "interface.h" +int cfg_proto = 0; + static void signal_shutdown(int signal) { @@ -51,7 +52,7 @@ main(int argc, char **argv) uloop_init(); - while ((ch = getopt(argc, argv, "t:i:d")) != -1) { + while ((ch = getopt(argc, argv, "t:i:d46")) != -1) { switch (ch) { case 't': ttl = atoi(optarg); @@ -66,6 +67,14 @@ main(int argc, char **argv) case 'i': interface_add(optarg); break; + case '4': + cfg_proto = 4; + break; + case '6': + cfg_proto = 6; + break; + default: + return -1; } } @@ -76,9 +85,10 @@ main(int argc, char **argv) if (cache_init()) return -1; - service_init(); - ubus_startup(); + + service_init(0); + uloop_run(); uloop_done();