xref: /original-bsd/include/arpa/ftp.h (revision 35d77a20)
1 /*
2  * Copyright (c) 1983, 1989 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)ftp.h	5.6 (Berkeley) 04/03/91
8  */
9 
10 #ifndef _FTP_H_
11 #define	_FTP_H_
12 
13 /* Definitions for FTP; see RFC-765. */
14 
15 /*
16  * Reply codes.
17  */
18 #define PRELIM		1	/* positive preliminary */
19 #define COMPLETE	2	/* positive completion */
20 #define CONTINUE	3	/* positive intermediate */
21 #define TRANSIENT	4	/* transient negative completion */
22 #define ERROR		5	/* permanent negative completion */
23 
24 /*
25  * Type codes
26  */
27 #define	TYPE_A		1	/* ASCII */
28 #define	TYPE_E		2	/* EBCDIC */
29 #define	TYPE_I		3	/* image */
30 #define	TYPE_L		4	/* local byte size */
31 
32 #ifdef FTP_NAMES
33 char *typenames[] =  {"0", "ASCII", "EBCDIC", "Image", "Local" };
34 #endif
35 
36 /*
37  * Form codes
38  */
39 #define	FORM_N		1	/* non-print */
40 #define	FORM_T		2	/* telnet format effectors */
41 #define	FORM_C		3	/* carriage control (ASA) */
42 #ifdef FTP_NAMES
43 char *formnames[] =  {"0", "Nonprint", "Telnet", "Carriage-control" };
44 #endif
45 
46 /*
47  * Structure codes
48  */
49 #define	STRU_F		1	/* file (no record structure) */
50 #define	STRU_R		2	/* record structure */
51 #define	STRU_P		3	/* page structure */
52 #ifdef FTP_NAMES
53 char *strunames[] =  {"0", "File", "Record", "Page" };
54 #endif
55 
56 /*
57  * Mode types
58  */
59 #define	MODE_S		1	/* stream */
60 #define	MODE_B		2	/* block */
61 #define	MODE_C		3	/* compressed */
62 #ifdef FTP_NAMES
63 char *modenames[] =  {"0", "Stream", "Block", "Compressed" };
64 #endif
65 
66 /*
67  * Record Tokens
68  */
69 #define	REC_ESC		'\377'	/* Record-mode Escape */
70 #define	REC_EOR		'\001'	/* Record-mode End-of-Record */
71 #define REC_EOF		'\002'	/* Record-mode End-of-File */
72 
73 /*
74  * Block Header
75  */
76 #define	BLK_EOR		0x80	/* Block is End-of-Record */
77 #define	BLK_EOF		0x40	/* Block is End-of-File */
78 #define BLK_ERRORS	0x20	/* Block is suspected of containing errors */
79 #define	BLK_RESTART	0x10	/* Block is Restart Marker */
80 
81 #define	BLK_BYTECOUNT	2	/* Bytes in this block */
82 
83 #endif /* !_FTP_H_ */
84