aboutsummaryrefslogtreecommitdiff
path: root/sbin/ping
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2003-03-14 07:59:38 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2003-03-14 07:59:38 +0000
commit120b4a9366396d0cede56f9ead2ad8ace9fe0154 (patch)
treeb3b332dbf3853137d7592962fc301a90ab0b699d /sbin/ping
parent7b66da6e321980bbefed7bf24429889f81eb0143 (diff)
downloadsrc-120b4a9366396d0cede56f9ead2ad8ace9fe0154.tar.gz
src-120b4a9366396d0cede56f9ead2ad8ace9fe0154.zip
Demangle the usage message at the source level.
Submitted by: bde
Notes
Notes: svn path=/head/; revision=112228
Diffstat (limited to 'sbin/ping')
-rw-r--r--sbin/ping/ping.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 84129eac2872..08c3b5a9148c 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1576,28 +1576,21 @@ fill(bp, patp)
}
}
+#if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC)
+#define SECOPT " [-P policy]"
+#else
+#define SECOPT ""
+#endif
static void
usage()
{
- (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
+ (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
"usage: ping [-AaDdfnoQqRrv] [-c count] [-i wait] [-l preload] [-M mask | time]",
-" [-m ttl]"
-#ifdef IPSEC
-#ifdef IPSEC_POLICY_IPSEC
-" [-P policy]"
-#endif
-#endif
-" [-p pattern] [-S src_addr] [-s packetsize]",
+" [-m ttl]" SECOPT " [-p pattern] [-S src_addr] [-s packetsize]",
" [-t timeout] [-z tos] host",
" ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload]",
-" [-M mask | time] [-m ttl]"
-#ifdef IPSEC
-#ifdef IPSEC_POLICY_IPSEC
-" [-P policy]"
-#endif
-#endif
-" [-p pattern] [-S src_addr]",
+" [-M mask | time] [-m ttl]" SECOPT " [-p pattern] [-S src_addr]",
" [-s packetsize] [-T ttl] [-t timeout] [-z tos] mcast-group");
exit(EX_USAGE);
}