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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors