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
argbase defined in line 75; used 4 times
argbuf defined in line 74; used 1 times
autologin defined in line 37; used 3 times
bell defined in line 35; used 7 times
bytename defined in line 62; used 2 times
bytesize defined in line 63; used 1 times
cpend defined in line 78; used 16 times
crflag defined in line 46; used 7 times
debug defined in line 34; used 18 times
doglob defined in line 36; used 11 times
form defined in line 59; used 1 times
formname defined in line 58; used 3 times
fromatty defined in line 32; used 10 times
hash defined in line 28; used 17 times
hostname defined in line 65; used 15 times
interactive defined in line 33; used 35 times
line defined in line 72; used 90 times
macbuf defined in line 103; used 5 times
macnum defined in line 101; used 24 times
macros defined in line 102; used 20 times
mapflag defined in line 44; used 12 times
mapin defined in line 52; used 5 times
mapout defined in line 53; used 5 times
mcase defined in line 42; used 10 times
mflag defined in line 79; used 36 times
mode defined in line 61; used 21 times
modename defined in line 60; used 3 times
ntflag defined in line 43; used 13 times
ntin defined in line 49; used 7 times
ntout defined in line 50; used 8 times
options defined in line 81; used 4 times
pasv defined in line 47; used 2 times
proxflag defined in line 39; used 6 times
runique defined in line 41; used 11 times
sendport defined in line 29; used 13 times
sp defined in line 67; used 3 times
stringbase defined in line 73; used 5 times
stru defined in line 57; used 1 times
structname defined in line 56; used 3 times
sunique defined in line 40; used 11 times
toplevel defined in line 70; used 3 times
trace defined in line 27; used 5 times
type defined in line 55; used 14 times
typename defined in line 54; used 5 times
verbose defined in line 30; used 58 times

Defined struct's

cmd defined in line 86; used 38 times
macel defined in line 95; used 2 times
  • in line 102(2)

Usage of this include

Last modified: 1994-01-11
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3875
Valid CSS Valid XHTML 1.0 Strict