Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

loadcfg.h

Go to the documentation of this file.
00001 #ifndef LOADCFG_H_INCLUDED
00002 #define LOADCFG_H_INCLUDED
00003 #define LOADCFG_H_VERSION "$Id: loadcfg.h,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"
00004 /* ******************************************************************
00005  * $Source: /cvsroot/ijbswa/current/src/loadcfg.h,v $
00006  * ******************************************************************
00007  *
00008  * Written by and Copyright (C) 2001 the SourceForge
00009  * Privoxy team. http://www.privoxy.org/
00010  * 
00011  * Based on the Internet Junkbuster originally written
00012  * by and Copyright (C) 1997 Anonymous Coders and
00013  * Junkbusters Corporation.  http://www.junkbusters.com
00014  * 
00015  * This program is free software; you can redistribute it
00016  * and/or modify it under the terms of the GNU General
00017  * Public License as published by the Free Software
00018  * Foundation; either version 2 of the License, or (at
00019  * your option) any later version.
00020  * 
00021  * This program is distributed in the hope that it will
00022  * be useful, but WITHOUT ANY WARRANTY; without even the
00023  * implied warranty of MERCHANTABILITY or FITNESS FOR A
00024  * PARTICULAR PURPOSE.  See the GNU General Public
00025  * License for more details.
00026  * 
00027  * The GNU General Public License should be included with
00028  * this file.  If not, you can view it at
00029  * http://www.gnu.org/copyleft/gpl.html
00030  * or write to the Free Software Foundation, Inc., 59
00031  * Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00032  * 
00033  * *****************************************************************/
00034 /**
00035  * @file
00036  *
00037  * Loads settings from the configuration file into
00038  * global variables.  This file contains both the
00039  * routine to load the configuration and the global
00040  * variables it writes to.
00041  * 
00042  *
00043  * $Log: loadcfg.h,v $
00044  * Revision 2.0  2002/06/04 14:34:21  jongfoster
00045  * Moving source files to src/
00046  * 
00047  * Revision 1.11  2002/03/26 22:29:55  swa
00048  * we have a new homepage!
00049  * 
00050  * Revision 1.10  2002/03/24 13:25:43  swa
00051  * name change related issues
00052  * 
00053  * Revision 1.9  2002/03/16 23:54:06  jongfoster
00054  * Adding graceful termination feature, to help look for memory leaks.
00055  * If you enable this (which, by design, has to be done by hand
00056  * editing config.h) and then go to http://i.j.b/die, then the program
00057  * will exit cleanly after the *next* request.  It should free all the
00058  * memory that was used.
00059  * 
00060  * Revision 1.8  2001/12/30 14:07:32  steudten
00061  * - Add signal handling (unix)
00062  * - Add SIGHUP handler (unix)
00063  * - Add creation of pidfile (unix)
00064  * - Add action 'top' in rc file (RH)
00065  * - Add entry 'SIGNALS' to manpage
00066  * - Add exit message to logfile (unix)
00067  * 
00068  * Revision 1.7  2001/07/30 22:08:36  jongfoster
00069  * Tidying up #defines:
00070  * - All feature #defines are now of the form FEATURE_xxx
00071  * - Permanently turned off WIN_GUI_EDIT
00072  * - Permanently turned on WEBDAV and SPLIT_PROXY_ARGS
00073  * 
00074  * Revision 1.6  2001/07/29 18:58:15  jongfoster
00075  * Removing nested #includes, adding forward declarations for needed
00076  * structures, and changing the #define _FILENAME_H to FILENAME_H_INCLUDED.
00077  * 
00078  * Revision 1.5  2001/05/26 00:28:36  jongfoster
00079  * Automatic reloading of config file.
00080  * Removed obsolete SIGHUP support (Unix) and Reload menu option (Win32).
00081  * Most of the global variables have been moved to a new
00082  * struct configuration_spec, accessed through csp->config->globalname
00083  * Most of the globals remaining are used by the Win32 GUI.
00084  * 
00085  * Revision 1.4  2001/05/22 18:46:04  oes
00086  * 
00087  * - Enabled filtering banners by size rather than URL
00088  *   by adding patterns that replace all standard banner
00089  *   sizes with the "Junkbuster" gif to the re_filterfile
00090  * 
00091  * - Enabled filtering WebBugs by providing a pattern
00092  *   which kills all 1x1 images
00093  * 
00094  * - Added support for PCRE_UNGREEDY behaviour to pcrs,
00095  *   which is selected by the (nonstandard and therefore
00096  *   capital) letter 'U' in the option string.
00097  *   It causes the quantifiers to be ungreedy by default.
00098  *   Appending a ? turns back to greedy (!).
00099  * 
00100  * - Added a new interceptor ijb-send-banner, which
00101  *   sends back the "Junkbuster" gif. Without imagelist or
00102  *   MSIE detection support, or if tinygif = 1, or the
00103  *   URL isn't recognized as an imageurl, a lame HTML
00104  *   explanation is sent instead.
00105  * 
00106  * - Added new feature, which permits blocking remote
00107  *   script redirects and firing back a local redirect
00108  *   to the browser.
00109  *   The feature is conditionally compiled, i.e. it
00110  *   can be disabled with --disable-fast-redirects,
00111  *   plus it must be activated by a "fast-redirects"
00112  *   line in the config file, has its own log level
00113  *   and of course wants to be displayed by show-proxy-args
00114  *   Note: Boy, all the #ifdefs in 1001 locations and
00115  *   all the fumbling with configure.in and acconfig.h
00116  *   were *way* more work than the feature itself :-(
00117  * 
00118  * - Because a generic redirect template was needed for
00119  *   this, tinygif = 3 now uses the same.
00120  * 
00121  * - Moved GIFs, and other static HTTP response templates
00122  *   to project.h
00123  * 
00124  * - Some minor fixes
00125  * 
00126  * - Removed some >400 CRs again (Jon, you really worked
00127  *   a lot! ;-)
00128  * 
00129  * Revision 1.3  2001/05/20 01:21:20  jongfoster
00130  * Version 2.9.4 checkin.
00131  * - Merged popupfile and cookiefile, and added control over PCRS
00132  *   filtering, in new "permissionsfile".
00133  * - Implemented LOG_LEVEL_FATAL, so that if there is a configuration
00134  *   file error you now get a message box (in the Win32 GUI) rather
00135  *   than the program exiting with no explanation.
00136  * - Made killpopup use the PCRS MIME-type checking and HTTP-header
00137  *   skipping.
00138  * - Removed tabs from "config"
00139  * - Moved duplicated url parsing code in "loaders.c" to a new funcition.
00140  * - Bumped up version number.
00141  * 
00142  * Revision 1.2  2001/05/17 23:01:01  oes
00143  *  - Cleaned CRLF's from the sources and related files
00144  * 
00145  * Revision 1.1.1.1  2001/05/15 13:58:58  oes
00146  * Initial import of version 2.9.3 source tree
00147  * 
00148  * 
00149  */
00150 /* *****************************************************************/
00151 
00152 
00153 #ifdef __cplusplus
00154 extern "C" {
00155 #endif
00156 
00157 /* Don't need project.h, only this: */
00158 struct configuration_spec;
00159 
00160 /* Global variables */
00161 
00162 #ifdef FEATURE_TOGGLE
00163 /* indicates if ijb is enabled */
00164 extern int g_bToggleIJB;
00165 #endif /* def FEATURE_TOGGLE */
00166 
00167 extern const char *configfile;
00168 
00169 
00170 /* The load_config function is now going to call:
00171  * init_proxy_args, so it will need argc and argv.
00172  * Since load_config will also be a signal handler,
00173  * we need to have these globally available.
00174  */
00175 extern int Argc;
00176 extern const char **Argv;
00177 extern short int MustReload;
00178 
00179 
00180 extern struct configuration_spec * load_config(void);
00181 
00182 #ifdef FEATURE_GRACEFUL_TERMINATION
00183 void unload_current_config_file(void);
00184 #endif
00185 
00186 /* Revision control strings from this header and associated .c file */
00187 
00188 /** Version information about loadcfg.c. */
00189 extern const char loadcfg_rcs[];
00190 
00191 /** Version information about loadcfg.h. */
00192 extern const char loadcfg_h_rcs[];
00193 
00194 #ifdef __cplusplus
00195 } /* extern "C" */
00196 #endif
00197 
00198 #endif /* ndef LOADCFG_H_INCLUDED */
00199 
00200 /*
00201   Local Variables:
00202   tab-width: 3
00203   end:
00204 */

Generated on Tue Jun 4 18:54:48 2002 for Privoxy 3.1.1 by doxygen1.2.15