2 * Copyright (C) 1996-2015 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_LOGTAGS_H
10 #define SQUID_SRC_LOGTAGS_H
12 /** Squid transaction result code/tag set.
14 * These codes indicate how the request was received
15 * and some details about its processing pathway.
17 * see also http://wiki.squid-cache.org/SquidFaq/SquidLogs#Squid_result_codes
18 * for details on particular components.
24 LOG_TCP_REFRESH_UNMODIFIED
, // refresh from origin revalidated existing entry
25 LOG_TCP_REFRESH_FAIL_OLD
, // refresh from origin failed, stale reply sent
26 LOG_TCP_REFRESH_FAIL_ERR
, // refresh from origin failed, error forwarded
27 LOG_TCP_REFRESH_MODIFIED
, // refresh from origin replaced existing entry
28 LOG_TCP_CLIENT_REFRESH_MISS
,
30 LOG_TCP_SWAPFAIL_MISS
,
37 LOG_TCP_TUNNEL
, // a binary tunnel was established for this transaction
47 /// list of string representations for LogTags
48 extern const char *LogTags_str
[];
50 /// determine if the log tag code indicates a cache HIT
51 inline bool logTypeIsATcpHit(LogTags code
)
54 (code
== LOG_TCP_HIT
) ||
55 (code
== LOG_TCP_IMS_HIT
) ||
56 (code
== LOG_TCP_REFRESH_FAIL_OLD
) ||
57 (code
== LOG_TCP_REFRESH_UNMODIFIED
) ||
58 (code
== LOG_TCP_NEGATIVE_HIT
) ||
59 (code
== LOG_TCP_MEM_HIT
) ||
60 (code
== LOG_TCP_OFFLINE_HIT
);
63 /// iterator for LogTags enumeration
64 inline LogTags
&operator++ (LogTags
&aLogType
)
66 int tmp
= (int)aLogType
;
67 aLogType
= (LogTags
)(++tmp
);