1: /*
   2:  * Copyright (c) 1985, 1989 Regents of the University of California.
   3:  * All rights reserved.
   4:  *
   5:  * Redistribution and use in source and binary forms are permitted
   6:  * provided that the above copyright notice and this paragraph are
   7:  * duplicated in all such forms and that any documentation,
   8:  * advertising materials, and other materials related to such
   9:  * distribution and use acknowledge that the software was developed
  10:  * by the University of California, Berkeley.  The name of the
  11:  * University may not be used to endorse or promote products derived
  12:  * from this software without specific prior written permission.
  13:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  14:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  15:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  16:  */
  17: 
  18: #if !defined(lint) && !defined(pdp11)
  19: static char sccsid[] = "@(#)cmdtab.c	5.9.1 (2.11BSD GTE) 1/1/94";
  20: #endif
  21: 
  22: #include "ftp_var.h"
  23: 
  24: /*
  25:  * User FTP -- Command Tables.
  26:  */
  27: int setascii(), setbell(), setbinary(), setdebug(), setform();
  28: int setglob(), sethash(), setmode(), setpeer(), setport();
  29: int setprompt(), setstruct();
  30: int settenex(), settrace(), settype(), setverbose();
  31: int disconnect(), restart(), reget(), syst();
  32: int cd(), lcd(), delete(), mdelete(), user();
  33: int ls(), mls(), get(), mget(), help(), append(), put(), mput();
  34: int quit(), renamefile(), status();
  35: int quote(), rmthelp(), shell(), site();
  36: int pwd(), makedir(), removedir(), setcr();
  37: int account(), doproxy(), reset(), setcase(), setntrans(), setnmap();
  38: int setsunique(), setrunique(), cdup(), macdef(), domacro();
  39: int sizecmd(), modtime(), newer(), rmtstatus();
  40: int do_chmod(), do_umask(), idle();
  41: 
  42: char    accounthelp[] = "send account command to remote server";
  43: char    appendhelp[] =  "append to a file";
  44: char    asciihelp[] =   "set ascii transfer type";
  45: char    beephelp[] =    "beep when command completed";
  46: char    binaryhelp[] =  "set binary transfer type";
  47: char    casehelp[] =    "toggle mget upper/lower case id mapping";
  48: char    cdhelp[] =  "change remote working directory";
  49: char    cduphelp[] =    "change remote working directory to parent directory";
  50: char    chmodhelp[] =   "change file permissions of remote file";
  51: char    connecthelp[] = "connect to remote tftp";
  52: char    crhelp[] =  "toggle carriage return stripping on ascii gets";
  53: char    deletehelp[] =  "delete remote file";
  54: char    debughelp[] =   "toggle/set debugging mode";
  55: char    dirhelp[] = "list contents of remote directory";
  56: char    disconhelp[] =  "terminate ftp session";
  57: char    domachelp[] =   "execute macro";
  58: char    formhelp[] =    "set file transfer format";
  59: char    globhelp[] =    "toggle metacharacter expansion of local file names";
  60: char    hashhelp[] =    "toggle printing `#' for each buffer transferred";
  61: char    helphelp[] =    "print local help information";
  62: char    idlehelp[] =    "get (set) idle timer on remote side";
  63: char    lcdhelp[] = "change local working directory";
  64: char    lshelp[] =  "list contents of remote directory";
  65: char    macdefhelp[] =  "define a macro";
  66: char    mdeletehelp[] = "delete multiple files";
  67: char    mdirhelp[] =    "list contents of multiple remote directories";
  68: char    mgethelp[] =    "get multiple files";
  69: char    mkdirhelp[] =   "make directory on the remote machine";
  70: char    mlshelp[] = "list contents of multiple remote directories";
  71: char    modtimehelp[] = "show last modification time of remote file";
  72: char    modehelp[] =    "set file transfer mode";
  73: char    mputhelp[] =    "send multiple files";
  74: char    newerhelp[] =   "get file if remote file is newer than local file ";
  75: char    nlisthelp[] =   "nlist contents of remote directory";
  76: char    nmaphelp[] =    "set templates for default file name mapping";
  77: char    ntranshelp[] =  "set translation table for default file name mapping";
  78: char    porthelp[] =    "toggle use of PORT cmd for each data connection";
  79: char    prompthelp[] =  "force interactive prompting on multiple commands";
  80: char    proxyhelp[] =   "issue command on alternate connection";
  81: char    pwdhelp[] = "print working directory on remote machine";
  82: char    quithelp[] =    "terminate ftp session and exit";
  83: char    quotehelp[] =   "send arbitrary ftp command";
  84: char    receivehelp[] = "receive file";
  85: char    regethelp[] =   "get file restarting at end of local file";
  86: char    remotehelp[] =  "get help from remote server";
  87: char    renamehelp[] =  "rename file";
  88: char    restarthelp[]=  "restart file transfer at bytecount";
  89: char    rmdirhelp[] =   "remove directory on the remote machine";
  90: char    rmtstatushelp[]="show status of remote machine";
  91: char    runiquehelp[] = "toggle store unique for local files";
  92: char    resethelp[] =   "clear queued command replies";
  93: char    sendhelp[] =    "send one file";
  94: char    sitehelp[] =    "send site specific command to remote server\n\t\tTry \"rhelp site\" or \"site help\" for more information";
  95: char    shellhelp[] =   "escape to the shell";
  96: char    sizecmdhelp[] = "show size of remote file";
  97: char    statushelp[] =  "show current status";
  98: char    structhelp[] =  "set file transfer structure";
  99: char    suniquehelp[] = "toggle store unique on remote machine";
 100: char    systemhelp[] =  "show remote system type";
 101: char    tenexhelp[] =   "set tenex file transfer type";
 102: char    tracehelp[] =   "toggle packet tracing";
 103: char    typehelp[] =    "set file transfer type";
 104: char    umaskhelp[] =   "get (set) umask on remote side";
 105: char    userhelp[] =    "send new user information";
 106: char    verbosehelp[] = "toggle verbose mode";
 107: 
 108: struct cmd cmdtab[] = {
 109:     { "!",      shellhelp,  0,  0,  0,  shell },
 110:     { "$",      domachelp,  1,  0,  0,  domacro },
 111:     { "account",    accounthelp,    0,  1,  1,  account},
 112:     { "append", appendhelp, 1,  1,  1,  put },
 113:     { "ascii",  asciihelp,  0,  1,  1,  setascii },
 114:     { "bell",   beephelp,   0,  0,  0,  setbell },
 115:     { "binary", binaryhelp, 0,  1,  1,  setbinary },
 116:     { "bye",    quithelp,   0,  0,  0,  quit },
 117:     { "case",   casehelp,   0,  0,  1,  setcase },
 118:     { "cd",     cdhelp,     0,  1,  1,  cd },
 119:     { "cdup",   cduphelp,   0,  1,  1,  cdup },
 120:     { "chmod",  chmodhelp,  0,  1,  1,  do_chmod },
 121:     { "close",  disconhelp, 0,  1,  1,  disconnect },
 122:     { "cr",     crhelp,     0,  0,  0,  setcr },
 123:     { "delete", deletehelp, 0,  1,  1,  delete },
 124:     { "debug",  debughelp,  0,  0,  0,  setdebug },
 125:     { "dir",    dirhelp,    1,  1,  1,  ls },
 126:     { "disconnect", disconhelp, 0,  1,  1,  disconnect },
 127:     { "form",   formhelp,   0,  1,  1,  setform },
 128:     { "get",    receivehelp,    1,  1,  1,  get },
 129:     { "glob",   globhelp,   0,  0,  0,  setglob },
 130:     { "hash",   hashhelp,   0,  0,  0,  sethash },
 131:     { "help",   helphelp,   0,  0,  1,  help },
 132:     { "idle",   idlehelp,   0,  1,  1,  idle },
 133:     { "image",  binaryhelp, 0,  1,  1,  setbinary },
 134:     { "lcd",    lcdhelp,    0,  0,  0,  lcd },
 135:     { "ls",     lshelp,     1,  1,  1,  ls },
 136:     { "macdef", macdefhelp, 0,  0,  0,  macdef },
 137:     { "mdelete",    mdeletehelp,    1,  1,  1,  mdelete },
 138:     { "mdir",   mdirhelp,   1,  1,  1,  mls },
 139:     { "mget",   mgethelp,   1,  1,  1,  mget },
 140:     { "mkdir",  mkdirhelp,  0,  1,  1,  makedir },
 141:     { "mls",    mlshelp,    1,  1,  1,  mls },
 142:     { "mode",   modehelp,   0,  1,  1,  setmode },
 143:     { "modtime",    modtimehelp,    0,  1,  1,  modtime },
 144:     { "mput",   mputhelp,   1,  1,  1,  mput },
 145:     { "newer",  newerhelp,  1,  1,  1,  newer },
 146:     { "nmap",   nmaphelp,   0,  0,  1,  setnmap },
 147:     { "nlist",  nlisthelp,  1,  1,  1,  ls },
 148:     { "ntrans", ntranshelp, 0,  0,  1,  setntrans },
 149:     { "open",   connecthelp,    0,  0,  1,  setpeer },
 150:     { "prompt", prompthelp, 0,  0,  0,  setprompt },
 151:     { "proxy",  proxyhelp,  0,  0,  1,  doproxy },
 152:     { "sendport",   porthelp,   0,  0,  0,  setport },
 153:     { "put",    sendhelp,   1,  1,  1,  put },
 154:     { "pwd",    pwdhelp,    0,  1,  1,  pwd },
 155:     { "quit",   quithelp,   0,  0,  0,  quit },
 156:     { "quote",  quotehelp,  1,  1,  1,  quote },
 157:     { "recv",   receivehelp,    1,  1,  1,  get },
 158:     { "reget",  regethelp,  1,  1,  1,  reget },
 159:     { "rstatus",    rmtstatushelp,  0,  1,  1,  rmtstatus },
 160:     { "rhelp",  remotehelp, 0,  1,  1,  rmthelp },
 161:     { "rename", renamehelp, 0,  1,  1,  renamefile },
 162:     { "reset",  resethelp,  0,  1,  1,  reset },
 163:     { "restart",    restarthelp,    1,  1,  1,  restart },
 164:     { "rmdir",  rmdirhelp,  0,  1,  1,  removedir },
 165:     { "runique",    runiquehelp,    0,  0,  1,  setrunique },
 166:     { "send",   sendhelp,   1,  1,  1,  put },
 167:     { "site",   sitehelp,   0,  1,  1,  site },
 168:     { "size",   sizecmdhelp,    1,  1,  1,  sizecmd },
 169:     { "status", statushelp, 0,  0,  1,  status },
 170:     { "struct", structhelp, 0,  1,  1,  setstruct },
 171:     { "system", systemhelp, 0,  1,  1,  syst },
 172:     { "sunique",    suniquehelp,    0,  0,  1,  setsunique },
 173:     { "tenex",  tenexhelp,  0,  1,  1,  settenex },
 174:     { "trace",  tracehelp,  0,  0,  0,  settrace },
 175:     { "type",   typehelp,   0,  1,  1,  settype },
 176:     { "user",   userhelp,   0,  1,  1,  user },
 177:     { "umask",  umaskhelp,  0,  1,  1,  do_umask },
 178:     { "verbose",    verbosehelp,    0,  0,  0,  setverbose },
 179:     { "?",      helphelp,   0,  0,  1,  help },
 180:     { 0 },
 181: };
 182: 
 183: int NCMDS = (sizeof (cmdtab) / sizeof (cmdtab[0])) - 1;

Defined variables

NCMDS defined in line 183; never used
accounthelp defined in line 42; used 1 times
appendhelp defined in line 43; used 1 times
asciihelp defined in line 44; used 1 times
beephelp defined in line 45; used 1 times
binaryhelp defined in line 46; used 2 times
casehelp defined in line 47; used 1 times
cdhelp defined in line 48; used 1 times
cduphelp defined in line 49; used 1 times
chmodhelp defined in line 50; used 1 times
cmdtab defined in line 108; used 2 times
  • in line 183(2)
connecthelp defined in line 51; used 1 times
crhelp defined in line 52; used 1 times
debughelp defined in line 54; used 1 times
deletehelp defined in line 53; used 1 times
dirhelp defined in line 55; used 1 times
disconhelp defined in line 56; used 2 times
domachelp defined in line 57; used 1 times
formhelp defined in line 58; used 1 times
globhelp defined in line 59; used 1 times
hashhelp defined in line 60; used 1 times
helphelp defined in line 61; used 2 times
idlehelp defined in line 62; used 1 times
lcdhelp defined in line 63; used 1 times
lshelp defined in line 64; used 1 times
macdefhelp defined in line 65; used 1 times
mdeletehelp defined in line 66; used 1 times
mdirhelp defined in line 67; used 1 times
mgethelp defined in line 68; used 1 times
mkdirhelp defined in line 69; used 1 times
mlshelp defined in line 70; used 1 times
modehelp defined in line 72; used 1 times
modtimehelp defined in line 71; used 1 times
mputhelp defined in line 73; used 1 times
newerhelp defined in line 74; used 1 times
nlisthelp defined in line 75; used 1 times
nmaphelp defined in line 76; used 1 times
ntranshelp defined in line 77; used 1 times
porthelp defined in line 78; used 1 times
prompthelp defined in line 79; used 1 times
proxyhelp defined in line 80; used 1 times
pwdhelp defined in line 81; used 1 times
quithelp defined in line 82; used 2 times
quotehelp defined in line 83; used 1 times
receivehelp defined in line 84; used 2 times
regethelp defined in line 85; used 1 times
remotehelp defined in line 86; used 1 times
renamehelp defined in line 87; used 1 times
resethelp defined in line 92; used 1 times
restarthelp defined in line 88; used 1 times
rmdirhelp defined in line 89; used 1 times
rmtstatushelp defined in line 90; used 1 times
runiquehelp defined in line 91; used 1 times
sccsid defined in line 19; never used
sendhelp defined in line 93; used 2 times
shellhelp defined in line 95; used 1 times
sitehelp defined in line 94; used 1 times
sizecmdhelp defined in line 96; used 1 times
statushelp defined in line 97; used 1 times
structhelp defined in line 98; used 1 times
suniquehelp defined in line 99; used 1 times
systemhelp defined in line 100; used 1 times
tenexhelp defined in line 101; used 1 times
tracehelp defined in line 102; used 1 times
typehelp defined in line 103; used 1 times
umaskhelp defined in line 104; used 1 times
userhelp defined in line 105; used 1 times
verbosehelp defined in line 106; used 1 times
Last modified: 1994-01-11
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2225
Valid CSS Valid XHTML 1.0 Strict