3 * $Id: globals.h,v 1.86 1999/12/30 17:36:35 wessels Exp $
6 * SQUID Internet Object Cache http://squid.nlanr.net/Squid/
7 * ----------------------------------------------------------
9 * Squid is the result of efforts by numerous individuals from the
10 * Internet community. Development is led by Duane Wessels of the
11 * National Laboratory for Applied Network Research and funded by the
12 * National Science Foundation. Squid is Copyrighted (C) 1998 by
13 * Duane Wessels and the University of California San Diego. Please
14 * see the COPYRIGHT file for full details. Squid incorporates
15 * software developed and/or copyrighted by other sources. Please see
16 * the CREDITS file for full details.
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
34 extern FILE *debug_log
; /* NULL */
35 extern FILE *cache_useragent_log
; /* NULL */
36 extern SquidConfig Config
;
37 extern SquidConfig2 Config2
;
38 extern char *ConfigFile
; /* NULL */
39 extern char *IcpOpcodeStr
[];
40 extern char *dns_error_message
; /* NULL */
41 extern const char *log_tags
[];
42 extern char tmp_error_buf
[ERROR_BUF_SZ
];
43 extern char *volatile debug_options
; /* NULL */
44 extern char ThisCache
[SQUIDHOSTNAMELEN
<< 1];
45 extern char ThisCache2
[SQUIDHOSTNAMELEN
<< 1];
46 extern char config_input_line
[BUFSIZ
];
47 extern const char *AclMatchedName
; /* NULL */
48 extern const char *DefaultConfigFile
; /* DEFAULT_CONFIG_FILE */
49 extern const char *RequestMethodStr
[];
50 extern const char *ProtocolStr
[];
51 extern const char *cfg_filename
; /* NULL */
52 extern const char *const appname
; /* "squid" */
53 extern const char *const dash_str
; /* "-" */
54 extern const char *const localhost
; /* "127.0.0.1" */
55 extern const char *const null_string
; /* "" */
56 extern const char *const version_string
; /* SQUID_VERSION */
57 extern const char *const full_appname_string
; /* "Squid/" SQUID_VERSION */
58 extern const char *const w_space
; /* " \t\n\r" */
59 extern const char *fdTypeStr
[];
60 extern const char *hier_strings
[];
61 extern const char *memStatusStr
[];
62 extern const char *pingStatusStr
[];
63 extern const char *storeStatusStr
[];
64 extern const char *swapStatusStr
[];
65 extern dnsStatData DnsStats
;
66 extern fde
*fd_table
; /* NULL */
67 extern int Biggest_FD
; /* -1 */
68 extern int Number_FD
; /* 0 */
69 extern int Opening_FD
; /* 0 */
70 extern int HttpSockets
[MAXHTTPPORTS
];
71 extern int NDnsServersAlloc
; /* 0 */
72 extern int NHttpSockets
; /* 0 */
73 extern int RESERVED_FD
;
74 extern int Squid_MaxFD
; /* SQUID_MAXFD */
75 extern int config_lineno
; /* 0 */
76 extern int debugLevels
[MAX_DEBUG_SECTIONS
];
77 extern int do_mallinfo
; /* 0 */
78 extern int opt_reuseaddr
; /* 1 */
79 extern int icmp_sock
; /* -1 */
80 extern int neighbors_do_private_keys
; /* 1 */
81 extern int opt_accel_uses_host
; /* 0 */
82 extern int opt_catch_signals
; /* 1 */
83 extern int opt_debug_stderr
; /* -1 */
84 extern int opt_dns_tests
; /* 1 */
85 extern int opt_foreground_rebuild
; /* 0 */
86 extern int opt_forwarded_for
; /* 1 */
87 extern int opt_reload_hit_only
; /* 0 */
88 extern int opt_syslog_enable
; /* 0 */
89 extern int opt_udp_hit_obj
; /* 0 */
90 extern int opt_create_swap_dirs
; /* 0 */
91 extern int opt_store_doublecheck
; /* 0 */
92 extern int syslog_enable
; /* 0 */
93 extern int theInIcpConnection
; /* -1 */
94 extern int theOutIcpConnection
; /* -1 */
95 extern int DnsSocket
; /* -1 */
97 extern int theInSnmpConnection
; /* -1 */
98 extern int theOutSnmpConnection
; /* -1 */
99 extern char *snmp_agentinfo
;
101 extern int vhost_mode
; /* 0 */
102 extern int n_disk_objects
; /* 0 */
103 extern iostats IOStats
;
104 extern struct _acl_deny_info_list
*DenyInfoList
; /* NULL */
105 extern struct in_addr any_addr
;
106 extern struct in_addr local_addr
;
107 extern struct in_addr no_addr
;
108 extern struct in_addr theOutICPAddr
;
109 extern struct in_addr theOutSNMPAddr
;
110 extern struct timeval current_time
;
111 extern struct timeval squid_start
;
112 extern time_t squid_curtime
; /* 0 */
113 extern int shutting_down
; /* 0 */
114 extern int reconfiguring
; /* 0 */
115 extern int store_dirs_rebuilding
; /* 1 */
116 extern int store_swap_size
; /* 0 */
117 extern unsigned long store_mem_size
; /* 0 */
118 extern time_t hit_only_mode_until
; /* 0 */
119 extern StatCounters Counter
;
120 extern char *err_type_str
[];
121 extern char *icp_opcode_str
[];
122 extern char *swap_log_op_str
[];
123 extern char *lookup_t_str
[];
124 extern double request_failure_ratio
; /* 0.0 */
125 extern double current_dtime
;
126 extern int store_hash_buckets
; /* 0 */
127 extern hash_table
*store_table
; /* NULL */
129 extern heap
*store_heap
;
130 extern heap
*inmem_heap
;
132 extern dlink_list store_list
;
134 extern dlink_list ClientActiveRequests
;
135 extern const String StringNull
; /* { 0, 0, NULL } */
136 extern const MemBuf MemBufNull
; /* MemBufNULL */
137 extern int hot_obj_count
; /* 0 */
138 extern int _db_level
;
139 extern const int CacheDigestHashFuncCount
; /* 4 */
140 extern CacheDigest
*store_digest
; /* NULL */
141 extern const char *StoreDigestFileName
; /* "store_digest" */
142 extern const char *StoreDigestMimeStr
; /* "application/cache-digest" */
143 #if USE_CACHE_DIGESTS
144 extern const Version CacheDigestVer
; /* { 5, 3 } */
146 extern const char *MultipartMsgBoundaryStr
; /* "Unique-Squid-Separator" */
147 extern icpUdpData
*IcpQueueHead
; /* NULL */
149 extern int refresh_nocache_hack
; /* 0 */
151 extern request_flags null_request_flags
;
152 extern int store_open_disk_fd
; /* 0 */
153 extern const char *SwapDirType
[];