--- ping.c.orig	2002-08-30 21:22:17.000000000 +0000
+++ ping.c	2002-08-31 23:57:11.000000000 +0000
@@ -151,6 +151,7 @@
 #define	F_SO_DEBUG	0x040
 #define	F_SO_DONTROUTE	0x080
 #define	F_VERBOSE	0x100
+#define F_COUNTER	0x200
 
 /* multicast options */
 int moptions;
@@ -254,7 +255,7 @@
 
 	preload = 0;
 	datap = &outpack[8 + 8];
-	while ((ch = getopt(argc, argv, "I:LRc:dfh:i:l:np:qrs:t:v")) != EOF)
+	while ((ch = getopt(argc, argv, "I:CLRc:dfh:i:l:np:qrs:t:v")) != EOF)
 		switch(ch) {
 		case 'c':
 			npackets = atoi(optarg);
@@ -264,6 +265,9 @@
 				exit(2);
 			}
 			break;
+		case 'C':
+			options |= F_COUNTER;
+			break;
 		case 'd':
 			options |= F_SO_DEBUG;
 			break;
@@ -772,6 +776,9 @@
 			if (dupflag)
 				(void)printf(" (DUP!)");
 
+			if (options & F_COUNTER) 
+				(void)printf(" (%ld/%ld)",nreceived,ntransmitted);
+
 #ifdef timestamp_check
 			if (negflag)
 				(void)printf(" (TIMETRAVEL!)");
@@ -1271,6 +1278,6 @@
 usage(void)
 {
 	(void)fprintf(stderr,
-	    "usage: ping [-LRdfnqrv] [-c count] [-i wait] [-l preload]\n\t[-p pattern] [-s packetsize] [-t ttl] [-I interface address] host\n");
+	    "usage: ping [-CLRdfnqrv] [-C progress counter] [-c count] [-i wait] [-l preload]\n\t[-p pattern] [-s packetsize] [-t ttl] [-I interface address] host\n");
 	exit(2);
 }

