home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TCPIP / NETKIT-B.05 / NETKIT-B / NetKit-B-0.05 / ftp / ftp_var.h,v < prev    next >
Encoding:
Text File  |  1994-05-23  |  5.6 KB  |  160 lines

  1. head    1.1;
  2. access;
  3. symbols;
  4. locks
  5.     rzsfl:1.1; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.1
  10. date    94.05.23.09.03.42;    author rzsfl;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @Original
  17. @
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @/*
  26.  * Copyright (c) 1985, 1989 Regents of the University of California.
  27.  * All rights reserved.
  28.  *
  29.  * Redistribution and use in source and binary forms, with or without
  30.  * modification, are permitted provided that the following conditions
  31.  * are met:
  32.  * 1. Redistributions of source code must retain the above copyright
  33.  *    notice, this list of conditions and the following disclaimer.
  34.  * 2. Redistributions in binary form must reproduce the above copyright
  35.  *    notice, this list of conditions and the following disclaimer in the
  36.  *    documentation and/or other materials provided with the distribution.
  37.  * 3. All advertising materials mentioning features or use of this software
  38.  *    must display the following acknowledgement:
  39.  *    This product includes software developed by the University of
  40.  *    California, Berkeley and its contributors.
  41.  * 4. Neither the name of the University nor the names of its contributors
  42.  *    may be used to endorse or promote products derived from this software
  43.  *    without specific prior written permission.
  44.  *
  45.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  46.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  47.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  48.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  49.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  50.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  51.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  52.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  53.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  54.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  55.  * SUCH DAMAGE.
  56.  *
  57.  *    from: @@(#)ftp_var.h    5.9 (Berkeley) 6/1/90
  58.  *    $Id: ftp_var.h,v 1.2 1993/08/01 18:15:34 mycroft Exp $
  59.  */
  60.  
  61. /*
  62.  * FTP global variables.
  63.  */
  64.  
  65. /*
  66.  * Options and other state info.
  67.  */
  68. int    trace;            /* trace packets exchanged */
  69. int    hash;            /* print # for each buffer transferred */
  70. int    sendport;        /* use PORT cmd for each data connection */
  71. int    verbose;        /* print messages coming back from server */
  72. int    connected;        /* connected to server */
  73. int    fromatty;        /* input is from a terminal */
  74. int    interactive;        /* interactively prompt on m* cmds */
  75. int    debug;            /* debugging level */
  76. int    bell;            /* ring bell on cmd completion */
  77. int    doglob;            /* glob local file names */
  78. int    autologin;        /* establish user account on connection */
  79. int    proxy;            /* proxy server connection active */
  80. int    proxflag;        /* proxy connection exists */
  81. int    sunique;        /* store files on server with unique name */
  82. int    runique;        /* store local files with unique name */
  83. int    mcase;            /* map upper to lower case for mget names */
  84. int    ntflag;            /* use ntin ntout tables for name translation */
  85. int    mapflag;        /* use mapin mapout templates on file names */
  86. int    code;            /* return/reply code for ftp command */
  87. int    crflag;            /* if 1, strip car. rets. on ascii gets */
  88. char    pasv[64];        /* passive port for proxy data connection */
  89. char    *altarg;        /* argv[1] with no shell-like preprocessing  */
  90. char    ntin[17];        /* input translation table */
  91. char    ntout[17];        /* output translation table */
  92. #include <sys/param.h>
  93. char    mapin[MAXPATHLEN];    /* input map template */
  94. char    mapout[MAXPATHLEN];    /* output map template */
  95. char    typename[32];        /* name of file transfer type */
  96. int    type;            /* requested file transfer type */
  97. int    curtype;        /* current file transfer type */
  98. char    structname[32];        /* name of file transfer structure */
  99. int    stru;            /* file transfer structure */
  100. char    formname[32];        /* name of file transfer format */
  101. int    form;            /* file transfer format */
  102. char    modename[32];        /* name of file transfer mode */
  103. int    mode;            /* file transfer mode */
  104. char    bytename[32];        /* local byte size in ascii */
  105. int    bytesize;        /* local byte size in binary */
  106.  
  107. char    *hostname;        /* name of host connected to */
  108. int    unix_server;        /* server is unix, can use binary for ascii */
  109. int    unix_proxy;        /* proxy is unix, can use binary for ascii */
  110.  
  111. struct    servent *sp;        /* service spec for tcp/ftp */
  112.  
  113. #include <setjmp.h>
  114. jmp_buf    toplevel;        /* non-local goto stuff for cmd scanner */
  115.  
  116. char    line[200];        /* input line buffer */
  117. char    *stringbase;        /* current scan point in line buffer */
  118. char    argbuf[200];        /* argument storage buffer */
  119. char    *argbase;        /* current storage point in arg buffer */
  120. int    margc;            /* count of arguments on input line */
  121. char    *margv[20];        /* args parsed from input line */
  122. int     cpend;                  /* flag: if != 0, then pending server reply */
  123. int    mflag;            /* flag: if != 0, then active multi command */
  124.  
  125. int    options;        /* used during socket creation */
  126.  
  127. /*
  128.  * Format of command table.
  129.  */
  130. struct cmd {
  131.     char    *c_name;    /* name of command */
  132.     char    *c_help;    /* help string */
  133.     char    c_bell;        /* give bell when command completes */
  134.     char    c_conn;        /* must be connected to use command */
  135.     char    c_proxy;    /* proxy server may execute */
  136.     int    (*c_handler)();    /* function to call */
  137. };
  138.  
  139. struct macel {
  140.     char mac_name[9];    /* macro name */
  141.     char *mac_start;    /* start of macro in macbuf */
  142.     char *mac_end;        /* end of macro in macbuf */
  143. };
  144.  
  145. int macnum;            /* number of defined macros */
  146. struct macel macros[16];
  147. char macbuf[4096];
  148.  
  149. extern    char *tail();
  150. extern    char *index();
  151. extern    char *rindex();
  152. extern    char *remglob();
  153. extern    int errno;
  154. extern    char *mktemp();
  155. extern    char *strncpy();
  156. extern    char *strncat();
  157. extern    char *strcat();
  158. extern    char *strcpy();
  159. @
  160.