1#include "ftp_locl.h" 2RCSID("$Id$"); 3 4/* 5 * Options and other state info. 6 */ 7int trace; /* trace packets exchanged */ 8int hash; /* print # for each buffer transferred */ 9int sendport; /* use PORT cmd for each data connection */ 10int verbose; /* print messages coming back from server */ 11int connected; /* connected to server */ 12int fromatty; /* input is from a terminal */ 13int interactive; /* interactively prompt on m* cmds */ 14int lineedit; /* use line-editing */ 15int debug; /* debugging level */ 16int bell; /* ring bell on cmd completion */ 17int doglob; /* glob local file names */ 18int doencrypt; /* try to use encryption */ 19int autologin; /* establish user account on connection */ 20int proxy; /* proxy server connection active */ 21int proxflag; /* proxy connection exists */ 22int sunique; /* store files on server with unique name */ 23int runique; /* store local files with unique name */ 24int mcase; /* map upper to lower case for mget names */ 25int ntflag; /* use ntin ntout tables for name translation */ 26int mapflag; /* use mapin mapout templates on file names */ 27int code; /* return/reply code for ftp command */ 28int crflag; /* if 1, strip car. rets. on ascii gets */ 29char pasv[64]; /* passive port for proxy data connection */ 30int passivemode; /* passive mode enabled */ 31char *altarg; /* argv[1] with no shell-like preprocessing */ 32char ntin[17]; /* input translation table */ 33char ntout[17]; /* output translation table */ 34char mapin[MaxPathLen]; /* input map template */ 35char mapout[MaxPathLen]; /* output map template */ 36char typename[32]; /* name of file transfer type */ 37int type; /* requested file transfer type */ 38int curtype; /* current file transfer type */ 39char structname[32]; /* name of file transfer structure */ 40int stru; /* file transfer structure */ 41char formname[32]; /* name of file transfer format */ 42int form; /* file transfer format */ 43char modename[32]; /* name of file transfer mode */ 44int mode; /* file transfer mode */ 45char bytename[32]; /* local byte size in ascii */ 46int bytesize; /* local byte size in binary */ 47 48char *hostname; /* name of host connected to */ 49int unix_server; /* server is unix, can use binary for ascii */ 50int unix_proxy; /* proxy is unix, can use binary for ascii */ 51 52jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ 53 54char line[200]; /* input line buffer */ 55char *stringbase; /* current scan point in line buffer */ 56char argbuf[200]; /* argument storage buffer */ 57char *argbase; /* current storage point in arg buffer */ 58int margc; /* count of arguments on input line */ 59char **margv; /* args parsed from input line */ 60int margvlen; /* how large margv is currently */ 61int cpend; /* flag: if != 0, then pending server reply */ 62int mflag; /* flag: if != 0, then active multi command */ 63 64int options; /* used during socket creation */ 65int use_kerberos; /* use Kerberos authentication */ 66 67/* 68 * Format of command table. 69 */ 70 71int macnum; /* number of defined macros */ 72struct macel macros[16]; 73char macbuf[4096]; 74 75char username[32]; 76 77/* these are set in ruserpassword */ 78char myhostname[MaxHostNameLen]; 79char *mydomain; 80