1*21741Sdist /* 2*21741Sdist * Copyright (c) 1980 Regents of the University of California. 3*21741Sdist * All rights reserved. The Berkeley software License Agreement 4*21741Sdist * specifies the terms and conditions for redistribution. 5*21741Sdist * 6*21741Sdist * @(#)ftp_var.h 5.1 (Berkeley) 05/31/85 7*21741Sdist */ 810298Ssam 910298Ssam /* 1010298Ssam * FTP global variables. 1110298Ssam */ 1210298Ssam 1310298Ssam /* 1410298Ssam * Options and other state info. 1510298Ssam */ 1610298Ssam int trace; /* trace packets exchanged */ 1711652Ssam int hash; /* print # for each buffer transferred */ 1811652Ssam int sendport; /* use PORT cmd for each data connection */ 1910298Ssam int verbose; /* print messages coming back from server */ 2010298Ssam int connected; /* connected to server */ 2110298Ssam int fromatty; /* input is from a terminal */ 2210298Ssam int interactive; /* interactively prompt on m* cmds */ 2310298Ssam int debug; /* debugging level */ 2410298Ssam int bell; /* ring bell on cmd completion */ 2511349Ssam int doglob; /* glob local file names */ 2610298Ssam int autologin; /* establish user account on connection */ 2710298Ssam 2810298Ssam char typename[32]; /* name of file transfer type */ 2910298Ssam int type; /* file transfer type */ 3010298Ssam char structname[32]; /* name of file transfer structure */ 3110298Ssam int stru; /* file transfer structure */ 3210298Ssam char formname[32]; /* name of file transfer format */ 3310298Ssam int form; /* file transfer format */ 3410298Ssam char modename[32]; /* name of file transfer mode */ 3510298Ssam int mode; /* file transfer mode */ 3611220Ssam char bytename[32]; /* local byte size in ascii */ 3711220Ssam int bytesize; /* local byte size in binary */ 3810298Ssam 3910298Ssam char *hostname; /* name of host connected to */ 4010298Ssam 4110298Ssam struct servent *sp; /* service spec for tcp/ftp */ 4210298Ssam 4310298Ssam #include <setjmp.h> 4410298Ssam jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ 4510298Ssam 4610298Ssam char line[200]; /* input line buffer */ 4710298Ssam char *stringbase; /* current scan point in line buffer */ 4810298Ssam char argbuf[200]; /* argument storage buffer */ 4910298Ssam char *argbase; /* current storage point in arg buffer */ 5010298Ssam int margc; /* count of arguments on input line */ 5110298Ssam char *margv[20]; /* args parsed from input line */ 5210298Ssam 5310298Ssam int options; /* used during socket creation */ 5410298Ssam 5510298Ssam /* 5610298Ssam * Format of command table. 5710298Ssam */ 5810298Ssam struct cmd { 5910298Ssam char *c_name; /* name of command */ 6010298Ssam char *c_help; /* help string */ 6110298Ssam char c_bell; /* give bell when command completes */ 6211652Ssam char c_conn; /* must be connected to use command */ 6310298Ssam int (*c_handler)(); /* function to call */ 6410298Ssam }; 6510298Ssam 6610298Ssam extern char *tail(); 6710298Ssam extern char *index(); 6810298Ssam extern char *rindex(); 6911652Ssam extern char *remglob(); 7010298Ssam extern int errno; 71