2 * Copyright (C) 2014 John Crispin <blogic@openwrt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 2.1
6 * as published by the Free Software Foundation
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
15 #include <sys/types.h>
23 #include <sys/types.h>
24 #include <arpa/inet.h>
25 #include <sys/socket.h>
26 #include <netinet/in.h>
27 #include <arpa/nameser.h>
30 #include <libubox/uloop.h>
38 #include "interface.h"
41 int cfg_no_subnet = 0;
44 signal_shutdown(int signal)
50 main(int argc, char **argv)
56 while ((ch = getopt(argc, argv, "t:i:d46n")) != -1) {
63 fprintf(stderr, "invalid ttl\n");
69 interface_add(optarg);
86 signal(SIGPIPE, SIG_IGN);
87 signal(SIGTERM, signal_shutdown);
88 signal(SIGKILL, signal_shutdown);
100 interface_shutdown();
103 vlist_flush(&interfaces);