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 signal_shutdown(int signal)
47 main(int argc, char **argv)
53 while ((ch = getopt(argc, argv, "t:i:d")) != -1) {
60 fprintf(stderr, "invalid ttl\n");
66 interface_add(optarg);
73 signal(SIGPIPE, SIG_IGN);
74 signal(SIGTERM, signal_shutdown);
75 signal(SIGKILL, signal_shutdown);
89 vlist_flush(&interfaces);