Back to index

glibc  2.9
ftp.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1983, 1989, 1993
00003  *     The Regents of the University of California.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 4. Neither the name of the University nor the names of its contributors
00014  *    may be used to endorse or promote products derived from this software
00015  *    without specific prior written permission.
00016  *
00017  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00018  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00019  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00020  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00021  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00022  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00023  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00024  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00025  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00026  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00027  * SUCH DAMAGE.
00028  *
00029  *     @(#)ftp.h     8.1 (Berkeley) 6/2/93
00030  */
00031 
00032 #ifndef _ARPA_FTP_H
00033 #define       _ARPA_FTP_H 1
00034 
00035 /* Definitions for FTP; see RFC-765. */
00036 
00037 /*
00038  * Reply codes.
00039  */
00040 #define PRELIM              1      /* positive preliminary */
00041 #define COMPLETE     2      /* positive completion */
00042 #define CONTINUE     3      /* positive intermediate */
00043 #define TRANSIENT    4      /* transient negative completion */
00044 #define ERROR        5      /* permanent negative completion */
00045 
00046 /*
00047  * Type codes
00048  */
00049 #define       TYPE_A        1      /* ASCII */
00050 #define       TYPE_E        2      /* EBCDIC */
00051 #define       TYPE_I        3      /* image */
00052 #define       TYPE_L        4      /* local byte size */
00053 
00054 #ifdef FTP_NAMES
00055 char *typenames[] =  {"0", "ASCII", "EBCDIC", "Image", "Local" };
00056 #endif
00057 
00058 /*
00059  * Form codes
00060  */
00061 #define       FORM_N        1      /* non-print */
00062 #define       FORM_T        2      /* telnet format effectors */
00063 #define       FORM_C        3      /* carriage control (ASA) */
00064 #ifdef FTP_NAMES
00065 char *formnames[] =  {"0", "Nonprint", "Telnet", "Carriage-control" };
00066 #endif
00067 
00068 /*
00069  * Structure codes
00070  */
00071 #define       STRU_F        1      /* file (no record structure) */
00072 #define       STRU_R        2      /* record structure */
00073 #define       STRU_P        3      /* page structure */
00074 #ifdef FTP_NAMES
00075 char *strunames[] =  {"0", "File", "Record", "Page" };
00076 #endif
00077 
00078 /*
00079  * Mode types
00080  */
00081 #define       MODE_S        1      /* stream */
00082 #define       MODE_B        2      /* block */
00083 #define       MODE_C        3      /* compressed */
00084 #ifdef FTP_NAMES
00085 char *modenames[] =  {"0", "Stream", "Block", "Compressed" };
00086 #endif
00087 
00088 /*
00089  * Record Tokens
00090  */
00091 #define       REC_ESC              '\377' /* Record-mode Escape */
00092 #define       REC_EOR              '\001' /* Record-mode End-of-Record */
00093 #define REC_EOF             '\002' /* Record-mode End-of-File */
00094 
00095 /*
00096  * Block Header
00097  */
00098 #define       BLK_EOR              0x80   /* Block is End-of-Record */
00099 #define       BLK_EOF              0x40   /* Block is End-of-File */
00100 #define BLK_ERRORS   0x20   /* Block is suspected of containing errors */
00101 #define       BLK_RESTART   0x10   /* Block is Restart Marker */
00102 
00103 #define       BLK_BYTECOUNT 2      /* Bytes in this block */
00104 
00105 #endif /* arpa/ftp.h */