]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/structs.h
Merged from parent (trunk r10600).
[thirdparty/squid.git] / src / structs.h
index 661236ee8b2c51787e9bc33f5a4fe0b5a58a3102..819d63029baa19796378ab6bccbc294ebb95bde7 100644 (file)
@@ -41,6 +41,8 @@
 /* for ICP_END */
 #include "icp_opcode.h"
 
+#define PEER_MULTICAST_SIBLINGS 1
+
 struct acl_name_list {
     char name[ACL_NAME_SZ];
     acl_name_list *next;
@@ -73,7 +75,7 @@ struct _snmp_request_t {
     long reqid;
     int outlen;
 
-    IpAddress from;
+    Ip::Address from;
 
     struct snmp_pdu *PDU;
     ACLChecklist *acl_checklist;
@@ -90,7 +92,7 @@ struct acl_address {
     acl_address *next;
     ACLList *aclList;
 
-    IpAddress addr;
+    Ip::Address addr;
 };
 
 struct acl_tos {
@@ -124,9 +126,7 @@ struct relist {
 #include "icmp/IcmpConfig.h"
 #endif
 
-#if USE_ZPH_QOS
-#include "ip/QosConfig.h"
-#endif
+#include "HelperChildConfig.h"
 
 /* forward decl for SquidConfig, see RemovalPolicy.h */
 
@@ -163,6 +163,7 @@ struct SquidConfig {
 
     struct {
         time_t read;
+        time_t write;
         time_t lifetime;
         time_t connect;
         time_t forward;
@@ -220,19 +221,16 @@ struct SquidConfig {
 #if USE_WCCP
 
     struct {
-
-        IpAddress router;
-
-        IpAddress address;
+        Ip::Address router;
+        Ip::Address address;
         int version;
     } Wccp;
 #endif
 #if USE_WCCPv2
 
     struct {
-        IpAddress_list *router;
-
-        IpAddress address;
+        Ip::Address_list *router;
+        Ip::Address address;
         int forwarding_method;
         int return_method;
         int assignment_method;
@@ -301,20 +299,16 @@ struct SquidConfig {
     } Program;
 #if USE_DNSSERVERS
 
-    int dnsChildren;
+    HelperChildConfig dnsChildren;
 #endif
 
-    int redirectChildren;
-    int redirectConcurrency;
+    HelperChildConfig redirectChildren;
     time_t authenticateGCInterval;
     time_t authenticateTTL;
     time_t authenticateIpTTL;
 
     struct {
-#if USE_SQUID_ESI
         char *surrogate_id;
-#endif
-
     } Accel;
     char *appendDomain;
     size_t appendDomainLen;
@@ -336,17 +330,14 @@ struct SquidConfig {
 
     struct {
 
-        IpAddress udp_incoming;
-
-        IpAddress udp_outgoing;
+        Ip::Address udp_incoming;
+        Ip::Address udp_outgoing;
 #if SQUID_SNMP
-
-        IpAddress snmp_incoming;
-
-        IpAddress snmp_outgoing;
+        Ip::Address snmp_incoming;
+        Ip::Address snmp_outgoing;
 #endif
         /* FIXME INET6 : this should really be a CIDR value */
-        IpAddress client_netmask;
+        Ip::Address client_netmask;
     } Addrs;
     size_t tcpRcvBufsz;
     size_t udpMaxHitObjsz;
@@ -402,6 +393,7 @@ struct SquidConfig {
 #if HTTP_VIOLATIONS
 
         int reload_into_ims;
+        int ignore_expect_100;
 #endif
 
         int offline;
@@ -423,11 +415,7 @@ struct SquidConfig {
         int ie_refresh;
         int vary_ignore_expire;
         int pipeline_prefetch;
-
-#if USE_SQUID_ESI
         int surrogate_is_remote;
-#endif
-
         int request_entities;
         int detect_broken_server_pconns;
         int balance_on_multiple_ip;
@@ -444,6 +432,9 @@ struct SquidConfig {
         int acl_uses_indirect_client;
         int delay_pool_uses_indirect_client;
         int log_uses_indirect_client;
+#if LINUX_NETFILTER
+        int tproxy_uses_indirect_client;
+#endif
 #endif /* FOLLOW_X_FORWARDED_FOR */
 
         int WIN32_IpAddrChangeMonitor;
@@ -457,6 +448,7 @@ struct SquidConfig {
 
     struct {
         acl_access *http;
+        acl_access *adapted_http;
         acl_access *icp;
         acl_access *miss;
         acl_access *NeverDirect;
@@ -494,7 +486,6 @@ struct SquidConfig {
 #endif
     } accessList;
     acl_deny_info_list *denyInfoList;
-    authConfig authConfiguration;
 
     struct {
         size_t list_width;
@@ -513,6 +504,10 @@ struct SquidConfig {
         int n_allocated;
         int n_configured;
     } cacheSwap;
+    /*
+     * I'm sick of having to keep doing this ..
+     */
+#define INDEXSD(i)   (Config.cacheSwap.swapDirs[(i)].getRaw())
 
     struct {
         char *directory;
@@ -548,12 +543,12 @@ struct SquidConfig {
     } comm_incoming;
     int max_open_disk_fds;
     int uri_whitespace;
-    int64_t rangeOffsetLimit;
+    acl_size_t *rangeOffsetLimit;
 #if MULTICAST_MISS_STREAM
 
     struct {
 
-        IpAddress addr;
+        Ip::Address addr;
         int ttl;
         unsigned short port;
         char *encode_key;
@@ -596,10 +591,6 @@ struct SquidConfig {
     time_t minimum_expiry_time;        /* seconds */
     external_acl *externalAclHelperList;
 
-#if USE_ZPH_QOS
-    QosConfig zph;
-#endif
-
 #if USE_SSL
 
     struct {
@@ -619,10 +610,14 @@ struct SquidConfig {
 
     char *accept_filter;
     int umask;
+    int max_filedescriptors;
+    int workers;
 
 #if USE_LOADABLE_MODULES
     wordlist *loadable_module_names;
 #endif
+
+    int client_ip_max_connections;
 };
 
 SQUIDCEXTERN SquidConfig Config;
@@ -777,7 +772,7 @@ struct _http_state_flags {
 };
 
 struct _ipcache_addrs {
-    IpAddress *in_addrs;
+    Ip::Address *in_addrs;
     unsigned char *bad_mask;
     unsigned char count;
     unsigned char cur;
@@ -819,7 +814,7 @@ struct peer {
     char *host;
     peer_t type;
 
-    IpAddress in_addr;
+    Ip::Address in_addr;
 
     struct {
         int pings_sent;
@@ -885,6 +880,9 @@ struct peer {
         unsigned int sourcehash:1;
         unsigned int originserver:1;
         unsigned int no_tproxy:1;
+#if PEER_MULTICAST_SIBLINGS
+        unsigned int mcast_siblings:1;
+#endif
     } options;
 
     int weight;
@@ -910,7 +908,7 @@ struct peer {
 
     int tcp_up;                        /* 0 if a connect() fails */
 
-    IpAddress addresses[10];
+    Ip::Address addresses[10];
     int n_addresses;
     int rr_count;
     peer *next;
@@ -1088,6 +1086,7 @@ struct _refresh_t {
     struct {
         unsigned int icase:1;
         unsigned int refresh_ims:1;
+        unsigned int store_stale:1;
 #if HTTP_VIOLATIONS
         unsigned int override_expire:1;
         unsigned int override_lastmod:1;
@@ -1292,23 +1291,6 @@ struct _store_rebuild_data {
     int zero_object_sz;
 };
 
-struct _Logfile {
-    int fd;
-    char path[MAXPATHLEN];
-    char *buf;
-    size_t bufsz;
-    size_t offset;
-
-    struct {
-        unsigned int fatal;
-        unsigned int syslog;
-    } flags;
-
-    int syslog_priority;
-
-    int64_t sequence_number;  ///< Unique sequence number per log line.
-};
-
 class logformat_token;
 
 struct _logformat {
@@ -1317,6 +1299,8 @@ struct _logformat {
     logformat *next;
 };
 
+class Logfile;
+
 struct _customlog {
     char *filename;
     ACLList *aclList;