1: /*
2: * Copyright (c) 1985 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)ftp_var.h 5.3 (Berkeley) 3/7/86
7: */
8:
9: /*
10: * FTP global variables.
11: */
12:
13: /*
14: * Options and other state info.
15: */
16: int trace; /* trace packets exchanged */
17: int hash; /* print # for each buffer transferred */
18: int sendport; /* use PORT cmd for each data connection */
19: int verbose; /* print messages coming back from server */
20: int connected; /* connected to server */
21: int fromatty; /* input is from a terminal */
22: int interactive; /* interactively prompt on m* cmds */
23: int debug; /* debugging level */
24: int bell; /* ring bell on cmd completion */
25: int doglob; /* glob local file names */
26: int autologin; /* establish user account on connection */
27: int proxy; /* proxy server connection active */
28: int proxflag; /* proxy connection exists */
29: int sunique; /* store files on server with unique name */
30: int runique; /* store local files with unique name */
31: int mcase; /* map upper to lower case for mget names */
32: int ntflag; /* use ntin ntout tables for name translation */
33: int mapflag; /* use mapin mapout templates on file names */
34: int code; /* return/reply code for ftp command */
35: int crflag; /* if 1, strip car. rets. on ascii gets */
36: char pasv[64]; /* passive port for proxy data connection */
37: char *altarg; /* argv[1] with no shell-like preprocessing */
38: char ntin[17]; /* input translation table */
39: char ntout[17]; /* output translation table */
40: #include <sys/param.h>
41: char mapin[MAXPATHLEN]; /* input map template */
42: char mapout[MAXPATHLEN]; /* output map template */
43: char typename[32]; /* name of file transfer type */
44: int type; /* file transfer type */
45: char structname[32]; /* name of file transfer structure */
46: int stru; /* file transfer structure */
47: char formname[32]; /* name of file transfer format */
48: int form; /* file transfer format */
49: char modename[32]; /* name of file transfer mode */
50: int mode; /* file transfer mode */
51: char bytename[32]; /* local byte size in ascii */
52: int bytesize; /* local byte size in binary */
53:
54: char *hostname; /* name of host connected to */
55:
56: struct servent *sp; /* service spec for tcp/ftp */
57:
58: #include <setjmp.h>
59: jmp_buf toplevel; /* non-local goto stuff for cmd scanner */
60:
61: char line[200]; /* input line buffer */
62: char *stringbase; /* current scan point in line buffer */
63: char argbuf[200]; /* argument storage buffer */
64: char *argbase; /* current storage point in arg buffer */
65: int margc; /* count of arguments on input line */
66: char *margv[20]; /* args parsed from input line */
67: int cpend; /* flag: if != 0, then pending server reply */
68: int mflag; /* flag: if != 0, then active multi command */
69:
70: int options; /* used during socket creation */
71:
72: /*
73: * Format of command table.
74: */
75: struct cmd {
76: char *c_name; /* name of command */
77: char *c_help; /* help string */
78: char c_bell; /* give bell when command completes */
79: char c_conn; /* must be connected to use command */
80: char c_proxy; /* proxy server may execute */
81: int (*c_handler)(); /* function to call */
82: };
83:
84: struct macel {
85: char mac_name[9]; /* macro name */
86: char *mac_start; /* start of macro in macbuf */
87: char *mac_end; /* end of macro in macbuf */
88: };
89:
90: int macnum; /* number of defined macros */
91: struct macel macros[16];
92: char macbuf[4096];
93:
94: extern char *tail();
95: extern char *index();
96: extern char *rindex();
97: extern char *remglob();
98: extern int errno;
99: extern char *mktemp();
100: extern char *strncpy();
101: extern char *strncat();
102: extern char *strcat();
103: extern char *strcpy();
Defined variables
bell
defined in line
24; used 7 times
code
defined in line
34; used 117 times
- in /usr/src/ucb/ftp/cmds.c line
53,
66,
75,
122-127(2),
135,
197,
209,
221,
251,
266,
307,
436,
450,
521,
693,
705,
717,
729,
744,
756,
769,
782,
799,
810,
831,
850-863(4),
883,
909,
955,
987-992(2),
1027,
1034,
1097,
1107-1110(2),
1135,
1191,
1214,
1239,
1417,
1424,
1430,
1436-1440(2),
1450,
1468,
1475,
1485-1489(2),
1537,
1550-1554(2),
1737,
1744,
1762,
1775,
1792,
1798-1803(2),
1814
- in /usr/src/ucb/ftp/domacro.c line
42,
52,
104-112(3)
- in /usr/src/ucb/ftp/ftp.c line
61,
73,
94,
100,
106,
117,
127,
157,
233,
261,
286,
293,
305-306(3),
320,
330-332(2),
338,
400,
413,
422,
430,
438,
532,
542,
591,
602,
613,
620,
626,
632,
638,
827,
851,
858,
866,
1142,
1280,
1289,
1311,
1355,
1363,
1386,
1401,
1427,
1441
connected
defined in line
20; used 20 times
- in /usr/src/ucb/ftp/cmds.c line
50,
82,
651,
657,
1272-1275(2),
1289,
1296,
1387,
1445,
1454
- in /usr/src/ucb/ftp/domacro.c line
110
- in /usr/src/ucb/ftp/ftp.c line
1057-1058(2),
1139
- in /usr/src/ucb/ftp/main.c line
150,
161-164(2),
170,
231
cpend
defined in line
67; used 16 times
- in /usr/src/ucb/ftp/ftp.c line
240,
336,
389,
531,
582,
826,
1077-1078(2),
1243,
1262,
1293,
1318,
1337,
1368,
1393
- in /usr/src/ucb/ftp/main.c line
105
debug
defined in line
23; used 15 times
doglob
defined in line
25; used 11 times
form
defined in line
48; used 1 times
hash
defined in line
17; used 17 times
interactive
defined in line
22; used 31 times
- in /usr/src/ucb/ftp/cmds.c line
349-354(3),
372-377(3),
396-401(3),
489-495(4),
560-565(3),
668,
767-769(4),
924-929(3),
1046-1051(3),
1308,
1778
- in /usr/src/ucb/ftp/main.c line
55,
76
line
defined in line
61; used 78 times
- in /usr/src/ucb/ftp/cmds.c line
57-59(3),
241-243(3),
255-257(3),
298-300(3),
426-428(3),
440-442(3),
512-514(3),
822-824(3),
874-876(3),
900-902(3),
945-947(3),
959-961(3),
1010-1012(3),
1018-1020(3),
1126-1128(3),
1182-1184(3),
1205-1207(3),
1230-1232(3),
1306,
1312-1313(3),
1408-1410(3),
1541-1543(3),
1766-1768(3)
- in /usr/src/ucb/ftp/domacro.c line
33-35(3),
55,
62,
116,
122
- in /usr/src/ucb/ftp/ftp.c line
198
- in /usr/src/ucb/ftp/main.c line
211-216(2),
287
macnum
defined in line
90; used 24 times
macros
defined in line
91; used 20 times
mapin
defined in line
41; used 5 times
margc
defined in line
65; used 29 times
- in /usr/src/ucb/ftp/cmds.c line
61,
245,
259,
302,
430,
444,
516,
826,
878,
904,
949,
963,
1014,
1022,
1130,
1186,
1209,
1234,
1412,
1545,
1770
- in /usr/src/ucb/ftp/domacro.c line
37,
118,
124
- in /usr/src/ucb/ftp/ftp.c line
200
- in /usr/src/ucb/ftp/main.c line
219,
235,
285,
291
margv
defined in line
66; used 29 times
- in /usr/src/ucb/ftp/cmds.c line
62,
246,
260,
303,
431,
445,
517,
827,
879,
905,
950,
964,
1015,
1023,
1131,
1187,
1210,
1235,
1413,
1546,
1771
- in /usr/src/ucb/ftp/domacro.c line
38,
101,
118,
125
- in /usr/src/ucb/ftp/ftp.c line
200
- in /usr/src/ucb/ftp/main.c line
222,
235,
286
mcase
defined in line
31; used 10 times
mflag
defined in line
68; used 36 times
- in /usr/src/ucb/ftp/cmds.c line
311,
319-322(2),
348-352(2),
359,
366-375(3),
390-399(3),
409,
488,
497,
525-533(3),
559-563(2),
570,
585,
913-927(5),
934,
1039-1049(4),
1055
- in /usr/src/ucb/ftp/ftp.c line
362,
554,
1116
mode
defined in line
50; used 14 times
ntflag
defined in line
32; used 13 times
ntin
defined in line
38; used 7 times
ntout
defined in line
39; used 8 times
pasv
defined in line
36; used 2 times
proxy
defined in line
27; used 25 times
- in /usr/src/ucb/ftp/cmds.c line
314,
528,
610-615(2),
655,
1298,
1382-1384(2),
1556
- in /usr/src/ucb/ftp/ftp.c line
194,
381,
573,
1018,
1044-1055(4),
1239-1241(2),
1317,
1392,
1407
- in /usr/src/ucb/ftp/main.c line
106,
449
- in /usr/src/ucb/ftp/ruserpass.c line
132
sp
defined in line
56; used 3 times
stru
defined in line
46; used 1 times
trace
defined in line
16; used 5 times
type
defined in line
44; used 13 times
verbose
defined in line
19; used 36 times
- in /usr/src/ucb/ftp/cmds.c line
607(2),
617,
668,
742-744(4),
1258-1262(3)
- in /usr/src/ucb/ftp/domacro.c line
115
- in /usr/src/ucb/ftp/ftp.c line
120,
290,
297-300(3),
326(2),
523,
545,
645-649(3),
656,
668,
677,
689,
783-787(2),
799,
812,
824,
875
- in /usr/src/ucb/ftp/main.c line
68,
104
Defined struct's
cmd
defined in line
75; used 36 times
macel
defined in line
84; used 2 times
Usage of this include