Commit | Line | Data |
---|---|---|
53f01c40 | 1 | #ifndef lint |
5ac6fc46 | 2 | static char sccsid[] = "@(#)cmdtab.c 4.4 (Berkeley) %G%"; |
53f01c40 | 3 | #endif |
5ac6fc46 | 4 | |
53f01c40 SL |
5 | #include "ftp_var.h" |
6 | ||
7 | /* | |
8 | * User FTP -- Command Tables. | |
9 | */ | |
10 | int setascii(), setbell(), setbinary(), setdebug(), setform(); | |
5ac6fc46 SL |
11 | int setglob(), sethash(), setmode(), setpeer(), setport (); |
12 | int setprompt(), setstruct(); | |
9248b609 | 13 | int settenex(), settrace(), settype(), setverbose(); |
53f01c40 | 14 | int disconnect(); |
5ac6fc46 SL |
15 | int cd(), lcd(), delete(), mdelete(), user(); |
16 | int ls(), get(), mget(), help(), append(), put(), mput(); | |
53f01c40 SL |
17 | int quit(), renamefile(), status(); |
18 | int quote(), rmthelp(), shell(); | |
19 | int pwd(), makedir(), removedir(); | |
20 | ||
5ac6fc46 | 21 | char appendhelp[] = "append to a file"; |
53f01c40 SL |
22 | char asciihelp[] = "set ascii transfer type"; |
23 | char beephelp[] = "beep when command completed"; | |
24 | char binaryhelp[] = "set binary transfer type"; | |
25 | char cdhelp[] = "change remote working directory"; | |
26 | char connecthelp[] = "connect to remote tftp"; | |
27 | char deletehelp[] = "delete remote file"; | |
28 | char debughelp[] = "toggle/set debugging mode"; | |
29 | char dirhelp[] = "list contents of remote directory"; | |
30 | char disconhelp[] = "terminate ftp session"; | |
31 | char formhelp[] = "set file transfer format"; | |
9248b609 | 32 | char globhelp[] = "toggle metacharacter expansion of local file names"; |
5ac6fc46 | 33 | char hashhelp[] = "toggle printing `#' for each buffer transferred"; |
53f01c40 SL |
34 | char helphelp[] = "print local help information"; |
35 | char lcdhelp[] = "change local working directory"; | |
36 | char lshelp[] = "nlist contents of remote directory"; | |
5ac6fc46 | 37 | char mdeletehelp[] = "delete multiple files"; |
9248b609 | 38 | char mgethelp[] = "get multiple files"; |
53f01c40 SL |
39 | char mkdirhelp[] = "make directory on the remote machine"; |
40 | char modehelp[] = "set file transfer mode"; | |
9248b609 | 41 | char mputhelp[] = "send multiple files"; |
5ac6fc46 | 42 | char porthelp[] = "toggle use of PORT cmd for each data connection"; |
53f01c40 SL |
43 | char prompthelp[] = "force interactive prompting on multiple commands"; |
44 | char pwdhelp[] = "print working directory on remote machine"; | |
45 | char quithelp[] = "terminate ftp session and exit"; | |
46 | char quotehelp[] = "send arbitrary ftp command"; | |
47 | char receivehelp[] = "receive file"; | |
48 | char remotehelp[] = "get help from remote server"; | |
49 | char renamehelp[] = "rename file"; | |
50 | char rmdirhelp[] = "remove directory on the remote machine"; | |
9248b609 | 51 | char sendhelp[] = "send one file"; |
53f01c40 SL |
52 | char shellhelp[] = "escape to the shell"; |
53 | char statushelp[] = "show current status"; | |
54 | char structhelp[] = "set file transfer structure"; | |
55 | char tenexhelp[] = "set tenex file transfer type"; | |
56 | char tracehelp[] = "toggle packet tracing"; | |
57 | char typehelp[] = "set file transfer type"; | |
58 | char userhelp[] = "send new user information"; | |
59 | char verbosehelp[] = "toggle verbose mode"; | |
60 | ||
61 | struct cmd cmdtab[] = { | |
5ac6fc46 SL |
62 | { "!", shellhelp, 0, 0, shell }, |
63 | { "append", appendhelp, 1, 1, append }, | |
64 | { "ascii", asciihelp, 0, 1, setascii }, | |
65 | { "bell", beephelp, 0, 0, setbell }, | |
66 | { "binary", binaryhelp, 0, 1, setbinary }, | |
67 | { "bye", quithelp, 0, 0, quit }, | |
68 | { "cd", cdhelp, 0, 1, cd }, | |
69 | { "close", disconhelp, 0, 1, disconnect }, | |
70 | { "delete", deletehelp, 0, 1, delete }, | |
71 | { "debug", debughelp, 0, 0, setdebug }, | |
72 | { "dir", dirhelp, 1, 1, ls }, | |
73 | { "form", formhelp, 0, 1, setform }, | |
74 | { "get", receivehelp, 1, 1, get }, | |
75 | { "glob", globhelp, 0, 0, setglob }, | |
76 | { "hash", hashhelp, 0, 0, sethash }, | |
77 | { "help", helphelp, 0, 0, help }, | |
78 | { "lcd", lcdhelp, 0, 0, lcd }, | |
79 | { "ls", lshelp, 1, 1, ls }, | |
80 | { "mdelete", mdeletehelp, 1, 1, mdelete }, | |
81 | { "mget", mgethelp, 1, 1, mget }, | |
82 | { "mkdir", mkdirhelp, 0, 1, makedir }, | |
83 | { "mode", modehelp, 0, 1, setmode }, | |
84 | { "mput", mputhelp, 1, 1, mput }, | |
85 | { "open", connecthelp, 0, 0, setpeer }, | |
86 | { "prompt", prompthelp, 0, 0, setprompt }, | |
87 | { "sendport", porthelp, 0, 0, setport }, | |
88 | { "put", sendhelp, 1, 1, put }, | |
89 | { "pwd", pwdhelp, 0, 1, pwd }, | |
90 | { "quit", quithelp, 0, 0, quit }, | |
91 | { "quote", quotehelp, 1, 1, quote }, | |
92 | { "recv", receivehelp, 1, 1, get }, | |
93 | { "remotehelp", remotehelp, 0, 1, rmthelp }, | |
94 | { "rename", renamehelp, 0, 1, renamefile }, | |
95 | { "rmdir", rmdirhelp, 0, 1, removedir }, | |
96 | { "send", sendhelp, 1, 1, put }, | |
97 | { "status", statushelp, 0, 0, status }, | |
98 | { "struct", structhelp, 0, 1, setstruct }, | |
99 | { "tenex", tenexhelp, 0, 1, settenex }, | |
100 | { "trace", tracehelp, 0, 0, settrace }, | |
101 | { "type", typehelp, 0, 1, settype }, | |
102 | { "user", userhelp, 0, 1, user }, | |
103 | { "verbose", verbosehelp, 0, 0, setverbose }, | |
104 | { "?", helphelp, 0, 0, help }, | |
105 | { 0 }, | |
53f01c40 SL |
106 | }; |
107 | ||
108 | int NCMDS = sizeof (cmdtab) / sizeof (cmdtab[0]); |