/*-1* SPDX-License-Identifier: BSD-3-Clause2*3* Copyright (c) 1983, 1989, 19934* The Regents of the University of California. All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14* 3. Neither the name of the University nor the names of its contributors15* may be used to endorse or promote products derived from this software16* without specific prior written permission.17*18* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND19* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE20* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE21* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE22* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL23* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS24* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)25* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT26* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY27* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF28* SUCH DAMAGE.29*/3031#ifndef _ARPA_FTP_H_32#define _ARPA_FTP_H_3334/* Definitions for FTP; see RFC-765. */3536/*37* Reply codes.38*/39#define PRELIM 1 /* positive preliminary */40#define COMPLETE 2 /* positive completion */41#define CONTINUE 3 /* positive intermediate */42#define TRANSIENT 4 /* transient negative completion */43#define ERROR 5 /* permanent negative completion */4445/*46* Type codes47*/48#define TYPE_A 1 /* ASCII */49#define TYPE_E 2 /* EBCDIC */50#define TYPE_I 3 /* image */51#define TYPE_L 4 /* local byte size */5253#ifdef FTP_NAMES54char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };55#endif5657/*58* Form codes59*/60#define FORM_N 1 /* non-print */61#define FORM_T 2 /* telnet format effectors */62#define FORM_C 3 /* carriage control (ASA) */63#ifdef FTP_NAMES64char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };65#endif6667/*68* Structure codes69*/70#define STRU_F 1 /* file (no record structure) */71#define STRU_R 2 /* record structure */72#define STRU_P 3 /* page structure */73#ifdef FTP_NAMES74char *strunames[] = {"0", "File", "Record", "Page" };75#endif7677/*78* Mode types79*/80#define MODE_S 1 /* stream */81#define MODE_B 2 /* block */82#define MODE_C 3 /* compressed */83#ifdef FTP_NAMES84char *modenames[] = {"0", "Stream", "Block", "Compressed" };85#endif8687/*88* Record Tokens89*/90#define REC_ESC '\377' /* Record-mode Escape */91#define REC_EOR '\001' /* Record-mode End-of-Record */92#define REC_EOF '\002' /* Record-mode End-of-File */9394/*95* Block Header96*/97#define BLK_EOR 0x80 /* Block is End-of-Record */98#define BLK_EOF 0x40 /* Block is End-of-File */99#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */100#define BLK_RESTART 0x10 /* Block is Restart Marker */101102#define BLK_BYTECOUNT 2 /* Bytes in this block */103104#endif /* !_FTP_H_ */105106107