summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangelos <angelos@openbsd.org>1999-12-23 16:17:05 +0000
committerangelos <angelos@openbsd.org>1999-12-23 16:17:05 +0000
commit54ccda116e50acbb124cf1edd4bf323268bfc06e (patch)
tree5511b9f2f8df3c0e1062f0ac7a1bca84ef9810a4
parentRepair .Nd descriptor; wilfried@commentor.se (diff)
downloadwireguard-openbsd-54ccda116e50acbb124cf1edd4bf323268bfc06e.tar.xz
wireguard-openbsd-54ccda116e50acbb124cf1edd4bf323268bfc06e.zip
Add -I flag for compatibility.
-rw-r--r--usr.sbin/traceroute/traceroute.85
-rw-r--r--usr.sbin/traceroute/traceroute.c9
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);