Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:11

0001 /*-
0002  * SPDX-License-Identifier: BSD-3-Clause
0003  *
0004  * Copyright (c) 1983, 1989, 1993
0005  *  The Regents of the University of California.  All rights reserved.
0006  *
0007  * Redistribution and use in source and binary forms, with or without
0008  * modification, are permitted provided that the following conditions
0009  * are met:
0010  * 1. Redistributions of source code must retain the above copyright
0011  *    notice, this list of conditions and the following disclaimer.
0012  * 2. Redistributions in binary form must reproduce the above copyright
0013  *    notice, this list of conditions and the following disclaimer in the
0014  *    documentation and/or other materials provided with the distribution.
0015  * 3. Neither the name of the University nor the names of its contributors
0016  *    may be used to endorse or promote products derived from this software
0017  *    without specific prior written permission.
0018  *
0019  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
0020  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0021  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0022  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
0023  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
0024  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
0025  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
0026  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
0027  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
0028  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
0029  * SUCH DAMAGE.
0030  *
0031  *  @(#)ftp.h   8.1 (Berkeley) 6/2/93
0032  *
0033  * $FreeBSD: head/include/arpa/ftp.h 326024 2017-11-20 19:45:28Z pfg $
0034  */
0035 
0036 #ifndef _ARPA_FTP_H_
0037 #define _ARPA_FTP_H_
0038 
0039 /* Definitions for FTP; see RFC-765. */
0040 
0041 /*
0042  * Reply codes.
0043  */
0044 #define PRELIM      1   /* positive preliminary */
0045 #define COMPLETE    2   /* positive completion */
0046 #define CONTINUE    3   /* positive intermediate */
0047 #define TRANSIENT   4   /* transient negative completion */
0048 #define ERROR       5   /* permanent negative completion */
0049 
0050 /*
0051  * Type codes
0052  */
0053 #define TYPE_A      1   /* ASCII */
0054 #define TYPE_E      2   /* EBCDIC */
0055 #define TYPE_I      3   /* image */
0056 #define TYPE_L      4   /* local byte size */
0057 
0058 #ifdef FTP_NAMES
0059 char *typenames[] =  {"0", "ASCII", "EBCDIC", "Image", "Local" };
0060 #endif
0061 
0062 /*
0063  * Form codes
0064  */
0065 #define FORM_N      1   /* non-print */
0066 #define FORM_T      2   /* telnet format effectors */
0067 #define FORM_C      3   /* carriage control (ASA) */
0068 #ifdef FTP_NAMES
0069 char *formnames[] =  {"0", "Nonprint", "Telnet", "Carriage-control" };
0070 #endif
0071 
0072 /*
0073  * Structure codes
0074  */
0075 #define STRU_F      1   /* file (no record structure) */
0076 #define STRU_R      2   /* record structure */
0077 #define STRU_P      3   /* page structure */
0078 #ifdef FTP_NAMES
0079 char *strunames[] =  {"0", "File", "Record", "Page" };
0080 #endif
0081 
0082 /*
0083  * Mode types
0084  */
0085 #define MODE_S      1   /* stream */
0086 #define MODE_B      2   /* block */
0087 #define MODE_C      3   /* compressed */
0088 #ifdef FTP_NAMES
0089 char *modenames[] =  {"0", "Stream", "Block", "Compressed" };
0090 #endif
0091 
0092 /*
0093  * Record Tokens
0094  */
0095 #define REC_ESC     '\377'  /* Record-mode Escape */
0096 #define REC_EOR     '\001'  /* Record-mode End-of-Record */
0097 #define REC_EOF     '\002'  /* Record-mode End-of-File */
0098 
0099 /*
0100  * Block Header
0101  */
0102 #define BLK_EOR     0x80    /* Block is End-of-Record */
0103 #define BLK_EOF     0x40    /* Block is End-of-File */
0104 #define BLK_ERRORS  0x20    /* Block is suspected of containing errors */
0105 #define BLK_RESTART 0x10    /* Block is Restart Marker */
0106 
0107 #define BLK_BYTECOUNT   2   /* Bytes in this block */
0108 
0109 #endif /* !_FTP_H_ */