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_SRC_ENUMS_H
10 #define SQUID_SRC_ENUMS_H
29 typedef enum _mem_status_t
{
35 /// Has not considered whether to send ICP queries to peers yet.
37 /// Sent ICP queries to peers and still awaiting responses.
39 /// Not waiting for ICP responses now and will not send ICP queries later.
40 /// The ICP queries may (or may not) have been sent earlier.
49 /// StoreEntry relationship with a disk cache
51 /// StoreEntry is currently not associated with any disk store entry.
52 /// Does not guarantee (or preclude!) a matching disk store entry existence.
54 /// StoreEntry is being swapped out to the associated disk store entry.
55 /// Guarantees the disk store entry existence.
57 /// StoreEntry is associated with a complete (i.e., fully swapped out) disk store entry.
58 /// Guarantees the disk store entry existence.
60 /// StoreEntry is associated with an unusable disk store entry.
61 /// Swapout attempt has failed. The entry should be marked for eventual deletion.
62 /// Guarantees the disk store entry existence.
73 * These are for StoreEntry->flag, which is defined as a SHORT
75 * NOTE: These flags are written to swap.state, so think very carefully
76 * about deleting or re-assigning!
80 ENTRY_REVALIDATE_ALWAYS
,
82 /// Tiny Store writes are likely. The writes should be aggregated together
83 /// before Squid announces the new content availability to the store
84 /// clients. For example, forming a cached HTTP response header may result
85 /// in dozens of StoreEntry::write() calls, many of which adding as little
86 /// as two bytes. Sharing those small writes with the store clients
87 /// increases overhead, especially because the client code can do nothing
88 /// useful with the written content until the whole response header is
89 /// stored. Might be combined with ENTRY_FWD_HDR_WAIT. TODO: Rename to
90 /// ENTRY_DELAY_WHILE_COALESCING to emphasize the difference from and
91 /// similarity with ENTRY_FWD_HDR_WAIT.
93 RELEASE_REQUEST
, ///< prohibits making the key public
95 ENTRY_REVALIDATE_STALE
,
99 /// The current entry response may change. The contents of an entry in this
100 /// state must not be shared with its store clients. For example, Squid
101 /// receives (and buffers) an HTTP/504 response but may decide to retry that
102 /// transaction to receive a successful response from another server
103 /// instead. Might be combined with DELAY_SENDING. TODO: Rename to
104 /// ENTRY_DELAY_WHILE_WOBBLING to emphasize the difference from and
105 /// similarity with DELAY_SENDING.
111 /// Whether the entry serves collapsed hits now.
112 /// Meaningful only for public entries.
113 ENTRY_REQUIRES_COLLAPSING
117 * These are for client Streams. Each node in the stream can be queried for
121 STREAM_NONE
, /* No particular status */
122 STREAM_COMPLETE
, /* All data has been flushed, no more reads allowed */
123 /* an unpredicted end has occurred, no more
124 * reads occurred, but no need to tell
125 * downstream that an error occurred
127 STREAM_UNPLANNED_COMPLETE
,
128 /* An error has occurred in this node or an above one,
129 * and the node is not generating an error body / it's
133 } clientStream_status_t
;
135 /* stateful helper callback response codes */
140 } stateful_helper_callback_t
;
148 #endif /* SQUID_SNMP */
155 STORE_LOG_SWAPOUTFAIL
175 * These are field indicators for raw cache-cache netdb transfers
185 * Return codes from checkVary(request)
195 * Store digest state enum
203 } digest_read_state_t
;
205 /* CygWin & Windows NT Port */
208 * Supported Windows OS types codes
223 #endif /* _SQUID_WINDOWS_ */
228 DISABLE_PMTU_TRANSPARENT
233 * TODO: This should be in htcp.h
237 HTCP_CLR_INVALIDATION
239 #endif /* USE_HTCP */
241 #endif /* SQUID_SRC_ENUMS_H */