forked from decal/werdlists
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathoftpd-commands-initdefine.c
44 lines (43 loc) · 1.35 KB
/
oftpd-commands-initdefine.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* argument types */
#define ARG_NONE 0
#define ARG_STRING 1
#define ARG_OPTIONAL_STRING 2
#define ARG_HOST_PORT 3
#define ARG_TYPE 4
#define ARG_STRUCTURE 5
#define ARG_MODE 6
#define ARG_OFFSET 7
#define ARG_HOST_PORT_LONG 8
#define ARG_HOST_PORT_EXT 9
#define ARG_OPTIONAL_NUMBER 10
/* our FTP commands */
struct {
char *name;
int arg_type;
} command_def[] = {
{ "USER", ARG_STRING },
{ "PASS", ARG_STRING },
{ "CWD", ARG_STRING },
{ "CDUP", ARG_NONE },
{ "QUIT", ARG_NONE },
{ "PORT", ARG_HOST_PORT },
{ "LPRT", ARG_HOST_PORT_LONG },
{ "EPRT", ARG_HOST_PORT_EXT },
{ "PASV", ARG_NONE },
{ "LPSV", ARG_NONE },
{ "EPSV", ARG_OPTIONAL_NUMBER },
{ "TYPE", ARG_TYPE },
{ "STRU", ARG_STRUCTURE },
{ "MODE", ARG_MODE },
{ "RETR", ARG_STRING },
{ "STOR", ARG_STRING },
{ "PWD", ARG_NONE },
{ "LIST", ARG_OPTIONAL_STRING },
{ "NLST", ARG_OPTIONAL_STRING },
{ "SYST", ARG_NONE },
{ "HELP", ARG_OPTIONAL_STRING },
{ "NOOP", ARG_NONE },
{ "REST", ARG_OFFSET },
{ "SIZE", ARG_STRING },
{ "MDTM", ARG_STRING }
};