1 /* ftp_var.h 4.5 83/06/19 */ 2 3 /* 4 * FTP global variables. 5 */ 6 7 /* 8 * Options and other state info. 9 */ 10 int trace; /* trace packets exchanged */ 11 int hash; /* print # for each buffer transferred */ 12 int sendport; /* use PORT cmd for each data connection */ 13 int verbose; /* print messages coming back from server */ 14 int connected; /* connected to server */ 15 int fromatty; /* input is from a terminal */ 16 int interactive; /* interactively prompt on m* cmds */ 17 int debug; /* debugging level */ 18 int bell; /* ring bell on cmd completion */ 19 int doglob; /* glob local file names */ 20 int linger; /* linger on close of data connections */ 21 int autologin; /* establish user account on connection */ 22 23 char typename[32]; /* name of file transfer type */ 24 int type; /* file transfer type */ 25 char structname[32]; /* name of file transfer structure */ 26 int stru; /* file transfer structure */ 27 char formname[32]; /* name of file transfer format */ 28 int form; /* file transfer format */ 29 char modename[32]; /* name of file transfer mode */ 30 int mode; /* file transfer mode */ 31 char bytename[32]; /* local byte size in ascii */ 32 int bytesize; /* local byte size in binary */ 33 34 char *hostname; /* name of host connected to */ 35 36 struct servent *sp; /* service spec for tcp/ftp */ 37 38 #include <setjmp.h> 39 jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ 40 41 char line[200]; /* input line buffer */ 42 char *stringbase; /* current scan point in line buffer */ 43 char argbuf[200]; /* argument storage buffer */ 44 char *argbase; /* current storage point in arg buffer */ 45 int margc; /* count of arguments on input line */ 46 char *margv[20]; /* args parsed from input line */ 47 48 int options; /* used during socket creation */ 49 50 /* 51 * Format of command table. 52 */ 53 struct cmd { 54 char *c_name; /* name of command */ 55 char *c_help; /* help string */ 56 char c_bell; /* give bell when command completes */ 57 char c_conn; /* must be connected to use command */ 58 int (*c_handler)(); /* function to call */ 59 }; 60 61 extern char *tail(); 62 extern char *index(); 63 extern char *rindex(); 64 extern char *remglob(); 65 extern int errno; 66