From: R.E. Wolff Date: Mon, 29 Apr 2013 18:21:44 +0000 (+0200) Subject: fixed merge conflicts X-Git-Tag: v0.85~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ab3b5640ae0a5289615063f8a58b4f13ee22873;p=thirdparty%2Fmtr.git fixed merge conflicts --- 3ab3b5640ae0a5289615063f8a58b4f13ee22873 diff --cc curses.c index 2e3bda1,9f487ef..0584bb9 --- a/curses.c +++ b/curses.c @@@ -271,9 -266,20 +272,21 @@@ int mtr_curses_keyaction(void } return ActionNone; } - /* reserve to display help message */ + if (tolower(c) == 't') { + switch ( mtrtype ) { + case IPPROTO_ICMP: + case IPPROTO_UDP: + mtrtype = IPPROTO_TCP; + break; + case IPPROTO_TCP: + mtrtype = IPPROTO_ICMP; + break; + } + return ActionNone; + } + /* reserve to display help message -Min */ if (tolower(c) == '?'|| tolower(c) == 'h') { + int pressanykey_row = 20; mvprintw(2, 0, "Command:\n" ); printw(" ?|h help\n" ); printw(" p pause (SPACE to resume)\n" ); diff --cc mtr.c index 0ad6bbb,88a39cd..746393b --- a/mtr.c +++ b/mtr.c @@@ -154,12 -154,12 +156,15 @@@ void parse_arg (int argc, char **argv { "first-ttl", 1, 0, 'f' }, /* -f & -m are borrowed from traceroute */ { "max-ttl", 1, 0, 'm' }, { "udp", 0, 0, 'u' }, /* UDP (default is ICMP) */ + { "tcp", 0, 0, 'T' }, /* TCP (default is ICMP) */ + { "port", 1, 0, 'P' }, /* target port number for TCP */ + { "timeout", 1, 0, 'Z' }, /* timeout for TCP sockets */ { "inet", 0, 0, '4' }, /* IPv4 only */ { "inet6", 0, 0, '6' }, /* IPv6 only */ - { "aslookup", 0, 0, 'z' }, /* Do AS lookup */ +#ifndef NO_IPINFO + { "ipinfo", 1, 0, 'y' }, /* IP info lookup */ + { "aslookup", 0, 0, 'z' }, /* Do AS lookup (--ipinfo 0) */ +#endif { 0, 0, 0, 0 } }; @@@ -167,7 -167,7 +172,7 @@@ while(1) { /* added f:m:o: byMin */ opt = getopt_long(argc, argv, - "vhrwxtglpo:B:i:c:s:Q:ena:f:m:uby:z46", long_options, NULL); - "vhrwxtglpo:B:i:c:s:Q:ena:f:m:uTP:Zbz46", long_options, NULL); ++ "vhrwxtglpo:B:i:c:s:Q:ena:f:m:uTP:Zby:z46", long_options, NULL); if(opt == -1) break; @@@ -405,16 -420,12 +432,16 @@@ int main(int argc, char **argv } if (PrintHelp) { - printf("usage: %s [-hvrwctglspniu46] [--help] [--version] [--report]\n" + printf("usage: %s [-hvrwctglspniuT46] [--help] [--version] [--report]\n" "\t\t[--report-wide] [--report-cycles=COUNT] [--curses] [--gtk]\n" "\t\t[--raw] [--split] [--mpls] [--no-dns] [--show-ips]\n" - "\t\t[--address interface] [--aslookup]\n" /* BL */ + "\t\t[--address interface]\n" /* BL */ +#ifndef NO_IPINFO + "\t\t[--ipinfo=item_no|-y item_no]\n" + "\t\t[--aslookup|-z]\n" +#endif "\t\t[--psize=bytes/-s bytes]\n" /* ok */ - "\t\t[--report-wide|-w] [-u]\n" /* rew */ + "\t\t[--report-wide|-w] [-u|-T] [--port=PORT] [--timeout=SECONDS]\n" /* rew */ "\t\t[--interval=SECONDS] HOSTNAME [PACKETSIZE]\n", argv[0]); exit(0); }