aboutsummaryrefslogtreecommitdiff
path: root/ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'ping.c')
-rw-r--r--ping.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/ping.c b/ping.c
index 9f83002a2..14a56cd55 100644
--- a/ping.c
+++ b/ping.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: ping.c,v 1.14 2000/04/25 23:24:55 erik Exp $ 3 * $Id: ping.c,v 1.15 2000/05/12 19:41:47 erik Exp $
4 * Mini ping implementation for busybox 4 * Mini ping implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -90,7 +90,11 @@ static int in_cksum(unsigned short *buf, int sz)
90 90
91/* simple version */ 91/* simple version */
92#ifdef BB_SIMPLE_PING 92#ifdef BB_SIMPLE_PING
93static const char *ping_usage = "ping host\n\n"; 93static const char *ping_usage = "ping host\n"
94#ifndef BB_FEATURE_TRIVIAL_HELP
95 "\nSend ICMP ECHO_REQUEST packets to network hosts\n"
96#endif
97 ;
94 98
95static char *hostname = NULL; 99static char *hostname = NULL;
96 100
@@ -179,12 +183,15 @@ extern int ping_main(int argc, char **argv)
179 183
180#else 184#else
181/* full(er) version */ 185/* full(er) version */
182static const char *ping_usage = "ping [OPTION]... host\n\n" 186static const char *ping_usage = "ping [OPTION]... host\n"
183 "Send ICMP ECHO_REQUEST packets to network hosts.\n\n" 187#ifndef BB_FEATURE_TRIVIAL_HELP
188 "\nSend ICMP ECHO_REQUEST packets to network hosts.\n\n"
184 "Options:\n" 189 "Options:\n"
185 "\t-c COUNT\tSend only COUNT pings.\n" 190 "\t-c COUNT\tSend only COUNT pings.\n"
186 "\t-q\t\tQuiet mode, only displays output at start\n" 191 "\t-q\t\tQuiet mode, only displays output at start\n"
187 "\t\t\tand when finished.\n"; 192 "\t\t\tand when finished.\n"
193#endif
194 ;
188 195
189static char *hostname = NULL; 196static char *hostname = NULL;
190static struct sockaddr_in pingaddr; 197static struct sockaddr_in pingaddr;