Home | History | Annotate | Line # | Download | only in ftp
cmdtab.c revision 1.47.10.1
      1  1.47.10.1      yamt /*	$NetBSD: cmdtab.c,v 1.47.10.1 2008/05/18 12:36:05 yamt Exp $	*/
      2       1.31     lukem 
      3       1.31     lukem /*-
      4       1.45     lukem  * Copyright (c) 1996-2005 The NetBSD Foundation, Inc.
      5       1.31     lukem  * All rights reserved.
      6       1.31     lukem  *
      7       1.31     lukem  * This code is derived from software contributed to The NetBSD Foundation
      8       1.31     lukem  * by Luke Mewburn.
      9       1.31     lukem  *
     10       1.31     lukem  * Redistribution and use in source and binary forms, with or without
     11       1.31     lukem  * modification, are permitted provided that the following conditions
     12       1.31     lukem  * are met:
     13       1.31     lukem  * 1. Redistributions of source code must retain the above copyright
     14       1.31     lukem  *    notice, this list of conditions and the following disclaimer.
     15       1.31     lukem  * 2. Redistributions in binary form must reproduce the above copyright
     16       1.31     lukem  *    notice, this list of conditions and the following disclaimer in the
     17       1.31     lukem  *    documentation and/or other materials provided with the distribution.
     18       1.31     lukem  *
     19       1.31     lukem  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20       1.31     lukem  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21       1.31     lukem  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22       1.31     lukem  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23       1.31     lukem  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24       1.31     lukem  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25       1.31     lukem  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26       1.31     lukem  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27       1.31     lukem  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28       1.31     lukem  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29       1.31     lukem  * POSSIBILITY OF SUCH DAMAGE.
     30       1.31     lukem  */
     31        1.6       tls 
     32        1.1       cgd /*
     33        1.3       cgd  * Copyright (c) 1985, 1989, 1993, 1994
     34        1.3       cgd  *	The Regents of the University of California.  All rights reserved.
     35        1.1       cgd  *
     36        1.1       cgd  * Redistribution and use in source and binary forms, with or without
     37        1.1       cgd  * modification, are permitted provided that the following conditions
     38        1.1       cgd  * are met:
     39        1.1       cgd  * 1. Redistributions of source code must retain the above copyright
     40        1.1       cgd  *    notice, this list of conditions and the following disclaimer.
     41        1.1       cgd  * 2. Redistributions in binary form must reproduce the above copyright
     42        1.1       cgd  *    notice, this list of conditions and the following disclaimer in the
     43        1.1       cgd  *    documentation and/or other materials provided with the distribution.
     44       1.41       agc  * 3. Neither the name of the University nor the names of its contributors
     45        1.1       cgd  *    may be used to endorse or promote products derived from this software
     46        1.1       cgd  *    without specific prior written permission.
     47        1.1       cgd  *
     48        1.1       cgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     49        1.1       cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     50        1.1       cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     51        1.1       cgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     52        1.1       cgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     53        1.1       cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     54        1.1       cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     55        1.1       cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     56        1.1       cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     57        1.1       cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     58        1.1       cgd  * SUCH DAMAGE.
     59        1.1       cgd  */
     60        1.1       cgd 
     61       1.16     lukem #include <sys/cdefs.h>
     62        1.1       cgd #ifndef lint
     63        1.6       tls #if 0
     64        1.6       tls static char sccsid[] = "@(#)cmdtab.c	8.4 (Berkeley) 10/9/94";
     65        1.6       tls #else
     66  1.47.10.1      yamt __RCSID("$NetBSD: cmdtab.c,v 1.47.10.1 2008/05/18 12:36:05 yamt Exp $");
     67        1.6       tls #endif
     68        1.1       cgd #endif /* not lint */
     69        1.1       cgd 
     70        1.3       cgd #include <stdio.h>
     71        1.1       cgd #include "ftp_var.h"
     72        1.1       cgd 
     73        1.1       cgd /*
     74        1.1       cgd  * User FTP -- Command Tables.
     75        1.1       cgd  */
     76        1.1       cgd 
     77       1.42  christos #define HSTR	static const char
     78       1.42  christos 
     79       1.42  christos #ifndef NO_HELP
     80       1.42  christos HSTR	accounthelp[] =	"send account command to remote server";
     81       1.42  christos HSTR	appendhelp[] =	"append to a file";
     82       1.42  christos HSTR	asciihelp[] =	"set ascii transfer type";
     83       1.42  christos HSTR	beephelp[] =	"beep when command completed";
     84       1.42  christos HSTR	binaryhelp[] =	"set binary transfer type";
     85       1.42  christos HSTR	casehelp[] =	"toggle mget upper/lower case id mapping";
     86       1.42  christos HSTR	cdhelp[] =	"change remote working directory";
     87       1.42  christos HSTR	cduphelp[] =	"change remote working directory to parent directory";
     88       1.42  christos HSTR	chmodhelp[] =	"change file permissions of remote file";
     89       1.42  christos HSTR	connecthelp[] =	"connect to remote ftp server";
     90       1.42  christos HSTR	crhelp[] =	"toggle carriage return stripping on ascii gets";
     91       1.42  christos HSTR	debughelp[] =	"toggle/set debugging mode";
     92       1.42  christos HSTR	deletehelp[] =	"delete remote file";
     93       1.42  christos HSTR	disconhelp[] =	"terminate ftp session";
     94       1.42  christos HSTR	domachelp[] =	"execute macro";
     95       1.42  christos HSTR	edithelp[] =	"toggle command line editing";
     96  1.47.10.1      yamt HSTR	epsvhelp[] =	"toggle use of EPSV/EPRT on both IPv4 and IPV6 ftp";
     97       1.42  christos HSTR	epsv4help[] =	"toggle use of EPSV/EPRT on IPv4 ftp";
     98  1.47.10.1      yamt HSTR	epsv6help[] =	"toggle use of EPSV/EPRT on IPv6 ftp";
     99       1.42  christos HSTR	feathelp[] =	"show FEATures supported by remote system";
    100       1.42  christos HSTR	formhelp[] =	"set file transfer format";
    101       1.42  christos HSTR	gatehelp[] =	"toggle gate-ftp; specify host[:port] to change proxy";
    102       1.42  christos HSTR	globhelp[] =	"toggle metacharacter expansion of local file names";
    103       1.42  christos HSTR	hashhelp[] =	"toggle printing `#' marks; specify number to set size";
    104       1.42  christos HSTR	helphelp[] =	"print local help information";
    105       1.42  christos HSTR	idlehelp[] =	"get (set) idle timer on remote side";
    106       1.42  christos HSTR	lcdhelp[] =	"change local working directory";
    107       1.42  christos HSTR	lpagehelp[] =	"view a local file through your pager";
    108       1.42  christos HSTR	lpwdhelp[] =	"print local working directory";
    109       1.42  christos HSTR	lshelp[] =	"list contents of remote path";
    110       1.42  christos HSTR	macdefhelp[] =  "define a macro";
    111       1.42  christos HSTR	mdeletehelp[] =	"delete multiple files";
    112       1.42  christos HSTR	mgethelp[] =	"get multiple files";
    113       1.42  christos HSTR	mregethelp[] =	"get multiple files restarting at end of local file";
    114       1.42  christos HSTR	fgethelp[] =	"get files using a localfile as a source of names";
    115       1.42  christos HSTR	mkdirhelp[] =	"make directory on the remote machine";
    116       1.42  christos HSTR	mlshelp[] =	"list contents of multiple remote directories";
    117       1.42  christos HSTR	mlsdhelp[] =	"list contents of remote directory in a machine "
    118       1.36     lukem 			"parsable form";
    119       1.42  christos HSTR	mlsthelp[] =	"list remote path in a machine parsable form";
    120       1.42  christos HSTR	modehelp[] =	"set file transfer mode";
    121       1.42  christos HSTR	modtimehelp[] = "show last modification time of remote file";
    122       1.42  christos HSTR	mputhelp[] =	"send multiple files";
    123       1.42  christos HSTR	newerhelp[] =	"get file if remote file is newer than local file ";
    124       1.42  christos HSTR	nmaphelp[] =	"set templates for default file name mapping";
    125       1.42  christos HSTR	ntranshelp[] =	"set translation table for default file name mapping";
    126       1.42  christos HSTR	optshelp[] =	"show or set options for remote commands";
    127       1.42  christos HSTR	pagehelp[] =	"view a remote file through your pager";
    128       1.42  christos HSTR	passivehelp[] =	"toggle use of passive transfer mode";
    129       1.42  christos HSTR	plshelp[] =	"list contents of remote path through your pager";
    130       1.42  christos HSTR	pmlsdhelp[] =	"list contents of remote directory in a machine "
    131       1.36     lukem 			"parsable form through your pager";
    132       1.42  christos HSTR	porthelp[] =	"toggle use of PORT/LPRT cmd for each data connection";
    133       1.42  christos HSTR	preservehelp[] ="toggle preservation of modification time of "
    134       1.19     lukem 			"retrieved files";
    135       1.42  christos HSTR	progresshelp[] ="toggle transfer progress meter";
    136       1.42  christos HSTR	prompthelp[] =	"force interactive prompting on multiple commands";
    137       1.42  christos HSTR	proxyhelp[] =	"issue command on alternate connection";
    138       1.42  christos HSTR	pwdhelp[] =	"print working directory on remote machine";
    139       1.42  christos HSTR	quithelp[] =	"terminate ftp session and exit";
    140       1.42  christos HSTR	quotehelp[] =	"send arbitrary ftp command";
    141       1.42  christos HSTR	ratehelp[] =	"set transfer rate limit (in bytes/second)";
    142       1.42  christos HSTR	receivehelp[] =	"receive file";
    143       1.42  christos HSTR	regethelp[] =	"get file restarting at end of local file";
    144       1.42  christos HSTR	remotehelp[] =	"get help from remote server";
    145       1.42  christos HSTR	renamehelp[] =	"rename file";
    146       1.42  christos HSTR	resethelp[] =	"clear queued command replies";
    147       1.42  christos HSTR	restarthelp[]=	"restart file transfer at bytecount";
    148       1.42  christos HSTR	rmdirhelp[] =	"remove directory on the remote machine";
    149       1.42  christos HSTR	rmtstatushelp[]="show status of remote machine";
    150       1.42  christos HSTR	runiquehelp[] = "toggle store unique for local files";
    151       1.42  christos HSTR	sendhelp[] =	"send one file";
    152       1.42  christos HSTR	sethelp[] =	"set or display options";
    153       1.42  christos HSTR	shellhelp[] =	"escape to the shell";
    154       1.42  christos HSTR	sitehelp[] =	"send site specific command to remote server\n"
    155       1.10     lukem 			"\t\tTry \"rhelp site\" or \"site help\" "
    156       1.10     lukem 			"for more information";
    157       1.42  christos HSTR	sizecmdhelp[] = "show size of remote file";
    158       1.42  christos HSTR	statushelp[] =	"show current status";
    159       1.42  christos HSTR	structhelp[] =	"set file transfer structure";
    160       1.42  christos HSTR	suniquehelp[] = "toggle store unique on remote machine";
    161       1.42  christos HSTR	systemhelp[] =  "show remote system type";
    162       1.42  christos HSTR	tenexhelp[] =	"set tenex file transfer type";
    163       1.42  christos HSTR	tracehelp[] =	"toggle packet tracing";
    164       1.42  christos HSTR	typehelp[] =	"set file transfer type";
    165       1.42  christos HSTR	umaskhelp[] =	"get (set) umask on remote side";
    166       1.42  christos HSTR	unsethelp[] =	"unset an option";
    167       1.42  christos HSTR	usagehelp[] =	"show command usage";
    168       1.42  christos HSTR	userhelp[] =	"send new user information";
    169       1.42  christos HSTR	verbosehelp[] =	"toggle verbose mode";
    170       1.42  christos HSTR	xferbufhelp[] =	"set socket send/receive buffer size";
    171       1.42  christos #endif
    172       1.42  christos 
    173       1.42  christos HSTR	empty[] = "";
    174       1.42  christos 
    175       1.42  christos #ifdef NO_HELP
    176       1.42  christos #define H(x)	empty
    177       1.42  christos #else
    178       1.42  christos #define H(x)	x
    179       1.42  christos #endif
    180        1.1       cgd 
    181       1.21       cgd #ifdef NO_EDITCOMPLETE
    182       1.32     lukem #define	CMPL(x)
    183       1.32     lukem #define	CMPL0
    184       1.21       cgd #else  /* !NO_EDITCOMPLETE */
    185       1.38     lukem #define	CMPL(x)	#x,
    186       1.44     lukem #define	CMPL0	empty,
    187       1.21       cgd #endif /* !NO_EDITCOMPLETE */
    188       1.12     lukem 
    189        1.1       cgd struct cmd cmdtab[] = {
    190       1.42  christos 	{ "!",		H(shellhelp),	0, 0, 0, CMPL0		shell },
    191       1.42  christos 	{ "$",		H(domachelp),	1, 0, 0, CMPL0		domacro },
    192       1.42  christos 	{ "account",	H(accounthelp),	0, 1, 1, CMPL0		account},
    193       1.42  christos 	{ "append",	H(appendhelp),	1, 1, 1, CMPL(lr)	put },
    194       1.42  christos 	{ "ascii",	H(asciihelp),	0, 1, 1, CMPL0		setascii },
    195       1.42  christos 	{ "bell",	H(beephelp),	0, 0, 0, CMPL0		setbell },
    196       1.42  christos 	{ "binary",	H(binaryhelp),	0, 1, 1, CMPL0		setbinary },
    197       1.42  christos 	{ "bye",	H(quithelp),	0, 0, 0, CMPL0		quit },
    198       1.42  christos 	{ "case",	H(casehelp),	0, 0, 1, CMPL0		setcase },
    199       1.42  christos 	{ "cd",		H(cdhelp),	0, 1, 1, CMPL(r)	cd },
    200       1.42  christos 	{ "cdup",	H(cduphelp),	0, 1, 1, CMPL0		cdup },
    201       1.42  christos 	{ "chmod",	H(chmodhelp),	0, 1, 1, CMPL(nr)	do_chmod },
    202       1.42  christos 	{ "close",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
    203       1.42  christos 	{ "cr",		H(crhelp),	0, 0, 0, CMPL0		setcr },
    204       1.47     lukem 	{ "debug",	H(debughelp),	0, 0, 0, CMPL0		setdebug },
    205       1.42  christos 	{ "delete",	H(deletehelp),	0, 1, 1, CMPL(r)	delete },
    206       1.42  christos 	{ "dir",	H(lshelp),	1, 1, 1, CMPL(rl)	ls },
    207       1.42  christos 	{ "disconnect",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
    208       1.42  christos 	{ "edit",	H(edithelp),	0, 0, 0, CMPL0		setedit },
    209  1.47.10.1      yamt 	{ "epsv",	H(epsvhelp),	0, 0, 0, CMPL0		setepsv },
    210       1.42  christos 	{ "epsv4",	H(epsv4help),	0, 0, 0, CMPL0		setepsv4 },
    211  1.47.10.1      yamt 	{ "epsv6",	H(epsv6help),	0, 0, 0, CMPL0		setepsv6 },
    212       1.42  christos 	{ "exit",	H(quithelp),	0, 0, 0, CMPL0		quit },
    213       1.42  christos 	{ "features",	H(feathelp),	0, 1, 1, CMPL0		feat },
    214       1.42  christos 	{ "fget",	H(fgethelp),	1, 1, 1, CMPL(l)	fget },
    215       1.42  christos 	{ "form",	H(formhelp),	0, 1, 1, CMPL0		setform },
    216       1.42  christos 	{ "ftp",	H(connecthelp),	0, 0, 1, CMPL0		setpeer },
    217       1.42  christos 	{ "gate",	H(gatehelp),	0, 0, 0, CMPL0		setgate },
    218       1.42  christos 	{ "get",	H(receivehelp),	1, 1, 1, CMPL(rl)	get },
    219       1.42  christos 	{ "glob",	H(globhelp),	0, 0, 0, CMPL0		setglob },
    220       1.42  christos 	{ "hash",	H(hashhelp),	0, 0, 0, CMPL0		sethash },
    221       1.43     lukem 	{ "help",	H(helphelp),	0, 0, 1, CMPL(C)	help },
    222       1.42  christos 	{ "idle",	H(idlehelp),	0, 1, 1, CMPL0		idlecmd },
    223       1.42  christos 	{ "image",	H(binaryhelp),	0, 1, 1, CMPL0		setbinary },
    224       1.42  christos 	{ "lcd",	H(lcdhelp),	0, 0, 0, CMPL(l)	lcd },
    225       1.42  christos 	{ "less",	H(pagehelp),	1, 1, 1, CMPL(r)	page },
    226       1.42  christos 	{ "lpage",	H(lpagehelp),	0, 0, 0, CMPL(l)	lpage },
    227       1.42  christos 	{ "lpwd",	H(lpwdhelp),	0, 0, 0, CMPL0		lpwd },
    228       1.42  christos 	{ "ls",		H(lshelp),	1, 1, 1, CMPL(rl)	ls },
    229       1.42  christos 	{ "macdef",	H(macdefhelp),	0, 0, 0, CMPL0		macdef },
    230       1.42  christos 	{ "mdelete",	H(mdeletehelp),	1, 1, 1, CMPL(R)	mdelete },
    231       1.42  christos 	{ "mdir",	H(mlshelp),	1, 1, 1, CMPL(R)	mls },
    232       1.42  christos 	{ "mget",	H(mgethelp),	1, 1, 1, CMPL(R)	mget },
    233       1.42  christos 	{ "mkdir",	H(mkdirhelp),	0, 1, 1, CMPL(r)	makedir },
    234       1.42  christos 	{ "mls",	H(mlshelp),	1, 1, 1, CMPL(R)	mls },
    235       1.42  christos 	{ "mlsd",	H(mlsdhelp),	1, 1, 1, CMPL(r)	ls },
    236       1.42  christos 	{ "mlst",	H(mlsthelp),	1, 1, 1, CMPL(r)	mlst },
    237       1.42  christos 	{ "mode",	H(modehelp),	0, 1, 1, CMPL0		setftmode },
    238       1.42  christos 	{ "modtime",	H(modtimehelp),	0, 1, 1, CMPL(r)	modtime },
    239       1.42  christos 	{ "more",	H(pagehelp),	1, 1, 1, CMPL(r)	page },
    240       1.42  christos 	{ "mput",	H(mputhelp),	1, 1, 1, CMPL(L)	mput },
    241       1.42  christos 	{ "mreget",	H(mregethelp),	1, 1, 1, CMPL(R)	mget },
    242       1.42  christos 	{ "msend",	H(mputhelp),	1, 1, 1, CMPL(L)	mput },
    243       1.42  christos 	{ "newer",	H(newerhelp),	1, 1, 1, CMPL(r)	newer },
    244       1.42  christos 	{ "nlist",	H(lshelp),	1, 1, 1, CMPL(rl)	ls },
    245       1.42  christos 	{ "nmap",	H(nmaphelp),	0, 0, 1, CMPL0		setnmap },
    246       1.42  christos 	{ "ntrans",	H(ntranshelp),	0, 0, 1, CMPL0		setntrans },
    247       1.42  christos 	{ "open",	H(connecthelp),	0, 0, 1, CMPL0		setpeer },
    248       1.42  christos 	{ "page",	H(pagehelp),	1, 1, 1, CMPL(r)	page },
    249       1.42  christos 	{ "passive",	H(passivehelp),	0, 0, 0, CMPL0		setpassive },
    250       1.42  christos 	{ "pdir",	H(plshelp),	1, 1, 1, CMPL(r)	ls },
    251       1.42  christos 	{ "pls",	H(plshelp),	1, 1, 1, CMPL(r)	ls },
    252       1.42  christos 	{ "pmlsd",	H(pmlsdhelp),	1, 1, 1, CMPL(r)	ls },
    253       1.42  christos 	{ "preserve",	H(preservehelp),0, 0, 0, CMPL0		setpreserve },
    254       1.42  christos 	{ "progress",	H(progresshelp),0, 0, 0, CMPL0		setprogress },
    255       1.42  christos 	{ "prompt",	H(prompthelp),	0, 0, 0, CMPL0		setprompt },
    256       1.42  christos 	{ "proxy",	H(proxyhelp),	0, 0, 1, CMPL(c)	doproxy },
    257       1.42  christos 	{ "put",	H(sendhelp),	1, 1, 1, CMPL(lr)	put },
    258       1.42  christos 	{ "pwd",	H(pwdhelp),	0, 1, 1, CMPL0		pwd },
    259       1.42  christos 	{ "quit",	H(quithelp),	0, 0, 0, CMPL0		quit },
    260       1.42  christos 	{ "quote",	H(quotehelp),	1, 1, 1, CMPL0		quote },
    261       1.42  christos 	{ "rate",	H(ratehelp),	0, 0, 0, CMPL0		setrate },
    262       1.42  christos 	{ "rcvbuf",	H(xferbufhelp),	0, 0, 0, CMPL0		setxferbuf },
    263       1.42  christos 	{ "recv",	H(receivehelp),	1, 1, 1, CMPL(rl)	get },
    264       1.42  christos 	{ "reget",	H(regethelp),	1, 1, 1, CMPL(rl)	reget },
    265       1.42  christos 	{ "remopts",	H(optshelp),	0, 1, 1, CMPL0		opts },
    266       1.42  christos 	{ "rename",	H(renamehelp),	0, 1, 1, CMPL(rr)	renamefile },
    267       1.42  christos 	{ "reset",	H(resethelp),	0, 1, 1, CMPL0		reset },
    268       1.42  christos 	{ "restart",	H(restarthelp),	1, 1, 1, CMPL0		restart },
    269       1.43     lukem 	{ "rhelp",	H(remotehelp),	0, 1, 1, CMPL0		rmthelp },
    270       1.42  christos 	{ "rmdir",	H(rmdirhelp),	0, 1, 1, CMPL(r)	removedir },
    271       1.42  christos 	{ "rstatus",	H(rmtstatushelp),0, 1, 1, CMPL(r)	rmtstatus },
    272       1.42  christos 	{ "runique",	H(runiquehelp),	0, 0, 1, CMPL0		setrunique },
    273       1.42  christos 	{ "send",	H(sendhelp),	1, 1, 1, CMPL(lr)	put },
    274       1.42  christos 	{ "sendport",	H(porthelp),	0, 0, 0, CMPL0		setport },
    275       1.42  christos 	{ "set",	H(sethelp),	0, 0, 0, CMPL(o)	setoption },
    276       1.42  christos 	{ "site",	H(sitehelp),	0, 1, 1, CMPL0		site },
    277       1.42  christos 	{ "size",	H(sizecmdhelp),	1, 1, 1, CMPL(r)	sizecmd },
    278       1.42  christos 	{ "sndbuf",	H(xferbufhelp),	0, 0, 0, CMPL0		setxferbuf },
    279       1.42  christos 	{ "status",	H(statushelp),	0, 0, 1, CMPL0		status },
    280       1.42  christos 	{ "struct",	H(structhelp),	0, 1, 1, CMPL0		setstruct },
    281       1.42  christos 	{ "sunique",	H(suniquehelp),	0, 0, 1, CMPL0		setsunique },
    282       1.42  christos 	{ "system",	H(systemhelp),	0, 1, 1, CMPL0		syst },
    283       1.42  christos 	{ "tenex",	H(tenexhelp),	0, 1, 1, CMPL0		settenex },
    284       1.42  christos 	{ "throttle",	H(ratehelp),	0, 0, 0, CMPL0		setrate },
    285       1.42  christos 	{ "trace",	H(tracehelp),	0, 0, 0, CMPL0		settrace },
    286       1.42  christos 	{ "type",	H(typehelp),	0, 1, 1, CMPL0		settype },
    287       1.42  christos 	{ "umask",	H(umaskhelp),	0, 1, 1, CMPL0		do_umask },
    288       1.42  christos 	{ "unset",	H(unsethelp),	0, 0, 0, CMPL(o)	unsetoption },
    289       1.42  christos 	{ "usage",	H(usagehelp),	0, 0, 1, CMPL(C)	help },
    290       1.42  christos 	{ "user",	H(userhelp),	0, 1, 1, CMPL0		user },
    291       1.42  christos 	{ "verbose",	H(verbosehelp),	0, 0, 0, CMPL0		setverbose },
    292       1.42  christos 	{ "xferbuf",	H(xferbufhelp),	0, 0, 0, CMPL0		setxferbuf },
    293       1.42  christos 	{ "?",		H(helphelp),	0, 0, 1, CMPL(C)	help },
    294        1.1       cgd 	{ 0 },
    295        1.1       cgd };
    296        1.1       cgd 
    297       1.32     lukem struct option optiontab[] = {
    298       1.32     lukem 	{ "anonpass",	NULL },
    299       1.32     lukem 	{ "ftp_proxy",	NULL },
    300       1.32     lukem 	{ "http_proxy",	NULL },
    301       1.32     lukem 	{ "no_proxy",	NULL },
    302       1.32     lukem 	{ "pager",	NULL },
    303       1.33     lukem 	{ "prompt",	NULL },
    304       1.34     lukem 	{ "rprompt",	NULL },
    305       1.32     lukem 	{ 0 },
    306       1.32     lukem };
    307