# 2.11BSD#431 - /usr/src/ucb/ftp/ftp_var.h

##### Variables

    altarg            X
    argbase           X
    argbuf            X
    autologin         X
    bell              X
    bytename          X
    bytesize          X
    code              X
    connected         X
    cpend             X
    crflag            X
    debug             X
    doglob            X
    form              X
    formname          X
    fromatty          X
    hash              X
    hostname          X
    interactive       X
    line              X
    macbuf            X
    macnum            X
    macros            X
    mapflag           X
    mapin             X
    mapout            X
    margc             X
    margv             X
    mcase             X
    mflag             X
    mode              X
    modename          X
    ntflag            X
    ntin              X
    ntout             X
    options           X
    pasv              X
    proxflag          X
    proxy             X
    runique           X
    sendport          X
    sp                X
    stringbase        X
    stru              X
    structname        X
    sunique           X
    toplevel          X
    trace             X
    type              X
    typename          X
    verbose           X

##### struct's

    cmd               X
    macel             X

       1: /*
       2:  * Copyright (c) 1985 Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted
       6:  * provided that the above copyright notice and this paragraph are
       7:  * duplicated in all such forms and that any documentation,
       8:  * advertising materials, and other materials related to such
       9:  * distribution and use acknowledge that the software was developed
      10:  * by the University of California, Berkeley.  The name of the
      11:  * University may not be used to endorse or promote products derived
      12:  * from this software without specific prior written permission.
      13:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
      14:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
      15:  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
      16:  *
      17:  *	@(#)ftp_var.h	5.5.1 (2.11BSD GTE) 1/1/94
      18:  */
      19:
      20: /*
      21:  * FTP global variables.
      22:  */
      23:
      24: /*
      25:  * Options and other state info.
      26:  */
      27: int trace;          /* trace packets exchanged */
      28: int hash;           /* print # for each buffer transferred */
      29: int sendport;       /* use PORT cmd for each data connection */
      30: int verbose;        /* print messages coming back from server */
      31: int connected;      /* connected to server */
      32: int fromatty;       /* input is from a terminal */
      33: int interactive;        /* interactively prompt on m* cmds */
      34: int debug;          /* debugging level */
      35: int bell;           /* ring bell on cmd completion */
      36: int doglob;         /* glob local file names */
      37: int autologin;      /* establish user account on connection */
      38: int proxy;          /* proxy server connection active */
      39: int proxflag;       /* proxy connection exists */
      40: int sunique;        /* store files on server with unique name */
      41: int runique;        /* store local files with unique name */
      42: int mcase;          /* map upper to lower case for mget names */
      43: int ntflag;         /* use ntin ntout tables for name translation */
      44: int mapflag;        /* use mapin mapout templates on file names */
      45: int code;           /* return/reply code for ftp command */
      46: int crflag;         /* if 1, strip car. rets. on ascii gets */
      47: char    pasv[64];       /* passive port for proxy data connection */
      48: char    *altarg;        /* argv[1] with no shell-like preprocessing  */
      49: char    ntin[17];       /* input translation table */
      50: char    ntout[17];      /* output translation table */
      51: #include <sys/param.h>
      52: char    mapin[MAXPATHLEN];  /* input map template */
      53: char    mapout[MAXPATHLEN]; /* output map template */
      54: char    typename[32];       /* name of file transfer type */
      55: int type;           /* file transfer type */
      56: char    structname[32];     /* name of file transfer structure */
      57: int stru;           /* file transfer structure */
      58: char    formname[32];       /* name of file transfer format */
      59: int form;           /* file transfer format */
      60: char    modename[32];       /* name of file transfer mode */
      61: int mode;           /* file transfer mode */
      62: char    bytename[32];       /* local byte size in ascii */
      63: int bytesize;       /* local byte size in binary */
      64:
      65: char    *hostname;      /* name of host connected to */
      66:
      67: struct  servent *sp;        /* service spec for tcp/ftp */
      68:
      69: #include <setjmp.h>
      70: jmp_buf toplevel;       /* non-local goto stuff for cmd scanner */
      71:
      72: char    line[200];      /* input line buffer */
      73: char    *stringbase;        /* current scan point in line buffer */
      74: char    argbuf[200];        /* argument storage buffer */
      75: char    *argbase;       /* current storage point in arg buffer */
      76: int margc;          /* count of arguments on input line */
      77: char    *margv[20];     /* args parsed from input line */
      78: int     cpend;                  /* flag: if != 0, then pending server reply */
      79: int mflag;          /* flag: if != 0, then active multi command */
      80:
      81: int options;        /* used during socket creation */
      82:
      83: /*
      84:  * Format of command table.
      85:  */
      86: struct cmd {
      87:     char    *c_name;    /* name of command */
      88:     char    *c_help;    /* help string */
      89:     char    c_bell;     /* give bell when command completes */
      90:     char    c_conn;     /* must be connected to use command */
      91:     char    c_proxy;    /* proxy server may execute */
      92:     int (*c_handler)(); /* function to call */
      93: };
      94:
      95: struct macel {
      96:     char mac_name[9];   /* macro name */
      97:     char *mac_start;    /* start of macro in macbuf */
      98:     char *mac_end;      /* end of macro in macbuf */
      99: };
     100:
     101: int macnum;         /* number of defined macros */
     102: struct macel macros[16];
     103: char macbuf[4096];
     104:
     105: extern  char *tail();
     106: extern  char *index();
     107: extern  char *rindex();
     108: extern  char *remglob();
     109: extern  int errno;
     110: extern  char *mktemp();
     111: extern  char *strncpy();
     112: extern  char *strncat();
     113: extern  char *strcat();
     114: extern  char *strcpy();

#### Defined variables

altarg defined in line 48; used 8 times

- in /usr/src/ucb/ftp/cmds.c line 1246, 1810-1817(4)
- in /usr/src/ucb/ftp/main.c line 324, 348, 417

argbase defined in line 75; used 4 times

- in /usr/src/ucb/ftp/main.c line 296, 312-313(2), 406

argbuf defined in line 74; used 1 times

- in /usr/src/ucb/ftp/main.c line 296

autologin defined in line 37; used 3 times

- in /usr/src/ucb/ftp/cmds.c line 104
- in /usr/src/ucb/ftp/main.c line 64, 88

bell defined in line 35; used 7 times

- in /usr/src/ucb/ftp/cmds.c line 814, 849-851(4)
- in /usr/src/ucb/ftp/domacro.c line 129
- in /usr/src/ucb/ftp/main.c line 243

bytename defined in line 62; used 2 times

- in /usr/src/ucb/ftp/cmds.c line 159
- in /usr/src/ucb/ftp/main.c line 110

bytesize defined in line 63; used 1 times

- in /usr/src/ucb/ftp/main.c line 110

code defined in line 45; used 128 times

- in /usr/src/ucb/ftp/cmds.c line 72, 85, 94, 183-188(2), 196, 264, 276, 288, 318, 334, 376, 524, 540, 666, 839, 851, 863, 875, 890, 902, 915, 928, 945, 956, 977-980(2), 1000-1013(4), 1033, 1059, 1105, 1137-1147(3), 1182, 1189, 1252, 1262-1265(2), 1290, 1331, 1355-1358(2), 1382-1385(2), 1411, 1446, 1465, 1478, 1672, 1679, 1685, 1691-1695(2), 1705, 1723, 1730, 1740-1744(2), 1792, 1805-1809(2), 1996, 2003, 2009, 2046, 2059, 2076, 2082-2087(2), 2099, 2122, 2146
- in /usr/src/ucb/ftp/domacro.c line 52, 62, 114-122(3)
- in /usr/src/ucb/ftp/ftp.c line 112, 124, 145, 151, 157, 168, 178, 207, 301, 338, 364, 372, 383-384(3), 398, 410-412(2), 419, 492, 505, 514, 523, 531, 668, 678, 738, 749, 760, 767, 773, 779, 785, 1038, 1062, 1069, 1077, 1351, 1489, 1498, 1520, 1564, 1572, 1595, 1610, 1636, 1650

connected defined in line 31; used 20 times

- in /usr/src/ucb/ftp/cmds.c line 69, 103, 797, 803, 1524-1527(2), 1541, 1548, 1642, 1700, 1709
- in /usr/src/ucb/ftp/domacro.c line 120
- in /usr/src/ucb/ftp/ftp.c line 1266-1267(2), 1348
- in /usr/src/ucb/ftp/main.c line 158, 169-172(2), 178, 238

cpend defined in line 78; used 16 times

- in /usr/src/ucb/ftp/ftp.c line 314, 417, 481, 667, 729, 1037, 1286-1287(2), 1452, 1471, 1502, 1527, 1546, 1577, 1602
- in /usr/src/ucb/ftp/main.c line 113

crflag defined in line 46; used 7 times

- in /usr/src/ucb/ftp/cmds.c line 818, 1728-1730(4)
- in /usr/src/ucb/ftp/ftp.c line 727
- in /usr/src/ucb/ftp/main.c line 115

debug defined in line 34; used 18 times

- in /usr/src/ucb/ftp/cmds.c line 113, 582, 949-956(6), 1241, 2150
- in /usr/src/ucb/ftp/ftp.c line 186, 287, 794, 807, 828, 997, 1022
- in /usr/src/ucb/ftp/main.c line 72

doglob defined in line 36; used 11 times

- in /usr/src/ucb/ftp/cmds.c line 435, 732, 743, 815, 926-928(4), 1587
- in /usr/src/ucb/ftp/main.c line 62, 92

form defined in line 59; used 1 times

- in /usr/src/ucb/ftp/main.c line 107

formname defined in line 58; used 3 times

- in /usr/src/ucb/ftp/cmds.c line 275, 812
- in /usr/src/ucb/ftp/main.c line 107

fromatty defined in line 32; used 10 times

- in /usr/src/ucb/ftp/cmds.c line 418, 441, 467, 633, 705, 1073, 1200
- in /usr/src/ucb/ftp/main.c line 102, 111, 214

hash defined in line 28; used 17 times

- in /usr/src/ucb/ftp/cmds.c line 754(2), 763, 832, 873-876(5)
- in /usr/src/ucb/ftp/ftp.c line 591, 599, 619, 636, 897, 905, 948, 971

hostname defined in line 65; used 15 times

- in /usr/src/ucb/ftp/cmds.c line 71, 798, 804
- in /usr/src/ucb/ftp/ftp.c line 120, 172, 192, 379, 1268-1273(3)
- in /usr/src/ucb/ftp/ruserpass.c line 106-111(5)

interactive defined in line 33; used 35 times

- in /usr/src/ucb/ftp/cmds.c line 417-424(4), 440-447(4), 466-473(4), 634-640(4), 704-711(4), 814, 913-915(4), 1074-1079(3), 1201-1206(3), 1560, 2062
- in /usr/src/ucb/ftp/main.c line 63, 84

line defined in line 72; used 90 times

- in /usr/src/ucb/ftp/cmds.c line 76-78(3), 308-310(3), 322-324(3), 367-369(3), 514-516(3), 528-530(3), 657-659(3), 968-970(3), 1024-1026(3), 1050-1052(3), 1095-1097(3), 1109-1111(3), 1165-1167(3), 1173-1175(3), 1281-1283(3), 1346-1348(3), 1373-1375(3), 1402-1404(3), 1437-1439(3), 1469-1471(3), 1558, 1564-1565(3), 1663-1665(3), 1796-1798(3), 2050-2052(3), 2113-2115(3), 2137-2139(3)
- in /usr/src/ucb/ftp/domacro.c line 43-45(3), 65, 72, 126, 132
- in /usr/src/ucb/ftp/ftp.c line 251
- in /usr/src/ucb/ftp/main.c line 218-223(2), 295

macbuf defined in line 103; used 5 times

- in /usr/src/ucb/ftp/cmds.c line 2067, 2073
- in /usr/src/ucb/ftp/ruserpass.c line 191, 197, 212

macnum defined in line 101; used 24 times

- in /usr/src/ucb/ftp/cmds.c line 833-835(2), 1551, 2044, 2065-2072(6), 2080-2086(3)
- in /usr/src/ucb/ftp/domacro.c line 55-60(2)
- in /usr/src/ucb/ftp/ftp.c line 249
- in /usr/src/ucb/ftp/ruserpass.c line 168-172(2), 190-196(5), 205

macros defined in line 102; used 20 times

- in /usr/src/ucb/ftp/cmds.c line 836, 2065-2072(5), 2080-2086(3)
- in /usr/src/ucb/ftp/domacro.c line 56, 67-68(2), 137
- in /usr/src/ucb/ftp/ftp.c line 250
- in /usr/src/ucb/ftp/ruserpass.c line 172, 191-196(4), 205

mapflag defined in line 44; used 12 times

- in /usr/src/ucb/ftp/cmds.c line 348, 413, 438, 464, 564, 700, 825, 1790-1792(2), 1808
- in /usr/src/ucb/ftp/ftp.c line 1302-1303(2)

mapin defined in line 52; used 5 times

- in /usr/src/ucb/ftp/cmds.c line 826, 1817, 1827
- in /usr/src/ucb/ftp/ftp.c line 1304-1306(2)

mapout defined in line 53; used 5 times

- in /usr/src/ucb/ftp/cmds.c line 826, 1819, 1873
- in /usr/src/ucb/ftp/ftp.c line 1307-1309(2)

margc defined in line 76; used 33 times

- in /usr/src/ucb/ftp/cmds.c line 80, 312, 326, 371, 518, 532, 661, 972, 1028, 1054, 1099, 1113, 1169, 1177, 1285, 1350, 1377, 1406, 1441, 1473, 1667, 1800, 2054, 2117, 2141
- in /usr/src/ucb/ftp/domacro.c line 47, 128, 134
- in /usr/src/ucb/ftp/ftp.c line 253
- in /usr/src/ucb/ftp/main.c line 226, 242, 293, 299

margv defined in line 77; used 33 times

- in /usr/src/ucb/ftp/cmds.c line 81, 313, 327, 372, 519, 533, 662, 973, 1029, 1055, 1100, 1114, 1170, 1178, 1286, 1351, 1378, 1407, 1442, 1474, 1668, 1801, 2055, 2118, 2142
- in /usr/src/ucb/ftp/domacro.c line 48, 111, 128, 135
- in /usr/src/ucb/ftp/ftp.c line 253
- in /usr/src/ucb/ftp/main.c line 229, 242, 294

mcase defined in line 42; used 10 times

- in /usr/src/ucb/ftp/cmds.c line 393, 543, 680, 818, 1721-1723(4)
- in /usr/src/ucb/ftp/ftp.c line 1292-1293(2)

mflag defined in line 79; used 36 times

- in /usr/src/ucb/ftp/cmds.c line 380, 388-391(2), 418-422(2), 429, 436-445(3), 462-471(3), 483, 633, 642, 670-678(3), 705-709(2), 716, 731, 1063-1077(5), 1084, 1194-1204(4), 1210
- in /usr/src/ucb/ftp/ftp.c line 443, 690, 1325

mode defined in line 61; used 21 times

- in /usr/src/ucb/ftp/cmds.c line 501-503(2), 620, 729, 758-759(3), 1160, 1198-1199(2)
- in /usr/src/ucb/ftp/ftp.c line 464, 479, 556, 576, 697-698(2), 860, 1162-1163(2), 1176
- in /usr/src/ucb/ftp/main.c line 108

modename defined in line 60; used 3 times

- in /usr/src/ucb/ftp/cmds.c line 263, 812
- in /usr/src/ucb/ftp/main.c line 108

ntflag defined in line 43; used 13 times

- in /usr/src/ucb/ftp/cmds.c line 345, 410, 437, 463, 562, 697, 819, 1738-1744(4)
- in /usr/src/ucb/ftp/ftp.c line 1294-1295(2)

ntin defined in line 49; used 7 times

- in /usr/src/ucb/ftp/cmds.c line 820, 1745-1746(2), 1766-1767(2)
- in /usr/src/ucb/ftp/ftp.c line 1296-1298(2)

ntout defined in line 50; used 8 times

- in /usr/src/ucb/ftp/cmds.c line 820, 1748-1752(3), 1763, 1770
- in /usr/src/ucb/ftp/ftp.c line 1299-1301(2)

options defined in line 81; used 4 times

- in /usr/src/ucb/ftp/cmds.c line 952-954(2)
- in /usr/src/ucb/ftp/ftp.c line 1126
- in /usr/src/ucb/ftp/main.c line 71

pasv defined in line 47; used 2 times

- in /usr/src/ucb/ftp/ftp.c line 334, 1371

proxflag defined in line 39; used 6 times

- in /usr/src/ucb/ftp/cmds.c line 1643-1646(2), 1710-1713(2)
- in /usr/src/ucb/ftp/ftp.c line 377
- in /usr/src/ucb/ftp/main.c line 180

proxy defined in line 38; used 25 times

- in /usr/src/ucb/ftp/cmds.c line 383, 673, 756-761(2), 801, 1550, 1637-1639(2), 1811
- in /usr/src/ucb/ftp/ftp.c line 247, 472, 720, 1227, 1253-1264(4), 1448-1450(2), 1526, 1601, 1616
- in /usr/src/ucb/ftp/main.c line 114, 458
- in /usr/src/ucb/ftp/ruserpass.c line 159

runique defined in line 41; used 11 times

- in /usr/src/ucb/ftp/cmds.c line 817, 2001-2003(4)
- in /usr/src/ucb/ftp/ftp.c line 763, 770, 777, 1290-1291(2), 1341

sendport defined in line 29; used 13 times

- in /usr/src/ucb/ftp/cmds.c line 832, 900-902(4)
- in /usr/src/ucb/ftp/ftp.c line 1106, 1114-1117(2), 1136, 1144-1145(2), 1152-1157(2)

sp defined in line 67; used 3 times

- in /usr/src/ucb/ftp/cmds.c line 88
- in /usr/src/ucb/ftp/main.c line 57-58(2)

stringbase defined in line 73; used 5 times

- in /usr/src/ucb/ftp/main.c line 295, 311, 319-324(2), 407

stru defined in line 57; used 1 times

- in /usr/src/ucb/ftp/main.c line 109

structname defined in line 56; used 3 times

- in /usr/src/ucb/ftp/cmds.c line 287, 812
- in /usr/src/ucb/ftp/main.c line 109

sunique defined in line 40; used 11 times

- in /usr/src/ucb/ftp/cmds.c line 344, 416, 439, 465, 816, 1994-1996(4)
- in /usr/src/ucb/ftp/ftp.c line 1288-1289(2)

toplevel defined in line 70; used 3 times

- in /usr/src/ucb/ftp/main.c line 130, 136, 150

trace defined in line 27; used 5 times

- in /usr/src/ucb/ftp/cmds.c line 861-863(4)
- in /usr/src/ucb/ftp/main.c line 80

type defined in line 55; used 14 times

- in /usr/src/ucb/ftp/cmds.c line 205
- in /usr/src/ucb/ftp/ftp.c line 581, 791-792(3), 881, 1282-1285(4), 1346, 1354-1355(2)
- in /usr/src/ucb/ftp/main.c line 106

typename defined in line 54; used 5 times

- in /usr/src/ucb/ftp/cmds.c line 138, 187, 204, 812
- in /usr/src/ucb/ftp/main.c line 106

verbose defined in line 30; used 58 times

- in /usr/src/ucb/ftp/cmds.c line 112-114(2), 144, 581-587(3), 613, 753(2), 763, 814, 888-890(4), 981, 1325-1335(3), 1359, 1386, 1487-1491(3), 1497-1501(3), 1510-1514(3), 2010, 2149-2151(2), 2161
- in /usr/src/ucb/ftp/domacro.c line 125
- in /usr/src/ucb/ftp/ftp.c line 171, 368, 375-378(3), 406(2), 466, 714, 793-797(3), 808, 820, 829, 841, 998, 1010, 1023, 1035, 1187
- in /usr/src/ucb/ftp/main.c line 76, 112

#### Defined struct's

cmd defined in line 86; used 38 times

- in /usr/src/ucb/ftp/cmds.c line 1657-1659(6), 1676(2)
- in /usr/src/ucb/ftp/cmdtab.c line 108(2)
- in /usr/src/ucb/ftp/domacro.c line 39-40(4), 112(2)
- in /usr/src/ucb/ftp/main.c line 207-208(4), 230(2), 252-258(6), 278(2), 435-436(4), 483-485(4)

macel defined in line 95; used 2 times

- in line 102(2)

#### Usage of this include

ftp_var.h used 6 times

- in /usr/src/ucb/ftp/cmds.c line 43
- in /usr/src/ucb/ftp/cmdtab.c line 22
- in /usr/src/ucb/ftp/domacro.c line 22
- in /usr/src/ucb/ftp/ftp.c line 43
- in /usr/src/ucb/ftp/main.c line 29
- in /usr/src/ucb/ftp/ruserpass.c line 30

Last modified: 1994-01-11 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1660 |