1 /* twoftpd-anon.c - Main dispatch table for twoftpd-anon
2  * Copyright (C) 2008  Bruce Guenter <bruce@untroubled.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18 #include "twoftpd.h"
19 #include "backend.h"
20 
21 const char program[] = "twoftpd-anon";
22 
23 const command verbs[] = {
24   { "TYPE", 0, 0,           handle_type },
25   { "STRU", 0, 0,           handle_stru },
26   { "MODE", 0, 0,           handle_mode },
27   { "CWD",  0, 0,           handle_cwd },
28   { "PWD",  0, handle_pwd,  0 },
29   { "CDUP", 0, handle_cdup, 0 },
30   { "PASV", 0, handle_pasv, 0 },
31   { "PORT", 0, 0,           handle_port },
32   { "LIST", 0, handle_list, handle_list },
33   { "NLST", 0, handle_nlst, handle_nlst },
34   { "SIZE", 0, 0,           handle_size },
35   { "MDTM", 0, 0,           handle_mdtm },
36   { "REST", 0, 0,           handle_rest },
37   { "RETR", 0, 0,           handle_retr },
38   /* Compatibility verbs as defined by RFC1123 */
39   { "XCWD", 0, 0,           handle_cwd },
40   { "XPWD", 0, handle_pwd,  0 },
41   { "XCUP", 0, handle_cdup, 0 },
42   /* Handle stray login commands */
43   { "USER", 1, 0,           handle_pass },
44   { "PASS", 1, 0,           handle_pass },
45   { "ACCT", 0, 0,           handle_pass },
46   { 0,      0, 0,           0 }
47 };
48 
49 const command site_commands[] = {
50   { 0,      0, 0, 0 }
51 };
52