xref: /original-bsd/include/arpa/ftp.h (revision 65ba69af)
1 /*
2  * Copyright (c) 1983 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  *	@(#)ftp.h	5.3 (Berkeley) 06/27/88
18  */
19 
20 /*
21  * Definitions for FTP
22  * See RFC-765
23  */
24 
25 /*
26  * Reply codes.
27  */
28 #define PRELIM		1	/* positive preliminary */
29 #define COMPLETE	2	/* positive completion */
30 #define CONTINUE	3	/* positive intermediate */
31 #define TRANSIENT	4	/* transient negative completion */
32 #define ERROR		5	/* permanent negative completion */
33 
34 /*
35  * Type codes
36  */
37 #define	TYPE_A		1	/* ASCII */
38 #define	TYPE_E		2	/* EBCDIC */
39 #define	TYPE_I		3	/* image */
40 #define	TYPE_L		4	/* local byte size */
41 
42 /*
43  * Form codes
44  */
45 #define	FORM_N		1	/* non-print */
46 #define	FORM_T		2	/* telnet format effectors */
47 #define	FORM_C		3	/* carriage control (ASA) */
48 
49 /*
50  * Structure codes
51  */
52 #define	STRU_F		1	/* file (no record structure) */
53 #define	STRU_R		2	/* record structure */
54 #define	STRU_P		3	/* page structure */
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 
63 /*
64  * Record Tokens
65  */
66 #define	REC_ESC		'\377'	/* Record-mode Escape */
67 #define	REC_EOR		'\001'	/* Record-mode End-of-Record */
68 #define REC_EOF		'\002'	/* Record-mode End-of-File */
69 
70 /*
71  * Block Header
72  */
73 #define	BLK_EOR		0x80	/* Block is End-of-Record */
74 #define	BLK_EOF		0x40	/* Block is End-of-File */
75 #define BLK_ERRORS	0x20	/* Block is suspected of containing errors */
76 #define	BLK_RESTART	0x10	/* Block is Restart Marker */
77 
78 #define	BLK_BYTECOUNT	2	/* Bytes in this block */
79