2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID_GLOBALS_H
10 #define SQUID_GLOBALS_H
12 #include "CacheDigest.h"
17 #include "sbuf/SBuf.h"
19 extern char *ConfigFile
; /* NULL */
20 extern char *IcpOpcodeStr
[];
21 extern char ThisCache
[RFC2181_MAXHOSTNAMELEN
<< 1];
22 extern char ThisCache2
[RFC2181_MAXHOSTNAMELEN
<< 1];
23 extern const char *dash_str
; /* "-" */
24 extern const char *null_string
; /* "" */
25 extern const char *version_string
; /* VERSION */
26 extern const char *appname_string
; /* PACKAGE */
27 extern char const *visible_appname_string
; /* NULL */
28 extern const char *fdTypeStr
[];
29 extern const char *hier_strings
[];
30 extern const char *memStatusStr
[];
31 extern const char *pingStatusStr
[];
32 extern const char *storeStatusStr
[];
33 extern const char *swapStatusStr
[];
34 extern int Biggest_FD
; /* -1 */
35 extern int Number_FD
; /* 0 */
36 extern int Opening_FD
; /* 0 */
37 extern int NDnsServersAlloc
; /* 0 */
38 extern int RESERVED_FD
;
39 extern int Squid_MaxFD
; /* SQUID_MAXFD */
40 extern int opt_reuseaddr
; /* 1 */
41 extern int neighbors_do_private_keys
; /* 1 */
42 extern int opt_catch_signals
; /* 1 */
43 extern int opt_foreground
; /* 0 */
44 extern int opt_foreground_rebuild
; /* 0 */
45 extern char *opt_forwarded_for
; /* NULL */
46 extern int opt_reload_hit_only
; /* 0 */
48 extern int opt_udp_hit_obj
; /* 0 */
49 extern int opt_create_swap_dirs
; /* 0 */
50 extern int opt_store_doublecheck
; /* 0 */
51 extern int syslog_enable
; /* 0 */
52 extern int DnsSocketA
; /* -1 */
53 extern int DnsSocketB
; /* -1 */
54 extern int n_disk_objects
; /* 0 */
55 extern IoStats IOStats
;
57 extern struct timeval squid_start
;
58 extern int starting_up
; /* 1 */
59 extern int shutting_down
; /* 0 */
60 extern int reconfiguring
; /* 0 */
61 extern time_t hit_only_mode_until
; /* 0 */
62 extern double request_failure_ratio
; /* 0.0 */
63 extern int store_hash_buckets
; /* 0 */
64 extern hash_table
*store_table
; /* NULL */
65 extern int hot_obj_count
; /* 0 */
66 extern int CacheDigestHashFuncCount
; /* 4 */
67 extern CacheDigest
*store_digest
; /* NULL */
68 extern const char *StoreDigestFileName
; /* "store_digest" */
69 extern const char *StoreDigestMimeStr
; /* "application/cache-digest" */
71 extern const char *MultipartMsgBoundaryStr
; /* "Unique-Squid-Separator" */
72 #if USE_HTTP_VIOLATIONS
73 extern int refresh_nocache_hack
; /* 0 */
76 extern int store_open_disk_fd
; /* 0 */
77 extern const char *SwapDirType
[];
78 extern int store_swap_low
; /* 0 */
79 extern int store_swap_high
; /* 0 */
80 extern size_t store_pages_max
; /* 0 */
81 extern int64_t store_maxobjsize
; /* 0 */
82 extern int incoming_sockets_accepted
;
84 extern unsigned int WIN32_Socks_initialized
; /* 0 */
87 extern unsigned int WIN32_OS_version
; /* 0 */
88 extern char *WIN32_OS_string
; /* NULL */
89 extern char *WIN32_Command_Line
; /* NULL */
90 extern char *WIN32_Service_Command_Line
; /* NULL */
91 extern unsigned int WIN32_run_mode
; /* _WIN_SQUID_RUN_MODE_INTERACTIVE */
94 extern int ssl_ex_index_server
; /* -1 */
95 extern int ssl_ctx_ex_index_dont_verify_domain
; /* -1 */
96 extern int ssl_ex_index_cert_error_check
; /* -1 */
97 extern int ssl_ex_index_ssl_error_detail
; /* -1 */
98 extern int ssl_ex_index_ssl_peeked_cert
; /* -1 */
99 extern int ssl_ex_index_ssl_errors
; /* -1 */
100 extern int ssl_ex_index_ssl_cert_chain
; /* -1 */
101 extern int ssl_ex_index_ssl_validation_counter
; /* -1 */
103 extern const char *external_acl_message
; /* NULL */
104 extern int opt_send_signal
; /* -1 */
105 extern int opt_no_daemon
; /* 0 */
106 extern int opt_parse_cfg_only
; /* 0 */
108 /// current Squid process number (e.g., 4).
109 /// Zero for SMP-unaware code and in no-SMP mode.
110 extern int KidIdentifier
; /* 0 */
112 #endif /* SQUID_GLOBALS_H */