ByteCode.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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_SRC_FORMAT_BYTECODE_H
10 #define SQUID_SRC_FORMAT_BYTECODE_H
11 
12 /*
13  * Squid configuration allows users to define custom formats in
14  * several components.
15  * - logging
16  * - external ACL input
17  * - deny page URL
18  *
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.
22  */
23 
24 namespace Format
25 {
26 
27 /*
28  * Bytecodes for the configurable format stuff
29  */
30 typedef enum {
31  LFT_NONE, /* dummy */
32 
33  /* arbitrary string between tokens */
35 
37 
38  /* client TCP connection remote end details */
43 
44  /* client TCP connection local end details */
47  /*LFT_CLIENT_LOCAL_FQDN, (rDNS) */
50 
52 
54 
55  /* client connection local squid.conf details */
58  /*LFT_LOCAL_LISTENING_NAME, (myportname) */
59 
60  /* server TCP connection remote end details */
64 
65  /* server TCP connection local end details */
71 
72  /* original Request-Line details received from client */
79  /* LFT_CLIENT_REQ_QUERY, */
81 
82  /* Request-Line details received from client (legacy, filtered) */
86  /*LFT_REQUEST_QUERY, */
90 
91  /* request header details pre-adaptation */
95 
96  /* request header details post-adaptation */
100 
101  /* Request-Line details sent to the server/peer */
108  /*LFT_SERVER_REQ_QUERY, */
110 
111  /* request meta details */
114  /*LFT_REQUEST_SIZE_BODY, */
115  /*LFT_REQUEST_SIZE_BODY_NO_TE, */
116 
117  /* original Status-Line details received from server */
118  // TODO: implement server detail logging
119 
120  /* Status-Line details sent to the client */
121  // TODO: implement server detail logging
122 
123  /* response Status-Line details (legacy, filtered) */
127  /*LFT_HTTP_STATUS, */
129 
130  /* response header details pre-adaptation */
134 
135  /* response header details post-adaptation */
136  /* LFT_ADAPTED_REPLY_HEADER, */
137  /* LFT_ADAPTED_REPLY_HEADER_ELEM, */
138  /* LFT_ADAPTED_REPLY_ALL_HEADERS, */
139 
140  /* response meta details */
145  /*LFT_REPLY_SIZE_BODY, */
146  /*LFT_REPLY_SIZE_BODY_NO_TE, */
147 
149 
150  /* client credentials */
151  LFT_USER_NAME, /* any source will do */
153  /*LFT_USER_REALM, */
154  /*LFT_USER_SCHEME, */
156  /* LFT_USER_SSL_CERT, */
157 
158  /* global time details */
163  LFT_TIME_START, // the time the master transaction started
164 
165  /* processing time details */
171 
172  /* Squid internal processing details */
178 
182 
184 
185 #if USE_ADAPTATION
191 #endif
192 
193 #if ICAP_CLIENT
194 
196 
204 
208 
212 
217 #endif
219 
220 #if USE_OPENSSL
237 #endif
238 
240  LFT_PERCENT, /* special string cases for escaped chars */
242 
243  // TODO assign better bytecode names and Token strings for these
244 #if USE_OPENSSL
249 #endif
254 
255  /* PROXY protocol details */
259 } ByteCode_t;
260 
262 enum Quoting {
269 };
270 
271 } // namespace Format
272 
273 #endif /* SQUID_SRC_FORMAT_BYTECODE_H */
274 
@ LFT_ICAP_TR_RESPONSE_TIME
Definition: ByteCode.h:213
@ LFT_LOCAL_LISTENING_IP
Definition: ByteCode.h:56
@ LFT_TRANSPORT_CLIENT_CONNECTION_ID
Definition: ByteCode.h:51
@ LFT_TLS_CLIENT_NEGOTIATED_VERSION
Definition: ByteCode.h:229
@ LFT_EXT_ACL_USER_CERT_RAW
Definition: ByteCode.h:245
@ LFT_SQUID_ERROR_DETAIL
Definition: ByteCode.h:175
@ LFT_CLIENT_LOCAL_PORT
Definition: ByteCode.h:46
@ LFT_ICAP_REQUEST_METHOD
Definition: ByteCode.h:200
@ LFT_ICAP_SERV_NAME
Definition: ByteCode.h:198
@ LFT_ICAP_BODY_BYTES_READ
Definition: ByteCode.h:203
@ LFT_CLIENT_REQ_URLSCHEME
Definition: ByteCode.h:75
@ LFT_SSL_SERVER_CERT_ERRORS
Definition: ByteCode.h:227
@ LFT_USER_NAME
Definition: ByteCode.h:151
@ LFT_ADAPTATION_LAST_ALL_HEADERS
Definition: ByteCode.h:190
@ LOG_QUOTE_URL
Definition: ByteCode.h:266
@ LFT_ICAP_IO_TIME
Definition: ByteCode.h:214
@ LFT_ADAPTATION_LAST_HEADER
Definition: ByteCode.h:188
@ LFT_TAG
Definition: ByteCode.h:180
@ LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME
Definition: ByteCode.h:168
@ LFT_ICAP_REQ_HEADER_ELEM
Definition: ByteCode.h:206
@ LFT_CLIENT_LOCAL_IP
Definition: ByteCode.h:45
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER
Definition: ByteCode.h:256
@ LFT_CLIENT_EUI
Definition: ByteCode.h:42
@ LFT_SSL_USER_CERT_SUBJECT
Definition: ByteCode.h:222
@ LFT_REQUEST_VERSION
Definition: ByteCode.h:88
@ LFT_SERVER_LOCAL_IP_OLD_27
Definition: ByteCode.h:67
@ LFT_USER_LOGIN
Definition: ByteCode.h:152
@ LFT_TLS_CLIENT_SUPPORTED_VERSION
Definition: ByteCode.h:235
@ LFT_SERVER_REQ_URLDOMAIN
Definition: ByteCode.h:105
@ LFT_SSL_SERVER_CERT_ISSUER
Definition: ByteCode.h:226
@ LOG_QUOTE_RAW
Definition: ByteCode.h:268
@ LFT_EXT_LOG
Definition: ByteCode.h:181
@ LFT_REQUEST_METHOD
Definition: ByteCode.h:83
@ LFT_SQUID_REQUEST_ATTEMPTS
Definition: ByteCode.h:177
@ LFT_SQUID_ERROR
Definition: ByteCode.h:174
ByteCode_t
Definition: ByteCode.h:30
@ LFT_CLIENT_REQ_URI
Definition: ByteCode.h:74
@ LFT_SERVER_LOCAL_IP
Definition: ByteCode.h:66
@ LFT_MIME_TYPE
Definition: ByteCode.h:179
@ LFT_USER_EXTERNAL
Definition: ByteCode.h:155
@ LFT_REQUEST_URLGROUP_OLD_2X
Definition: ByteCode.h:89
@ LFT_SQUID_STATUS
Definition: ByteCode.h:173
@ LFT_REQUEST_HEADER
Definition: ByteCode.h:92
@ LFT_SERVER_REQ_URLSCHEME
Definition: ByteCode.h:104
@ LFT_TIME_LOCALTIME
Definition: ByteCode.h:161
@ LFT_ADAPTED_REQUEST_HEADER
Definition: ByteCode.h:97
@ LFT_SERVER_IP_ADDRESS
Definition: ByteCode.h:61
@ LFT_TIME_START
Definition: ByteCode.h:163
@ LFT_ICAP_TOTAL_TIME
Definition: ByteCode.h:195
@ LOG_QUOTE_NONE
Definition: ByteCode.h:263
@ LFT_TLS_SERVER_NEGOTIATED_CIPHER
Definition: ByteCode.h:232
@ LFT_REPLY_HIGHOFFSET
Definition: ByteCode.h:142
@ LFT_CLIENT_FQDN
Definition: ByteCode.h:40
@ LFT_SERVER_LOCAL_PORT
Definition: ByteCode.h:68
@ LFT_SSL_USER_CERT_ISSUER
Definition: ByteCode.h:223
@ LFT_ADAPTATION_LAST_HEADER_ELEM
Definition: ByteCode.h:189
@ LFT_ICAP_STATUS_CODE
Definition: ByteCode.h:216
@ LFT_PEER_RESPONSE_TIME
Definition: ByteCode.h:167
@ LFT_SERVER_REQ_VERSION
Definition: ByteCode.h:109
@ LFT_REQUEST_URLPATH_OLD_31
Definition: ByteCode.h:85
@ LFT_TIME_GMT
Definition: ByteCode.h:162
@ LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:233
@ LFT_SERVER_LOCAL_NFMARK
Definition: ByteCode.h:70
@ LOG_QUOTE_SHELL
Definition: ByteCode.h:267
@ LFT_MASTER_XACTION
Definition: ByteCode.h:241
@ LFT_CLIENT_REQUEST_SIZE_TOTAL
Definition: ByteCode.h:112
@ LFT_TLS_SERVER_NEGOTIATED_VERSION
Definition: ByteCode.h:230
@ LFT_BUSY_TIME
Definition: ByteCode.h:170
@ LFT_ICAP_BYTES_READ
Definition: ByteCode.h:202
@ LFT_ADAPTATION_ALL_XACT_TIMES
Definition: ByteCode.h:187
@ LFT_ICAP_REP_HEADER
Definition: ByteCode.h:209
@ LFT_TLS_CLIENT_NEGOTIATED_CIPHER
Definition: ByteCode.h:231
@ LFT_HTTP_SENT_STATUS_CODE_OLD_30
Definition: ByteCode.h:124
@ LFT_REQUEST_URI
Definition: ByteCode.h:84
@ LFT_SERVER_REQ_URLPATH
Definition: ByteCode.h:107
@ LFT_HTTP_BODY_BYTES_READ
Definition: ByteCode.h:128
@ LFT_TLS_SERVER_SUPPORTED_VERSION
Definition: ByteCode.h:236
@ LFT_DNS_WAIT_TIME
Definition: ByteCode.h:169
@ LFT_STRING
Definition: ByteCode.h:34
@ LFT_ICAP_OUTCOME
Definition: ByteCode.h:215
@ LFT_CLIENT_REQUEST_SIZE_HEADERS
Definition: ByteCode.h:113
@ LFT_EXT_ACL_CLIENT_EUI64
Definition: ByteCode.h:251
@ LFT_EXT_ACL_USER_CERTCHAIN_RAW
Definition: ByteCode.h:246
@ LFT_CLIENT_REQ_METHOD
Definition: ByteCode.h:73
@ LFT_REQUEST_ALL_HEADERS
Definition: ByteCode.h:94
@ LFT_CLIENT_REQ_URLPATH
Definition: ByteCode.h:78
@ LFT_REPLY_HEADER
Definition: ByteCode.h:131
@ LFT_SERVER_LOCAL_TOS
Definition: ByteCode.h:69
@ LFT_EXT_ACL_USER_CA_CERT
Definition: ByteCode.h:248
@ LFT_EXT_ACL_DATA
Definition: ByteCode.h:253
@ LFT_ICAP_REP_ALL_HEADERS
Definition: ByteCode.h:211
@ LFT_TIME_TO_HANDLE_REQUEST
Definition: ByteCode.h:166
@ LFT_ICAP_REQ_ALL_HEADERS
Definition: ByteCode.h:207
@ LFT_ICAP_REQ_HEADER
Definition: ByteCode.h:205
@ LFT_ICAP_REP_HEADER_ELEM
Definition: ByteCode.h:210
@ LFT_CLIENT_IP_ADDRESS
Definition: ByteCode.h:39
@ LFT_REPLY_OBJECTSIZE
Definition: ByteCode.h:143
@ LFT_ADAPTED_REPLY_SIZE_TOTAL
Definition: ByteCode.h:141
@ LFT_ADAPTATION_SUM_XACT_TIMES
Definition: ByteCode.h:186
@ LFT_CLIENT_PORT
Definition: ByteCode.h:41
@ LFT_SERVER_REQ_URLPORT
Definition: ByteCode.h:106
@ LFT_EXT_ACL_NAME
Definition: ByteCode.h:252
@ LFT_ADAPTED_REPLY_SIZE_HEADERS
Definition: ByteCode.h:144
@ LFT_EXT_ACL_USER_CERT
Definition: ByteCode.h:247
@ LFT_TLS_SERVER_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:234
@ LFT_PROXY_PROTOCOL_RECEIVED_ALL_HEADERS
Definition: ByteCode.h:258
@ LFT_SEQUENCE_NUMBER
Definition: ByteCode.h:183
@ LFT_REPLY_ALL_HEADERS
Definition: ByteCode.h:133
@ LFT_ADAPTED_REQUEST_HEADER_ELEM
Definition: ByteCode.h:98
@ LFT_SERVER_PORT
Definition: ByteCode.h:63
@ LOG_QUOTE_QUOTES
Definition: ByteCode.h:264
@ LFT_ADAPTED_REQUEST_ALL_HEADERS
Definition: ByteCode.h:99
@ LFT_CLIENT_REQ_VERSION
Definition: ByteCode.h:80
@ LOG_QUOTE_MIMEBLOB
Definition: ByteCode.h:265
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER_ELEM
Definition: ByteCode.h:257
@ LFT_CLIENT_REQ_URLDOMAIN
Definition: ByteCode.h:76
@ LFT_CLIENT_LOCAL_NFMARK
Definition: ByteCode.h:49
@ LFT_HTTP_SENT_STATUS_CODE
Definition: ByteCode.h:125
@ LFT_TIME_SECONDS_SINCE_EPOCH
Definition: ByteCode.h:159
@ LFT_REQUEST_HEADER_ELEM
Definition: ByteCode.h:93
@ LFT_SSL_SERVER_CERT_WHOLE
Definition: ByteCode.h:228
@ LFT_REQUEST_VERSION_OLD_2X
Definition: ByteCode.h:87
@ LFT_SERVER_REQ_METHOD
Definition: ByteCode.h:102
@ LFT_CLIENT_IO_SIZE_TOTAL
Definition: ByteCode.h:148
@ LFT_SSL_BUMP_MODE
Definition: ByteCode.h:221
@ LFT_PERCENT
Definition: ByteCode.h:240
@ LFT_BYTE
Definition: ByteCode.h:36
@ LFT_CLIENT_REQ_URLPORT
Definition: ByteCode.h:77
@ LFT_REPLY_HEADER_ELEM
Definition: ByteCode.h:132
@ LFT_HTTP_RECEIVED_STATUS_CODE
Definition: ByteCode.h:126
@ LFT_NONE
Definition: ByteCode.h:31
@ LFT_SSL_CLIENT_SNI
Definition: ByteCode.h:224
@ LFT_CLIENT_HANDSHAKE
Definition: ByteCode.h:53
@ LFT_NOTE
Definition: ByteCode.h:239
@ LFT_CREDENTIALS
Definition: ByteCode.h:218
@ LFT_SERVER_REQ_URI
Definition: ByteCode.h:103
@ LFT_ICAP_REQUEST_URI
Definition: ByteCode.h:199
@ LFT_TIME_SUBSECOND
Definition: ByteCode.h:160
@ LFT_SSL_SERVER_CERT_SUBJECT
Definition: ByteCode.h:225
@ LFT_ICAP_ADDR
Definition: ByteCode.h:197
@ LFT_CLIENT_LOCAL_TOS
Definition: ByteCode.h:48
@ LFT_SERVER_FQDN_OR_PEER_NAME
Definition: ByteCode.h:62
@ LFT_LOCAL_LISTENING_PORT
Definition: ByteCode.h:57
@ LFT_EXT_ACL_CLIENT_EUI48
Definition: ByteCode.h:250
@ LFT_ICAP_BYTES_SENT
Definition: ByteCode.h:201
Quoting
Quoting style for a format output.
Definition: ByteCode.h:262
@ LFT_SQUID_HIERARCHY
Definition: ByteCode.h:176

 

Introduction

Documentation

Support

Miscellaneous