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