]> git.sur5r.net Git - freertos/blob - FreeRTOS-Labs/Demo/Common/Demo_IP_Protocols/include/FreeRTOS_FTP_commands.h
Add the Labs projects provided in the V10.2.1_191129 zip file.
[freertos] / FreeRTOS-Labs / Demo / Common / Demo_IP_Protocols / include / FreeRTOS_FTP_commands.h
1 /*\r
2  * FreeRTOS+TCP V2.0.1\r
3  * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
4  *\r
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
6  * this software and associated documentation files (the "Software"), to deal in\r
7  * the Software without restriction, including without limitation the rights to\r
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
9  * the Software, and to permit persons to whom the Software is furnished to do so,\r
10  * subject to the following conditions:\r
11  *\r
12  * The above copyright notice and this permission notice shall be included in all\r
13  * copies or substantial portions of the Software.\r
14  *\r
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
21  *\r
22  * http://aws.amazon.com/freertos\r
23  * http://www.FreeRTOS.org\r
24  */\r
25 \r
26 #ifndef __FTPCMD_H__\r
27 \r
28 #define __FTPCMD_H__\r
29 \r
30 #define REPL_110 "110 Restart marker reply.\r\n"\r
31 #define REPL_120 "120 Try again in 2 minutes.\r\n"\r
32 #define REPL_125 "125 Data connection already open; transfer starting.\r\n"\r
33 #define REPL_150 "150 File status okay; about to open data connection.\r\n"\r
34 #define REPL_200 "200 NOOP command successful.\r\n"\r
35 #define REPL_200_PROGRESS "200 NOOP: data transfer in progress.\r\n"\r
36 #define REPL_202 "202 Command not implemented, superfluous at this site.\r\n"\r
37 #define REPL_211 "221 System status, or system help reply.\r\n"\r
38 #define REPL_211_STATUS "221-status of %s.\r\n"\r
39 #define REPL_211_END "221 End of status.\r\n"\r
40 #define REPL_212 "212 Directory status.\r\n"\r
41 #define REPL_213 "213 File status.\r\n"\r
42 #define REPL_214 "214 Help message.\r\n"\r
43 #define REPL_214_END "214 End Help message.\r\n"\r
44 #define REPL_215 "215 %s system type.\r\n"\r
45 #define REPL_220 "220 Service ready for new user.\r\n"\r
46 #define REPL_221 "221 Service closing control connection.\r\n"\r
47 #define REPL_225 "225 Data connection open; no transfer in progress.\r\n"\r
48 #define REPL_226 "226 Closing data connection.\r\n"\r
49 #define REPL_227 "227 Entering Passive Mode (%s,%s,%s,%s,%s,%s).\r\n"\r
50 #define REPL_227_D "227 Entering Passive Mode (%u,%u,%u,%u,%u,%u).\r\n"\r
51 #define REPL_230 "230 User logged in, proceed.\r\n"\r
52 #define REPL_250 "250 Requested file action okay, completed.\r\n"\r
53 #define REPL_257 "257 %s created.\r\n"\r
54 //      #define REPL_257_PWD "257 \"%s\" is current working dir.\r\n"\r
55 #define REPL_257_PWD "257 \"%s\"\r\n"\r
56 #define REPL_331 "331 Only anonymous user is accepted.\r\n"\r
57 #define REPL_331_ANON "331 Anonymous login okay\r\n"\r
58 #define REPL_332 "332 Need account for login.\r\n"\r
59 #define REPL_350 "350 Requested file action pending further information.\r\n"\r
60 #define REPL_421 "421 Service not available, closing control connection.\r\n"\r
61 #define REPL_425 "425 Can't open data connection.\r\n"\r
62 #define REPL_426 "426 Connection closed; transfer aborted.\r\n"\r
63 #define REPL_450 "450 Requested file action not taken.\r\n"\r
64 #define REPL_451 "451 Requested action aborted. Local error in processing.\r\n"\r
65 #define REPL_452 "452 Requested action not taken.\r\n"\r
66 #define REPL_500 "500 Syntax error, command unrecognized.\r\n"\r
67 #define REPL_501 "501 Syntax error in parameters or arguments.\r\n"\r
68 #define REPL_502 "502 Command not implemented.\r\n"\r
69 #define REPL_503 "503 Bad sequence of commands.\r\n"\r
70 #define REPL_504 "504 Command not implemented for that parameter.\r\n"\r
71 #define REPL_530 "530 Not logged in.\r\n"\r
72 #define REPL_532 "532 Need account for storing files.\r\n"\r
73 #define REPL_550 "550 Requested action not taken.\r\n"\r
74 #define REPL_551 "551 Requested action aborted. Page type unknown.\r\n"\r
75 #define REPL_552 "552 Requested file action aborted.\r\n"\r
76 #define REPL_553 "553 Requested action not taken.\r\n"\r
77 #define REPL_553_READ_ONLY "553 Read-only file-system.\r\n"\r
78 \r
79 enum EFTPCommand {\r
80         ECMD_USER,\r
81         ECMD_PASS,\r
82         ECMD_ACCT,\r
83         ECMD_CWD,\r
84         ECMD_CDUP,\r
85         ECMD_SMNT,\r
86         ECMD_QUIT,\r
87         ECMD_REIN,\r
88         ECMD_PORT,\r
89         ECMD_PASV,\r
90         ECMD_TYPE,\r
91         ECMD_STRU,\r
92         ECMD_MODE,\r
93         ECMD_RETR,\r
94         ECMD_STOR,\r
95         ECMD_STOU,\r
96         ECMD_APPE,\r
97         ECMD_ALLO,\r
98         ECMD_REST,\r
99         ECMD_RNFR,\r
100         ECMD_RNTO,\r
101         ECMD_ABOR,\r
102         ECMD_SIZE,\r
103         ECMD_MDTM,\r
104         ECMD_DELE,\r
105         ECMD_RMD,\r
106         ECMD_MKD,\r
107         ECMD_PWD,\r
108         ECMD_LIST,\r
109         ECMD_NLST,\r
110         ECMD_SITE,\r
111         ECMD_SYST,\r
112         ECMD_FEAT,\r
113         ECMD_STAT,\r
114         ECMD_HELP,\r
115         ECMD_NOOP,\r
116         ECMD_EMPTY,\r
117         ECMD_CLOSE,\r
118         ECMD_UNKNOWN,\r
119 };\r
120 \r
121 typedef struct xFTP_COMMAND {\r
122         BaseType_t xCommandLength;\r
123         const char pcCommandName[7];\r
124         const unsigned char ucCommandType;\r
125         const unsigned char checkLogin;\r
126         const unsigned char checkNullArg;\r
127 } FTPCommand_t;\r
128 \r
129 #define FTP_CMD_COUNT   (ECMD_UNKNOWN+1)\r
130 \r
131 extern const FTPCommand_t xFTPCommands[ FTP_CMD_COUNT ];\r
132 \r
133 #endif  // __FTPCMD_H__\r