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