11590Srgrimes#include "ftp_locl.h" 21590SrgrimesRCSID("$Id$"); 31590Srgrimes 41590Srgrimes/* 51590Srgrimes * Options and other state info. 61590Srgrimes */ 71590Srgrimesint trace; /* trace packets exchanged */ 81590Srgrimesint hash; /* print # for each buffer transferred */ 91590Srgrimesint sendport; /* use PORT cmd for each data connection */ 101590Srgrimesint verbose; /* print messages coming back from server */ 111590Srgrimesint connected; /* connected to server */ 121590Srgrimesint fromatty; /* input is from a terminal */ 131590Srgrimesint interactive; /* interactively prompt on m* cmds */ 141590Srgrimesint lineedit; /* use line-editing */ 151590Srgrimesint debug; /* debugging level */ 161590Srgrimesint bell; /* ring bell on cmd completion */ 171590Srgrimesint doglob; /* glob local file names */ 181590Srgrimesint doencrypt; /* try to use encryption */ 191590Srgrimesint autologin; /* establish user account on connection */ 201590Srgrimesint proxy; /* proxy server connection active */ 211590Srgrimesint proxflag; /* proxy connection exists */ 221590Srgrimesint sunique; /* store files on server with unique name */ 231590Srgrimesint runique; /* store local files with unique name */ 241590Srgrimesint mcase; /* map upper to lower case for mget names */ 251590Srgrimesint ntflag; /* use ntin ntout tables for name translation */ 261590Srgrimesint mapflag; /* use mapin mapout templates on file names */ 271590Srgrimesint code; /* return/reply code for ftp command */ 281590Srgrimesint crflag; /* if 1, strip car. rets. on ascii gets */ 2950477Speterchar pasv[64]; /* passive port for proxy data connection */ 301590Srgrimesint passivemode; /* passive mode enabled */ 31140835Stjrchar *altarg; /* argv[1] with no shell-like preprocessing */ 321590Srgrimeschar ntin[17]; /* input translation table */ 3379535Sruchar ntout[17]; /* output translation table */ 341590Srgrimeschar mapin[MaxPathLen]; /* input map template */ 351590Srgrimeschar mapout[MaxPathLen]; /* output map template */ 361590Srgrimeschar typename[32]; /* name of file transfer type */ 371590Srgrimesint type; /* requested file transfer type */ 3868963Sruint curtype; /* current file transfer type */ 391590Srgrimeschar structname[32]; /* name of file transfer structure */ 401590Srgrimesint stru; /* file transfer structure */ 411590Srgrimeschar formname[32]; /* name of file transfer format */ 421590Srgrimesint form; /* file transfer format */ 431590Srgrimeschar modename[32]; /* name of file transfer mode */ 441590Srgrimesint mode; /* file transfer mode */ 4595079Scharnierchar bytename[32]; /* local byte size in ascii */ 4695079Scharnierint bytesize; /* local byte size in binary */ 4795079Scharnier 481590Srgrimeschar *hostname; /* name of host connected to */ 491590Srgrimesint unix_server; /* server is unix, can use binary for ascii */ 501590Srgrimesint unix_proxy; /* proxy is unix, can use binary for ascii */ 511590Srgrimes 521590Srgrimesjmp_buf toplevel; /* non-local goto stuff for cmd scanner */ 531590Srgrimes 541590Srgrimeschar line[200]; /* input line buffer */ 5568963Sruchar *stringbase; /* current scan point in line buffer */ 561590Srgrimeschar argbuf[200]; /* argument storage buffer */ 571590Srgrimeschar *argbase; /* current storage point in arg buffer */ 5895079Scharnierint margc; /* count of arguments on input line */ 5995079Scharnierchar **margv; /* args parsed from input line */ 601590Srgrimesint margvlen; /* how large margv is currently */ 611590Srgrimesint cpend; /* flag: if != 0, then pending server reply */ 621590Srgrimesint mflag; /* flag: if != 0, then active multi command */ 631590Srgrimes 641590Srgrimesint options; /* used during socket creation */ 651590Srgrimesint use_kerberos; /* use Kerberos authentication */ 661590Srgrimes 671590Srgrimes/* 681590Srgrimes * Format of command table. 691590Srgrimes */ 701590Srgrimes 711590Srgrimesint macnum; /* number of defined macros */ 721590Srgrimesstruct macel macros[16]; 731590Srgrimeschar macbuf[4096]; 741590Srgrimes 751590Srgrimeschar username[32]; 7668963Sru 771590Srgrimes/* these are set in ruserpassword */ 781590Srgrimeschar myhostname[MaxHostNameLen]; 791590Srgrimeschar *mydomain; 801590Srgrimes