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