summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-02-04 16:44:16 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-02-04 16:44:16 +0000
commitd68787636c0638b5504f673a8f4f530f6d7b9110 (patch)
tree8c669ed6b0767b22a93f05295ada001246556cc4
parent1ff94e2a53e6a1e543bdee2b7acaaa2a22c7dce9 (diff)
Changed ICMP "unreachable" code #defines to match the ones in
tcpdump/print-icmp.c since they were in BSD first.
-rw-r--r--sbin/ping/ping.c6
-rw-r--r--sys/netinet/ip_icmp.h34
-rw-r--r--usr.sbin/traceroute/traceroute.c4
3 files changed, 22 insertions, 22 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 456179b1e76..7343f60b049 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.15 1997/02/04 14:52:56 kstailey Exp $ */
+/* $OpenBSD: ping.c,v 1.16 1997/02/04 16:44:14 kstailey Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: ping.c,v 1.15 1997/02/04 14:52:56 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: ping.c,v 1.16 1997/02/04 16:44:14 kstailey Exp $";
#endif
#endif /* not lint */
@@ -887,7 +887,7 @@ pr_icmph(icp)
case ICMP_UNREACH_SRCFAIL:
(void)printf("Source Route Failed\n");
break;
- case ICMP_UNREACH_ADM_PROHIB:
+ case ICMP_UNREACH_FILTER_PROHIB:
(void)printf("Route administratively prohibited\n");
break;
default:
diff --git a/sys/netinet/ip_icmp.h b/sys/netinet/ip_icmp.h
index 682b874b420..86d3317bcf9 100644
--- a/sys/netinet/ip_icmp.h
+++ b/sys/netinet/ip_icmp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.h,v 1.5 1997/01/30 17:05:46 kstailey Exp $ */
+/* $OpenBSD: ip_icmp.h,v 1.6 1997/02/04 16:44:13 kstailey Exp $ */
/* $NetBSD: ip_icmp.h,v 1.10 1996/02/13 23:42:28 christos Exp $ */
/*
@@ -128,22 +128,22 @@ struct icmp {
*/
#define ICMP_ECHOREPLY 0 /* echo reply */
#define ICMP_UNREACH 3 /* dest unreachable, codes: */
-#define ICMP_UNREACH_NET 0 /* bad net */
-#define ICMP_UNREACH_HOST 1 /* bad host */
-#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
-#define ICMP_UNREACH_PORT 3 /* bad port */
-#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
-#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
-#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
-#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
-#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
-#define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */
-#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
-#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
-#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
-#define ICMP_UNREACH_ADM_PROHIB 13 /* prohibited access */
-#define ICMP_UNREACH_PREC_VIOLATN 14 /* precedence violat'n*/
-#define ICMP_UNREACH_PREC_CUTOFF 15 /* precedence cutoff */
+#define ICMP_UNREACH_NET 0 /* bad net */
+#define ICMP_UNREACH_HOST 1 /* bad host */
+#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
+#define ICMP_UNREACH_PORT 3 /* bad port */
+#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
+#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
+#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
+#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
+#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
+#define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */
+#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
+#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
+#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
+#define ICMP_UNREACH_FILTER_PROHIB 13 /* prohibited access */
+#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* precedence violat'n*/
+#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* precedence cutoff */
#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
#define ICMP_REDIRECT 5 /* shorter route, codes: */
#define ICMP_REDIRECT_NET 0 /* for network */
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c
index ab33f769f7f..c04acfe7820 100644
--- a/usr.sbin/traceroute/traceroute.c
+++ b/usr.sbin/traceroute/traceroute.c
@@ -537,8 +537,8 @@ main(argc, argv)
++unreachable;
Printf(" !S");
break;
- case ICMP_UNREACH_ADM_PROHIB:
- case ICMP_UNREACH_NET_PROHIB:
+ case ICMP_UNREACH_FILTER_PROHIB:
+ case ICMP_UNREACH_NET_PROHIB: /*misuse*/
++unreachable;
Printf(" !A");
break;