1: /*
2: * Copyright (c) 1983, 1989 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.4 (Berkeley) 2/21/89
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: #ifdef FTP_NAMES
43: char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
44: #endif
45:
46: /*
47: * Form codes
48: */
49: #define FORM_N 1 /* non-print */
50: #define FORM_T 2 /* telnet format effectors */
51: #define FORM_C 3 /* carriage control (ASA) */
52: #ifdef FTP_NAMES
53: char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
54: #endif
55:
56: /*
57: * Structure codes
58: */
59: #define STRU_F 1 /* file (no record structure) */
60: #define STRU_R 2 /* record structure */
61: #define STRU_P 3 /* page structure */
62: #ifdef FTP_NAMES
63: char *strunames[] = {"0", "File", "Record", "Page" };
64: #endif
65:
66: /*
67: * Mode types
68: */
69: #define MODE_S 1 /* stream */
70: #define MODE_B 2 /* block */
71: #define MODE_C 3 /* compressed */
72: #ifdef FTP_NAMES
73: char *modenames[] = {"0", "Stream", "Block", "Compressed" };
74: #endif
75:
76: /*
77: * Record Tokens
78: */
79: #define REC_ESC '\377' /* Record-mode Escape */
80: #define REC_EOR '\001' /* Record-mode End-of-Record */
81: #define REC_EOF '\002' /* Record-mode End-of-File */
82:
83: /*
84: * Block Header
85: */
86: #define BLK_EOR 0x80 /* Block is End-of-Record */
87: #define BLK_EOF 0x40 /* Block is End-of-File */
88: #define BLK_ERRORS 0x20 /* Block is suspected of containing errors */
89: #define BLK_RESTART 0x10 /* Block is Restart Marker */
90:
91: #define BLK_BYTECOUNT 2 /* Bytes in this block */
Defined variables
Defined macros
ERROR
defined in line
32; used 7 times
PRELIM
defined in line
28; used 12 times
TYPE_A
defined in line
37; used 14 times
Usage of this include