11539Srgrimes/* 21539Srgrimes * Copyright (c) 1983, 1989, 1993 31539Srgrimes * The Regents of the University of California. All rights reserved. 41539Srgrimes * 51539Srgrimes * Redistribution and use in source and binary forms, with or without 61539Srgrimes * modification, are permitted provided that the following conditions 71539Srgrimes * are met: 81539Srgrimes * 1. Redistributions of source code must retain the above copyright 91539Srgrimes * notice, this list of conditions and the following disclaimer. 101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111539Srgrimes * notice, this list of conditions and the following disclaimer in the 121539Srgrimes * documentation and/or other materials provided with the distribution. 13203965Simp * 3. Neither the name of the University nor the names of its contributors 141539Srgrimes * may be used to endorse or promote products derived from this software 151539Srgrimes * without specific prior written permission. 161539Srgrimes * 171539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 181539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201539Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271539Srgrimes * SUCH DAMAGE. 281539Srgrimes * 291539Srgrimes * @(#)ftp.h 8.1 (Berkeley) 6/2/93 30203965Simp * 31203965Simp * $FreeBSD$ 321539Srgrimes */ 331539Srgrimes 342163Spaul#ifndef _ARPA_FTP_H_ 352163Spaul#define _ARPA_FTP_H_ 361539Srgrimes 371539Srgrimes/* Definitions for FTP; see RFC-765. */ 381539Srgrimes 391539Srgrimes/* 401539Srgrimes * Reply codes. 411539Srgrimes */ 421539Srgrimes#define PRELIM 1 /* positive preliminary */ 431539Srgrimes#define COMPLETE 2 /* positive completion */ 441539Srgrimes#define CONTINUE 3 /* positive intermediate */ 451539Srgrimes#define TRANSIENT 4 /* transient negative completion */ 461539Srgrimes#define ERROR 5 /* permanent negative completion */ 471539Srgrimes 481539Srgrimes/* 491539Srgrimes * Type codes 501539Srgrimes */ 511539Srgrimes#define TYPE_A 1 /* ASCII */ 521539Srgrimes#define TYPE_E 2 /* EBCDIC */ 531539Srgrimes#define TYPE_I 3 /* image */ 541539Srgrimes#define TYPE_L 4 /* local byte size */ 551539Srgrimes 561539Srgrimes#ifdef FTP_NAMES 571539Srgrimeschar *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; 581539Srgrimes#endif 591539Srgrimes 601539Srgrimes/* 611539Srgrimes * Form codes 621539Srgrimes */ 631539Srgrimes#define FORM_N 1 /* non-print */ 641539Srgrimes#define FORM_T 2 /* telnet format effectors */ 651539Srgrimes#define FORM_C 3 /* carriage control (ASA) */ 661539Srgrimes#ifdef FTP_NAMES 671539Srgrimeschar *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; 681539Srgrimes#endif 691539Srgrimes 701539Srgrimes/* 711539Srgrimes * Structure codes 721539Srgrimes */ 731539Srgrimes#define STRU_F 1 /* file (no record structure) */ 741539Srgrimes#define STRU_R 2 /* record structure */ 751539Srgrimes#define STRU_P 3 /* page structure */ 761539Srgrimes#ifdef FTP_NAMES 771539Srgrimeschar *strunames[] = {"0", "File", "Record", "Page" }; 781539Srgrimes#endif 791539Srgrimes 801539Srgrimes/* 811539Srgrimes * Mode types 821539Srgrimes */ 831539Srgrimes#define MODE_S 1 /* stream */ 841539Srgrimes#define MODE_B 2 /* block */ 851539Srgrimes#define MODE_C 3 /* compressed */ 861539Srgrimes#ifdef FTP_NAMES 871539Srgrimeschar *modenames[] = {"0", "Stream", "Block", "Compressed" }; 881539Srgrimes#endif 891539Srgrimes 901539Srgrimes/* 911539Srgrimes * Record Tokens 921539Srgrimes */ 931539Srgrimes#define REC_ESC '\377' /* Record-mode Escape */ 941539Srgrimes#define REC_EOR '\001' /* Record-mode End-of-Record */ 951539Srgrimes#define REC_EOF '\002' /* Record-mode End-of-File */ 961539Srgrimes 971539Srgrimes/* 981539Srgrimes * Block Header 991539Srgrimes */ 1001539Srgrimes#define BLK_EOR 0x80 /* Block is End-of-Record */ 1011539Srgrimes#define BLK_EOF 0x40 /* Block is End-of-File */ 1021539Srgrimes#define BLK_ERRORS 0x20 /* Block is suspected of containing errors */ 1031539Srgrimes#define BLK_RESTART 0x10 /* Block is Restart Marker */ 1041539Srgrimes 1051539Srgrimes#define BLK_BYTECOUNT 2 /* Bytes in this block */ 1061539Srgrimes 1071539Srgrimes#endif /* !_FTP_H_ */ 108