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_FMT_BYTECODE_H
10 #define _SQUID_FMT_BYTECODE_H
13 * Squid configuration allows users to define custom formats in
16 * - external ACL input
19 * These enumerations and classes define the API for parsing of
20 * format directives to define these patterns. Along with output
21 * functionality to produce formatted buffers.
28 * Bytecodes for the configureable format stuff
33 /* arbitrary string between tokens */
36 /* client TCP connection remote end details */
37 LFT_CLIENT_IP_ADDRESS
,
42 /* client TCP connection local end details */
44 LFT_CLIENT_LOCAL_PORT
,
45 /*LFT_CLIENT_LOCAL_FQDN, (rDNS) */
47 LFT_CLIENT_LOCAL_NFMARK
,
49 /* client connection local squid.conf details */
50 LFT_LOCAL_LISTENING_IP
,
51 LFT_LOCAL_LISTENING_PORT
,
52 /*LFT_LOCAL_LISTENING_NAME, (myportname) */
54 /* server TCP connection remote end details */
55 LFT_SERVER_IP_ADDRESS
,
56 LFT_SERVER_FQDN_OR_PEER_NAME
,
59 /* server TCP connection local end details */
61 LFT_SERVER_LOCAL_IP_OLD_27
,
62 LFT_SERVER_LOCAL_PORT
,
64 LFT_SERVER_LOCAL_NFMARK
,
66 /* original Request-Line details recieved from client */
67 LFT_CLIENT_REQ_METHOD
,
69 LFT_CLIENT_REQ_URLSCHEME
,
70 LFT_CLIENT_REQ_URLDOMAIN
,
71 LFT_CLIENT_REQ_URLPORT
,
72 LFT_CLIENT_REQ_URLPATH
,
73 /* LFT_CLIENT_REQ_QUERY, */
74 LFT_CLIENT_REQ_VERSION
,
76 /* Request-Line details recieved from client (legacy, filtered) */
79 LFT_REQUEST_URLPATH_OLD_31
,
80 /*LFT_REQUEST_QUERY, */
81 LFT_REQUEST_VERSION_OLD_2X
,
83 LFT_REQUEST_URLGROUP_OLD_2X
,
85 /* request header details pre-adaptation */
87 LFT_REQUEST_HEADER_ELEM
,
88 LFT_REQUEST_ALL_HEADERS
,
90 /* request header details post-adaptation */
91 LFT_ADAPTED_REQUEST_HEADER
,
92 LFT_ADAPTED_REQUEST_HEADER_ELEM
,
93 LFT_ADAPTED_REQUEST_ALL_HEADERS
,
95 /* Request-Line details sent to the server/peer */
96 LFT_SERVER_REQ_METHOD
,
98 LFT_SERVER_REQ_URLSCHEME
,
99 LFT_SERVER_REQ_URLDOMAIN
,
100 LFT_SERVER_REQ_URLPORT
,
101 LFT_SERVER_REQ_URLPATH
,
102 /*LFT_SERVER_REQ_QUERY, */
103 LFT_SERVER_REQ_VERSION
,
105 /* request meta details */
106 LFT_CLIENT_REQUEST_SIZE_TOTAL
,
107 LFT_CLIENT_REQUEST_SIZE_HEADERS
,
108 /*LFT_REQUEST_SIZE_BODY, */
109 /*LFT_REQUEST_SIZE_BODY_NO_TE, */
111 /* original Status-Line details recieved from server */
114 /* Status-Line details sent to the client */
117 /* response Status-Line details (legacy, filtered) */
118 LFT_HTTP_SENT_STATUS_CODE_OLD_30
,
119 LFT_HTTP_SENT_STATUS_CODE
,
120 LFT_HTTP_RECEIVED_STATUS_CODE
,
121 /*LFT_HTTP_STATUS, */
122 LFT_HTTP_BODY_BYTES_READ
,
124 /* response header details pre-adaptation */
126 LFT_REPLY_HEADER_ELEM
,
127 LFT_REPLY_ALL_HEADERS
,
129 /* response header details post-adaptation */
130 /* LFT_ADAPTED_REPLY_HEADER, */
131 /* LFT_ADAPTED_REPLY_HEADER_ELEM, */
132 /* LFT_ADAPTED_REPLY_ALL_HEADERS, */
134 /* response meta details */
135 LFT_ADAPTED_REPLY_SIZE_TOTAL
,
136 LFT_REPLY_HIGHOFFSET
,
137 LFT_REPLY_OBJECTSIZE
,
138 LFT_ADAPTED_REPLY_SIZE_HEADERS
,
139 /*LFT_REPLY_SIZE_BODY, */
140 /*LFT_REPLY_SIZE_BODY_NO_TE, */
142 LFT_CLIENT_IO_SIZE_TOTAL
,
144 /* client credentials */
145 LFT_USER_NAME
, /* any source will do */
149 /*LFT_USER_SCHEME, */
151 /* LFT_USER_SSL_CERT, */
153 /* global time details */
154 LFT_TIME_SECONDS_SINCE_EPOCH
,
158 LFT_TIME_START
, // the time the master transaction started
160 /* processing time details */
161 LFT_TIME_TO_HANDLE_REQUEST
,
162 LFT_PEER_RESPONSE_TIME
,
163 LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME
,
166 /* Squid internal processing details */
169 LFT_SQUID_ERROR_DETAIL
,
179 LFT_ADAPTATION_SUM_XACT_TIMES
,
180 LFT_ADAPTATION_ALL_XACT_TIMES
,
181 LFT_ADAPTATION_LAST_HEADER
,
182 LFT_ADAPTATION_LAST_HEADER_ELEM
,
183 LFT_ADAPTATION_LAST_ALL_HEADERS
,
192 LFT_ICAP_REQUEST_URI
,
193 LFT_ICAP_REQUEST_METHOD
,
196 LFT_ICAP_BODY_BYTES_READ
,
199 LFT_ICAP_REQ_HEADER_ELEM
,
200 LFT_ICAP_REQ_ALL_HEADERS
,
203 LFT_ICAP_REP_HEADER_ELEM
,
204 LFT_ICAP_REP_ALL_HEADERS
,
206 LFT_ICAP_TR_RESPONSE_TIME
,
209 LFT_ICAP_STATUS_CODE
,
215 LFT_SSL_USER_CERT_SUBJECT
,
216 LFT_SSL_USER_CERT_ISSUER
,
218 LFT_SSL_SERVER_CERT_SUBJECT
,
219 LFT_SSL_SERVER_CERT_ISSUER
,
223 LFT_PERCENT
, /* special string cases for escaped chars */
225 // TODO assign better bytecode names and Token strings for these
226 LFT_EXT_ACL_USER_CERT_RAW
,
227 LFT_EXT_ACL_USER_CERTCHAIN_RAW
,
228 LFT_EXT_ACL_USER_CERT
,
229 LFT_EXT_ACL_USER_CA_CERT
,
230 LFT_EXT_ACL_CLIENT_EUI48
,
231 LFT_EXT_ACL_CLIENT_EUI64
,
237 /// Quoting style for a format output.
246 } // namespace Format
248 #endif /* _SQUID_FMT_BYTECODE_H */