Allow to bind to multiple separate addresses.
[privoxy.git] / project.h
index 8b0e68c..d44eed4 100644 (file)
--- a/project.h
+++ b/project.h
@@ -1,7 +1,7 @@
 #ifndef PROJECT_H_INCLUDED
 #define PROJECT_H_INCLUDED
 /** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.163 2011/02/19 13:58:48 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.169 2011/07/08 13:30:08 fabiankeil Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/project.h,v $
@@ -810,6 +810,17 @@ struct reusable_connection
  */
 #define CSP_FLAG_REUSED_CLIENT_CONNECTION           0x00100000U
 
+/**
+ * Flag for csp->flags: Set if the supports deflate compression.
+ */
+#define CSP_FLAG_CLIENT_SUPPORTS_DEFLATE            0x00200000U
+
+/**
+ * Flag for csp->flags: Set if the content has been deflated by Privoxy
+ */
+#define CSP_FLAG_BUFFERED_CONTENT_DEFLATED          0x00400000U
+
+
 /*
  * Flags for use in return codes of child processes
  */
@@ -832,6 +843,12 @@ struct reusable_connection
  */
 #define MAX_AF_FILES 10
 
+/**
+ * Maximum number of sockets to listen to.  This limit is arbitrary - it's just used
+ * to size an array.
+ */
+#define MAX_LISTENING_SOCKETS 10
+
 /**
  * The state of a Privoxy processing thread.
  */
@@ -1179,6 +1196,9 @@ struct access_control_list
 /** configuration_spec::feature_flags: Pages blocked with +handle-as-empty-doc get a return status of 200 OK. */
 #define RUNTIME_FEATURE_EMPTY_DOC_RETURNS_OK       512U
 
+/** configuration_spec::feature_flags: Buffered content is sent compressed if the client supports it. */
+#define RUNTIME_FEATURE_COMPRESSION               1024U
+
 /**
  * Data loaded from the configuration file.
  *
@@ -1245,11 +1265,11 @@ struct configuration_spec
    /** The hostname to show on CGI pages, or NULL to use the real one. */
    const char *hostname;
 
-   /** IP address to bind to.  Defaults to HADDR_DEFAULT == 127.0.0.1. */
-   const char *haddr;
+   /** IP addresses to bind to.  Defaults to HADDR_DEFAULT == 127.0.0.1. */
+   const char *haddr[MAX_LISTENING_SOCKETS];
 
-   /** Port to bind to.  Defaults to HADDR_PORT == 8118. */
-   int         hport;
+   /** Ports to bind to.  Defaults to HADDR_PORT == 8118. */
+   int         hport[MAX_LISTENING_SOCKETS];
 
    /** Size limit for IOB */
    size_t buffer_limit;
@@ -1294,6 +1314,10 @@ struct configuration_spec
    unsigned int default_server_timeout;
 #endif
 
+#ifdef FEATURE_COMPRESSION
+   int compression_level;
+#endif
+
    /** All options from the config file, HTML-formatted. */
    char *proxy_args;