aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-16 20:57:15 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-16 20:57:15 +0000
commitd353f773bab8c0f92e149a74400aa31b57da9d05 (patch)
treee8c416c791c690f661c513340662e4e98ff3464a /networking
parent3ab1d8193e335afa74e86a8d8e628158d7e503b9 (diff)
downloadbusybox-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.c17
-rw-r--r--networking/nc.c6
-rw-r--r--networking/nslookup.c9
-rw-r--r--networking/ping.c19
-rw-r--r--networking/telnet.c8
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
33static 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
48void do_sethostname(char *s, int isfile) 33void 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
43static 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
49int nc_main(int argc, char **argv) 43int 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
44static 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
177static 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
183static char *hostname = NULL; 177static char *hostname = NULL;
184 178
185static void noresp(int ign) 179static 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 */
270static 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
281static char *hostname = NULL; 264static char *hostname = NULL;
282static struct sockaddr_in pingaddr; 265static struct sockaddr_in pingaddr;
283static int pingsock = -1; 266static 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 */
136static int one = 1; 136static int one = 1;
137static 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
146static void doexit(int ev) 138static void doexit(int ev)
147{ 139{