]> git.ipfire.org Git - thirdparty/squid.git/blob - src/enums.h
Docs: fix many spelling mistakes (#206)
[thirdparty/squid.git] / src / enums.h
1 /*
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9 #ifndef SQUID_ENUMS_H
10 #define SQUID_ENUMS_H
11
12 enum fd_type {
13 FD_NONE,
14 FD_LOG,
15 FD_FILE,
16 FD_SOCKET,
17 FD_PIPE,
18 FD_MSGHDR,
19 FD_UNKNOWN
20 };
21
22 enum {
23 FD_READ,
24 FD_WRITE
25 };
26
27 typedef enum {
28 PEER_NONE,
29 PEER_SIBLING,
30 PEER_PARENT,
31 PEER_MULTICAST
32 } peer_t;
33
34 typedef enum _mem_status_t {
35 NOT_IN_MEMORY,
36 IN_MEMORY
37 } mem_status_t;
38
39 typedef enum {
40 PING_NONE,
41 PING_WAITING,
42 PING_DONE
43 } ping_status_t;
44
45 typedef enum {
46 STORE_OK,
47 STORE_PENDING
48 } store_status_t;
49
50 /// StoreEntry relationship with a disk cache
51 typedef enum {
52 /// StoreEntry is currently not associated with any disk store entry.
53 /// Does not guarantee (or preclude!) a matching disk store entry existence.
54 SWAPOUT_NONE,
55 /// StoreEntry is being swapped out to the associated disk store entry.
56 /// Guarantees the disk store entry existence.
57 SWAPOUT_WRITING,
58 /// StoreEntry is associated with a complete (i.e., fully swapped out) disk store entry.
59 /// Guarantees the disk store entry existence.
60 SWAPOUT_DONE
61 } swap_status_t;
62
63 typedef enum {
64 STORE_NON_CLIENT,
65 STORE_MEM_CLIENT,
66 STORE_DISK_CLIENT
67 } store_client_t;
68
69 /*
70 * These are for StoreEntry->flag, which is defined as a SHORT
71 *
72 * NOTE: These flags are written to swap.state, so think very carefully
73 * about deleting or re-assigning!
74 */
75 enum {
76 ENTRY_SPECIAL,
77 ENTRY_REVALIDATE_ALWAYS,
78 DELAY_SENDING,
79 RELEASE_REQUEST, ///< prohibits making the key public
80 REFRESH_REQUEST,
81 ENTRY_REVALIDATE_STALE,
82 ENTRY_DISPATCHED,
83 KEY_PRIVATE,
84 ENTRY_FWD_HDR_WAIT,
85 ENTRY_NEGCACHED,
86 ENTRY_VALIDATED,
87 ENTRY_BAD_LENGTH,
88 ENTRY_ABORTED
89 };
90
91 /*
92 * These are for client Streams. Each node in the stream can be queried for
93 * its status
94 */
95 typedef enum {
96 STREAM_NONE, /* No particular status */
97 STREAM_COMPLETE, /* All data has been flushed, no more reads allowed */
98 /* an unpredicted end has occurred, no more
99 * reads occurred, but no need to tell
100 * downstream that an error occurred
101 */
102 STREAM_UNPLANNED_COMPLETE,
103 /* An error has occurred in this node or an above one,
104 * and the node is not generating an error body / it's
105 * midstream
106 */
107 STREAM_FAILED
108 } clientStream_status_t;
109
110 /* stateful helper callback response codes */
111 typedef enum {
112 S_HELPER_UNKNOWN,
113 S_HELPER_RESERVE,
114 S_HELPER_RELEASE
115 } stateful_helper_callback_t;
116
117 #if SQUID_SNMP
118 enum {
119 SNMP_C_VIEW,
120 SNMP_C_USER,
121 SNMP_C_COMMUNITY
122 };
123 #endif /* SQUID_SNMP */
124
125 enum {
126 STORE_LOG_CREATE,
127 STORE_LOG_SWAPIN,
128 STORE_LOG_SWAPOUT,
129 STORE_LOG_RELEASE,
130 STORE_LOG_SWAPOUTFAIL
131 };
132
133 enum {
134 PCTILE_HTTP,
135 PCTILE_ICP_QUERY,
136 PCTILE_DNS,
137 PCTILE_HIT,
138 PCTILE_MISS,
139 PCTILE_NM,
140 PCTILE_NH,
141 PCTILE_ICP_REPLY
142 };
143
144 enum {
145 SENT,
146 RECV
147 };
148
149 /*
150 * These are field indicators for raw cache-cache netdb transfers
151 */
152 enum {
153 NETDB_EX_NONE,
154 NETDB_EX_NETWORK,
155 NETDB_EX_RTT,
156 NETDB_EX_HOPS
157 };
158
159 /*
160 * Return codes from checkVary(request)
161 */
162 enum {
163 VARY_NONE,
164 VARY_MATCH,
165 VARY_OTHER,
166 VARY_CANCEL
167 };
168
169 /*
170 * Store digest state enum
171 */
172 typedef enum {
173 DIGEST_READ_NONE,
174 DIGEST_READ_REPLY,
175 DIGEST_READ_HEADERS,
176 DIGEST_READ_CBLOCK,
177 DIGEST_READ_MASK,
178 DIGEST_READ_DONE
179 } digest_read_state_t;
180
181 /* CygWin & Windows NT Port */
182 #if _SQUID_WINDOWS_
183 /*
184 * Supported Windows OS types codes
185 */
186 enum {
187 _WIN_OS_UNKNOWN,
188 _WIN_OS_WIN32S,
189 _WIN_OS_WIN95,
190 _WIN_OS_WIN98,
191 _WIN_OS_WINME,
192 _WIN_OS_WINNT,
193 _WIN_OS_WIN2K,
194 _WIN_OS_WINXP,
195 _WIN_OS_WINNET,
196 _WIN_OS_WINLON,
197 _WIN_OS_WIN7
198 };
199 #endif /* _SQUID_WINDOWS_ */
200
201 enum {
202 DISABLE_PMTU_OFF,
203 DISABLE_PMTU_ALWAYS,
204 DISABLE_PMTU_TRANSPARENT
205 };
206
207 #if USE_HTCP
208 /*
209 * TODO: This should be in htcp.h
210 */
211 typedef enum {
212 HTCP_CLR_PURGE,
213 HTCP_CLR_INVALIDATION
214 } htcp_clr_reason;
215 #endif /* USE_HTCP */
216
217 #endif /* SQUID_ENUMS_H */
218