1 /* =================================================================
5 * Improved HTTPD server.
7 * =================================================================
8 * ####ECOSGPLCOPYRIGHTBEGIN####
9 * -------------------------------------------
10 * This file is part of eCos, the Embedded Configurable Operating
12 * Copyright (C) 2005 eCosCentric Ltd.
14 * eCos is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 or (at your option)
19 * eCos is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with eCos; if not, write to the Free Software Foundation,
26 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 * As a special exception, if other files instantiate templates or
29 * use macros or inline functions from this file, or you compile this
30 * file and link it with other works to produce a work based on this
31 * file, this file does not by itself cause the resulting work to be
32 * covered by the GNU General Public License. However the source code
33 * for this file must still be made available in accordance with
34 * section (3) of the GNU General Public License.
36 * This exception does not invalidate any other reasons why a work
37 * based on this file might be covered by the GNU General Public
40 * -------------------------------------------
41 * ####ECOSGPLCOPYRIGHTEND####
42 * =================================================================
43 * #####DESCRIPTIONBEGIN####
45 * Author(s): Anthony Tonizzo (atonizzo@gmail.com)
51 * ####DESCRIPTIONEND####
53 * =================================================================
58 // =============================================================================
60 // =============================================================================
61 struct cyg_httpd_ires_table_entry
68 typedef struct cyg_httpd_ires_table_entry cyg_httpd_ires_table_entry;
70 #define CYG_HTTPD_IRES_TABLE_ENTRY(__name, __path_name, __pmem, __size) \
71 cyg_httpd_ires_table_entry __name \
72 CYG_HAL_TABLE_ENTRY(httpd_ires_table) = {(char*)__path_name, \
73 (char*)__pmem, (int)__size}
75 cyg_httpd_ires_table_entry *cyg_httpd_find_ires(char *);
76 void cyg_httpd_send_ires(cyg_httpd_ires_table_entry *);
78 // =============================================================================
80 // =============================================================================
81 typedef cyg_int32 (*handler)(CYG_HTTPD_STATE*);
82 struct cyg_httpd_handler_table_entry
88 typedef struct cyg_httpd_handler_table_entry cyg_httpd_handler_table_entry;
90 #define CYG_HTTPD_HANDLER_TABLE_ENTRY(__name, __pattern, __arg) \
91 cyg_httpd_handler_table_entry __name \
92 CYG_HAL_TABLE_ENTRY(httpd_handler_table) = { __pattern, __arg }
94 handler cyg_httpd_find_handler(void);
95 cyg_int32 cyg_httpd_exec_cgi(void);
96 void cyg_httpd_send_directory_listing(char*);