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"
43 signal_shutdown(int signal
)
49 main(int argc
, char **argv
)
55 while ((ch
= getopt(argc
, argv
, "t:i:d46")) != -1) {
62 fprintf(stderr
, "invalid ttl\n");
68 interface_add(optarg
);
81 signal(SIGPIPE
, SIG_IGN
);
82 signal(SIGTERM
, signal_shutdown
);
83 signal(SIGKILL
, signal_shutdown
);
98 vlist_flush(&interfaces
);