1 #ifndef CGISIMPLE_H_INCLUDED
2 #define CGISIMPLE_H_INCLUDED
3 #define CGISIMPLE_H_VERSION "$Id: cgisimple.h,v 1.4 2001/10/23 21:48:19 jongfoster Exp $"
4 /*********************************************************************
6 * File : $Source: /cvsroot/ijbswa/current/cgisimple.h,v $
8 * Purpose : Declares functions to intercept request, generate
9 * html or gif answers, and to compose HTTP resonses.
11 * Functions declared include:
14 * Copyright : Written by and Copyright (C) 2001 the SourceForge
15 * IJBSWA team. http://ijbswa.sourceforge.net
17 * Based on the Internet Junkbuster originally written
18 * by and Copyright (C) 1997 Anonymous Coders and
19 * Junkbusters Corporation. http://www.junkbusters.com
21 * This program is free software; you can redistribute it
22 * and/or modify it under the terms of the GNU General
23 * Public License as published by the Free Software
24 * Foundation; either version 2 of the License, or (at
25 * your option) any later version.
27 * This program is distributed in the hope that it will
28 * be useful, but WITHOUT ANY WARRANTY; without even the
29 * implied warranty of MERCHANTABILITY or FITNESS FOR A
30 * PARTICULAR PURPOSE. See the GNU General Public
31 * License for more details.
33 * The GNU General Public License should be included with
34 * this file. If not, you can view it at
35 * http://www.gnu.org/copyleft/gpl.html
36 * or write to the Free Software Foundation, Inc., 59
37 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 * $Log: cgisimple.h,v $
41 * Revision 1.4 2001/10/23 21:48:19 jongfoster
42 * Cleaning up error handling in CGI functions - they now send back
43 * a HTML error page and should never cause a FATAL error. (Fixes one
44 * potential source of "denial of service" attacks).
46 * CGI actions file editor that works and is actually useful.
48 * Ability to toggle JunkBuster remotely using a CGI call.
50 * You can turn off both the above features in the main configuration
51 * file, e.g. if you are running a multi-user proxy.
53 * Revision 1.3 2001/10/14 22:00:32 jongfoster
54 * Adding support for a 404 error when an invalid CGI page is requested.
56 * Revision 1.2 2001/10/02 15:31:20 oes
57 * Introduced show-request cgi
59 * Revision 1.1 2001/09/16 17:08:54 jongfoster
60 * Moving simple CGI functions from cgi.c to new file cgisimple.c
63 **********************************************************************/
75 extern jb_err cgi_default (struct client_state *csp,
76 struct http_response *rsp,
77 const struct map *parameters);
78 extern jb_err cgi_error_404 (struct client_state *csp,
79 struct http_response *rsp,
80 const struct map *parameters);
81 extern jb_err cgi_robots_txt (struct client_state *csp,
82 struct http_response *rsp,
83 const struct map *parameters);
84 extern jb_err cgi_send_banner (struct client_state *csp,
85 struct http_response *rsp,
86 const struct map *parameters);
87 extern jb_err cgi_show_status (struct client_state *csp,
88 struct http_response *rsp,
89 const struct map *parameters);
90 extern jb_err cgi_show_url_info(struct client_state *csp,
91 struct http_response *rsp,
92 const struct map *parameters);
93 extern jb_err cgi_show_version (struct client_state *csp,
94 struct http_response *rsp,
95 const struct map *parameters);
96 extern jb_err cgi_show_request (struct client_state *csp,
97 struct http_response *rsp,
98 const struct map *parameters);
99 extern jb_err cgi_transparent_gif (struct client_state *csp,
100 struct http_response *rsp,
101 const struct map *parameters);
103 /* Revision control strings from this header and associated .c file */
104 extern const char cgisimple_rcs[];
105 extern const char cgisimple_h_rcs[];
111 #endif /* ndef CGISIMPLE_H_INCLUDED */