diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-23 16:17:06 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-23 16:17:06 +0000 |
commit | a9dbeb95495e8fc3960e430352751310598b179d (patch) | |
tree | d6dc22065e1e9b30f443124467383cd03752ef79 /usr.sbin/traceroute | |
parent | 273979e56f808e29049b0574cc4adba76100149d (diff) |
Add -I flag for compatibility.
Diffstat (limited to 'usr.sbin/traceroute')
-rw-r--r-- | usr.sbin/traceroute/traceroute.8 | 5 | ||||
-rw-r--r-- | usr.sbin/traceroute/traceroute.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/usr.sbin/traceroute/traceroute.8 b/usr.sbin/traceroute/traceroute.8 index dedbb1545ab..3836bed9eb4 100644 --- a/usr.sbin/traceroute/traceroute.8 +++ b/usr.sbin/traceroute/traceroute.8 @@ -47,6 +47,7 @@ .Op Fl c .Op Fl d .Op Fl D +.Op Fl I .Op Fl g Ar gateway_addr .Op Fl l .Op Fl m Ar max_ttl @@ -111,6 +112,10 @@ This will not work reliably for most protocols. If set to 1 (ICMP), then ICMP Echo Request messages will be used (same as .Xr ping 8 ). +.It Fl I +Equivalent to +.Fl P 1. +Used for compatibility with other OSes. .It Fl p Ar port Set the base .Tn UDP diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index 9304e681af1..7d6f4164b1e 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute.c,v 1.30 1999/12/18 21:34:35 angelos Exp $ */ +/* $OpenBSD: traceroute.c,v 1.31 1999/12/23 16:17:05 angelos Exp $ */ /* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */ /*- @@ -329,8 +329,11 @@ main(argc, argv) lsrr = 0; on = 1; seq = tos = 0; - while ((ch = getopt(argc, argv, "dDg:m:np:q:rs:t:w:vlP:c")) != -1) + while ((ch = getopt(argc, argv, "dDIg:m:np:q:rs:t:w:vlP:c")) != -1) switch (ch) { + case 'I': + proto = IPPROTO_ICMP; + break; case 'd': options |= SO_DEBUG; break; @@ -989,7 +992,7 @@ void usage() { (void)fprintf(stderr, -"usage: traceroute [-dDnrvc] [-g gateway_addr] ... [-m max_ttl] [-p port#]\n\t\ +"usage: traceroute [-dDInrvc] [-g gateway_addr] ... [-m max_ttl] [-p port#]\n\t\ [-P proto] [-q nqueries] [-s src_addr] [-t tos]\n\t\ [-w wait] host [data size]\n"); exit(1); |