diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-16 20:57:15 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-07-16 20:57:15 +0000 |
commit | d353f773bab8c0f92e149a74400aa31b57da9d05 (patch) | |
tree | e8c416c791c690f661c513340662e4e98ff3464a /networking | |
parent | 3ab1d8193e335afa74e86a8d8e628158d7e503b9 (diff) | |
download | busybox-w32-d353f773bab8c0f92e149a74400aa31b57da9d05.tar.gz busybox-w32-d353f773bab8c0f92e149a74400aa31b57da9d05.tar.bz2 busybox-w32-d353f773bab8c0f92e149a74400aa31b57da9d05.zip |
Extract usage information into a separate file.
git-svn-id: svn://busybox.net/trunk/busybox@864 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-rw-r--r-- | networking/hostname.c | 17 | ||||
-rw-r--r-- | networking/nc.c | 6 | ||||
-rw-r--r-- | networking/nslookup.c | 9 | ||||
-rw-r--r-- | networking/ping.c | 19 | ||||
-rw-r--r-- | networking/telnet.c | 8 |
5 files changed, 3 insertions, 56 deletions
diff --git a/networking/hostname.c b/networking/hostname.c index 60f66c073..77b545ded 100644 --- a/networking/hostname.c +++ b/networking/hostname.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | 1 | /* vi: set sw=4 ts=4: */ |
2 | /* | 2 | /* |
3 | * $Id: hostname.c,v 1.11 2000/07/14 01:51:25 kraai Exp $ | 3 | * $Id: hostname.c,v 1.12 2000/07/16 20:57:15 kraai Exp $ |
4 | * Mini hostname implementation for busybox | 4 | * Mini hostname 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> |
@@ -30,21 +30,6 @@ | |||
30 | #include <unistd.h> | 30 | #include <unistd.h> |
31 | #include <stdio.h> | 31 | #include <stdio.h> |
32 | 32 | ||
33 | static const char *hostname_usage = | ||
34 | "hostname [OPTION] {hostname | -F file}\n" | ||
35 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
36 | "\nGet or set the hostname or DNS domain name. If a hostname is given\n" | ||
37 | "(or a file with the -F parameter), the host name will be set.\n\n" | ||
38 | "Options:\n" | ||
39 | "\t-s\t\tShort\n" | ||
40 | |||
41 | "\t-i\t\tAddresses for the hostname\n" | ||
42 | "\t-d\t\tDNS domain name\n" | ||
43 | "\t-F FILE\t\tUse the contents of FILE to specify the hostname\n" | ||
44 | #endif | ||
45 | ; | ||
46 | |||
47 | |||
48 | void do_sethostname(char *s, int isfile) | 33 | void do_sethostname(char *s, int isfile) |
49 | { | 34 | { |
50 | FILE *f; | 35 | FILE *f; |
diff --git a/networking/nc.c b/networking/nc.c index b6afe6ffa..a544f32fc 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -40,12 +40,6 @@ | |||
40 | 40 | ||
41 | #define BUFSIZE 100 | 41 | #define BUFSIZE 100 |
42 | 42 | ||
43 | static const char nc_usage[] = "nc [IP] [port]\n" | ||
44 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
45 | "\nNetcat opens a pipe to IP:port\n" | ||
46 | #endif | ||
47 | ; | ||
48 | |||
49 | int nc_main(int argc, char **argv) | 43 | int nc_main(int argc, char **argv) |
50 | { | 44 | { |
51 | int sfd; | 45 | int sfd; |
diff --git a/networking/nslookup.c b/networking/nslookup.c index 54f37c848..10d36b2d1 100644 --- a/networking/nslookup.c +++ b/networking/nslookup.c | |||
@@ -41,13 +41,6 @@ | |||
41 | | + find out how the real nslookup gets the default name server | 41 | | + find out how the real nslookup gets the default name server |
42 | */ | 42 | */ |
43 | 43 | ||
44 | static const char nslookup_usage[] = "nslookup [HOST]\n" | ||
45 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
46 | "\nQueries the nameserver for the IP address of the given HOST\n" | ||
47 | #endif | ||
48 | ; | ||
49 | |||
50 | |||
51 | /* I have to see how the real nslookup does this. | 44 | /* I have to see how the real nslookup does this. |
52 | * I could dig through /etc/resolv.conf, but is there a | 45 | * I could dig through /etc/resolv.conf, but is there a |
53 | * better (programatic) way? | 46 | * better (programatic) way? |
@@ -177,4 +170,4 @@ int nslookup_main(int argc, char **argv) | |||
177 | return( TRUE); | 170 | return( TRUE); |
178 | } | 171 | } |
179 | 172 | ||
180 | /* $Id: nslookup.c,v 1.10 2000/06/19 17:25:40 andersen Exp $ */ | 173 | /* $Id: nslookup.c,v 1.11 2000/07/16 20:57:15 kraai Exp $ */ |
diff --git a/networking/ping.c b/networking/ping.c index b2b4880ed..5f44a6816 100644 --- a/networking/ping.c +++ b/networking/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.22 2000/07/14 06:49:52 andersen Exp $ | 3 | * $Id: ping.c,v 1.23 2000/07/16 20:57:15 kraai 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> |
@@ -174,12 +174,6 @@ static int in_cksum(unsigned short *buf, int sz) | |||
174 | 174 | ||
175 | /* simple version */ | 175 | /* simple version */ |
176 | #ifdef BB_FEATURE_SIMPLE_PING | 176 | #ifdef BB_FEATURE_SIMPLE_PING |
177 | static const char *ping_usage = "ping host\n" | ||
178 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
179 | "\nSend ICMP ECHO_REQUEST packets to network hosts\n" | ||
180 | #endif | ||
181 | ; | ||
182 | |||
183 | static char *hostname = NULL; | 177 | static char *hostname = NULL; |
184 | 178 | ||
185 | static void noresp(int ign) | 179 | static void noresp(int ign) |
@@ -267,17 +261,6 @@ extern int ping_main(int argc, char **argv) | |||
267 | 261 | ||
268 | #else /* ! BB_FEATURE_SIMPLE_PING */ | 262 | #else /* ! BB_FEATURE_SIMPLE_PING */ |
269 | /* full(er) version */ | 263 | /* full(er) version */ |
270 | static const char *ping_usage = "ping [OPTION]... host\n" | ||
271 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
272 | "\nSend ICMP ECHO_REQUEST packets to network hosts.\n\n" | ||
273 | "Options:\n" | ||
274 | "\t-c COUNT\tSend only COUNT pings.\n" | ||
275 | "\t-s SIZE\t\tSend SIZE data bytes in packets (default=56).\n" | ||
276 | "\t-q\t\tQuiet mode, only displays output at start\n" | ||
277 | "\t\t\tand when finished.\n" | ||
278 | #endif | ||
279 | ; | ||
280 | |||
281 | static char *hostname = NULL; | 264 | static char *hostname = NULL; |
282 | static struct sockaddr_in pingaddr; | 265 | static struct sockaddr_in pingaddr; |
283 | static int pingsock = -1; | 266 | static int pingsock = -1; |
diff --git a/networking/telnet.c b/networking/telnet.c index f27603527..3e43c4a1b 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -134,14 +134,6 @@ static int local_bind(int port); | |||
134 | 134 | ||
135 | /* Some globals */ | 135 | /* Some globals */ |
136 | static int one = 1; | 136 | static int one = 1; |
137 | static const char telnet_usage[] = | ||
138 | "telnet host [port]\n" | ||
139 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
140 | "\nTelnet is used to establish interactive communication with another\n" | ||
141 | "computer over a network using the TELNET protocol.\n" | ||
142 | #endif | ||
143 | ; | ||
144 | |||
145 | 137 | ||
146 | static void doexit(int ev) | 138 | static void doexit(int ev) |
147 | { | 139 | { |