ByteCode.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2020 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 
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 
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 */
169 
170  /* Squid internal processing details */
175 
179 
181 
182 #if USE_ADAPTATION
188 #endif
189 
190 #if ICAP_CLIENT
191 
193 
201 
205 
209 
214 #endif
216 
217 #if USE_OPENSSL
234 #endif
235 
237  LFT_PERCENT, /* special string cases for escaped chars */
239 
240  // TODO assign better bytecode names and Token strings for these
241 #if USE_OPENSSL
246 #endif
251 
252  /* PROXY protocol details */
256 } ByteCode_t;
257 
259 enum Quoting {
266 };
267 
268 } // namespace Format
269 
270 #endif /* _SQUID_FMT_BYTECODE_H */
271 
@ LFT_ICAP_TR_RESPONSE_TIME
Definition: ByteCode.h:210
@ LFT_LOCAL_LISTENING_IP
Definition: ByteCode.h:54
@ LFT_TRANSPORT_CLIENT_CONNECTION_ID
Definition: ByteCode.h:49
@ LFT_TLS_CLIENT_NEGOTIATED_VERSION
Definition: ByteCode.h:226
@ LFT_EXT_ACL_USER_CERT_RAW
Definition: ByteCode.h:242
@ LFT_SQUID_ERROR_DETAIL
Definition: ByteCode.h:173
@ LFT_CLIENT_LOCAL_PORT
Definition: ByteCode.h:44
@ LFT_ICAP_REQUEST_METHOD
Definition: ByteCode.h:197
@ LFT_ICAP_SERV_NAME
Definition: ByteCode.h:195
@ LFT_ICAP_BODY_BYTES_READ
Definition: ByteCode.h:200
@ LFT_CLIENT_REQ_URLSCHEME
Definition: ByteCode.h:73
@ LFT_SSL_SERVER_CERT_ERRORS
Definition: ByteCode.h:224
@ LFT_USER_NAME
Definition: ByteCode.h:149
@ LFT_ADAPTATION_LAST_ALL_HEADERS
Definition: ByteCode.h:187
@ LOG_QUOTE_URL
Definition: ByteCode.h:263
@ LFT_ICAP_IO_TIME
Definition: ByteCode.h:211
@ LFT_ADAPTATION_LAST_HEADER
Definition: ByteCode.h:185
@ LFT_TAG
Definition: ByteCode.h:177
@ LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME
Definition: ByteCode.h:167
@ LFT_ICAP_REQ_HEADER_ELEM
Definition: ByteCode.h:203
@ LFT_CLIENT_LOCAL_IP
Definition: ByteCode.h:43
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER
Definition: ByteCode.h:253
@ LFT_CLIENT_EUI
Definition: ByteCode.h:40
@ LFT_SSL_USER_CERT_SUBJECT
Definition: ByteCode.h:219
@ LFT_REQUEST_VERSION
Definition: ByteCode.h:86
@ LFT_SERVER_LOCAL_IP_OLD_27
Definition: ByteCode.h:65
@ LFT_USER_LOGIN
Definition: ByteCode.h:150
@ LFT_TLS_CLIENT_SUPPORTED_VERSION
Definition: ByteCode.h:232
@ LFT_SERVER_REQ_URLDOMAIN
Definition: ByteCode.h:103
@ LFT_SSL_SERVER_CERT_ISSUER
Definition: ByteCode.h:223
@ LOG_QUOTE_RAW
Definition: ByteCode.h:265
@ LFT_EXT_LOG
Definition: ByteCode.h:178
@ LFT_REQUEST_METHOD
Definition: ByteCode.h:81
@ LFT_SQUID_ERROR
Definition: ByteCode.h:172
ByteCode_t
Definition: ByteCode.h:30
@ LFT_CLIENT_REQ_URI
Definition: ByteCode.h:72
@ LFT_SERVER_LOCAL_IP
Definition: ByteCode.h:64
@ LFT_MIME_TYPE
Definition: ByteCode.h:176
@ LFT_USER_EXTERNAL
Definition: ByteCode.h:154
@ LFT_REQUEST_URLGROUP_OLD_2X
Definition: ByteCode.h:87
@ LFT_SQUID_STATUS
Definition: ByteCode.h:171
@ LFT_REQUEST_HEADER
Definition: ByteCode.h:90
@ LFT_SERVER_REQ_URLSCHEME
Definition: ByteCode.h:102
@ LFT_TIME_LOCALTIME
Definition: ByteCode.h:160
@ LFT_ADAPTED_REQUEST_HEADER
Definition: ByteCode.h:95
@ LFT_SERVER_IP_ADDRESS
Definition: ByteCode.h:59
@ LFT_TIME_START
Definition: ByteCode.h:162
@ LFT_ICAP_TOTAL_TIME
Definition: ByteCode.h:192
@ LOG_QUOTE_NONE
Definition: ByteCode.h:260
@ LFT_TLS_SERVER_NEGOTIATED_CIPHER
Definition: ByteCode.h:229
@ LFT_REPLY_HIGHOFFSET
Definition: ByteCode.h:140
@ LFT_CLIENT_FQDN
Definition: ByteCode.h:38
@ LFT_SERVER_LOCAL_PORT
Definition: ByteCode.h:66
@ LFT_SSL_USER_CERT_ISSUER
Definition: ByteCode.h:220
@ LFT_ADAPTATION_LAST_HEADER_ELEM
Definition: ByteCode.h:186
@ LFT_ICAP_STATUS_CODE
Definition: ByteCode.h:213
@ LFT_PEER_RESPONSE_TIME
Definition: ByteCode.h:166
@ LFT_SERVER_REQ_VERSION
Definition: ByteCode.h:107
@ LFT_REQUEST_URLPATH_OLD_31
Definition: ByteCode.h:83
@ LFT_TIME_GMT
Definition: ByteCode.h:161
@ LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:230
@ LFT_SERVER_LOCAL_NFMARK
Definition: ByteCode.h:68
@ LOG_QUOTE_SHELL
Definition: ByteCode.h:264
@ LFT_MASTER_XACTION
Definition: ByteCode.h:238
@ LFT_CLIENT_REQUEST_SIZE_TOTAL
Definition: ByteCode.h:110
@ LFT_TLS_SERVER_NEGOTIATED_VERSION
Definition: ByteCode.h:227
@ LFT_ICAP_BYTES_READ
Definition: ByteCode.h:199
@ LFT_ADAPTATION_ALL_XACT_TIMES
Definition: ByteCode.h:184
@ LFT_ICAP_REP_HEADER
Definition: ByteCode.h:206
@ LFT_TLS_CLIENT_NEGOTIATED_CIPHER
Definition: ByteCode.h:228
@ LFT_HTTP_SENT_STATUS_CODE_OLD_30
Definition: ByteCode.h:122
@ LFT_REQUEST_URI
Definition: ByteCode.h:82
@ LFT_SERVER_REQ_URLPATH
Definition: ByteCode.h:105
@ LFT_HTTP_BODY_BYTES_READ
Definition: ByteCode.h:126
@ LFT_TLS_SERVER_SUPPORTED_VERSION
Definition: ByteCode.h:233
@ LFT_DNS_WAIT_TIME
Definition: ByteCode.h:168
@ LFT_STRING
Definition: ByteCode.h:34
@ LFT_ICAP_OUTCOME
Definition: ByteCode.h:212
@ LFT_CLIENT_REQUEST_SIZE_HEADERS
Definition: ByteCode.h:111
@ LFT_EXT_ACL_CLIENT_EUI64
Definition: ByteCode.h:248
@ LFT_EXT_ACL_USER_CERTCHAIN_RAW
Definition: ByteCode.h:243
@ LFT_CLIENT_REQ_METHOD
Definition: ByteCode.h:71
@ LFT_REQUEST_ALL_HEADERS
Definition: ByteCode.h:92
@ LFT_CLIENT_REQ_URLPATH
Definition: ByteCode.h:76
@ LFT_REPLY_HEADER
Definition: ByteCode.h:129
@ LFT_SERVER_LOCAL_TOS
Definition: ByteCode.h:67
@ LFT_EXT_ACL_USER_CA_CERT
Definition: ByteCode.h:245
@ LFT_EXT_ACL_DATA
Definition: ByteCode.h:250
@ LFT_ICAP_REP_ALL_HEADERS
Definition: ByteCode.h:208
@ LFT_USER_IDENT
Definition: ByteCode.h:151
@ LFT_TIME_TO_HANDLE_REQUEST
Definition: ByteCode.h:165
@ LFT_ICAP_REQ_ALL_HEADERS
Definition: ByteCode.h:204
@ LFT_ICAP_REQ_HEADER
Definition: ByteCode.h:202
@ LFT_ICAP_REP_HEADER_ELEM
Definition: ByteCode.h:207
@ LFT_CLIENT_IP_ADDRESS
Definition: ByteCode.h:37
@ LFT_REPLY_OBJECTSIZE
Definition: ByteCode.h:141
@ LFT_ADAPTED_REPLY_SIZE_TOTAL
Definition: ByteCode.h:139
@ LFT_ADAPTATION_SUM_XACT_TIMES
Definition: ByteCode.h:183
@ LFT_CLIENT_PORT
Definition: ByteCode.h:39
@ LFT_SERVER_REQ_URLPORT
Definition: ByteCode.h:104
@ LFT_EXT_ACL_NAME
Definition: ByteCode.h:249
@ LFT_ADAPTED_REPLY_SIZE_HEADERS
Definition: ByteCode.h:142
@ LFT_EXT_ACL_USER_CERT
Definition: ByteCode.h:244
@ LFT_TLS_SERVER_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:231
@ LFT_PROXY_PROTOCOL_RECEIVED_ALL_HEADERS
Definition: ByteCode.h:255
@ LFT_SEQUENCE_NUMBER
Definition: ByteCode.h:180
@ LFT_REPLY_ALL_HEADERS
Definition: ByteCode.h:131
@ LFT_ADAPTED_REQUEST_HEADER_ELEM
Definition: ByteCode.h:96
@ LFT_SERVER_PORT
Definition: ByteCode.h:61
@ LOG_QUOTE_QUOTES
Definition: ByteCode.h:261
@ LFT_ADAPTED_REQUEST_ALL_HEADERS
Definition: ByteCode.h:97
@ LFT_CLIENT_REQ_VERSION
Definition: ByteCode.h:78
@ LOG_QUOTE_MIMEBLOB
Definition: ByteCode.h:262
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER_ELEM
Definition: ByteCode.h:254
@ LFT_CLIENT_REQ_URLDOMAIN
Definition: ByteCode.h:74
@ LFT_CLIENT_LOCAL_NFMARK
Definition: ByteCode.h:47
@ LFT_HTTP_SENT_STATUS_CODE
Definition: ByteCode.h:123
@ LFT_TIME_SECONDS_SINCE_EPOCH
Definition: ByteCode.h:158
@ LFT_REQUEST_HEADER_ELEM
Definition: ByteCode.h:91
@ LFT_SSL_SERVER_CERT_WHOLE
Definition: ByteCode.h:225
@ LFT_REQUEST_VERSION_OLD_2X
Definition: ByteCode.h:85
@ LFT_SERVER_REQ_METHOD
Definition: ByteCode.h:100
@ LFT_CLIENT_IO_SIZE_TOTAL
Definition: ByteCode.h:146
@ LFT_SSL_BUMP_MODE
Definition: ByteCode.h:218
@ LFT_PERCENT
Definition: ByteCode.h:237
@ LFT_CLIENT_REQ_URLPORT
Definition: ByteCode.h:75
@ LFT_REPLY_HEADER_ELEM
Definition: ByteCode.h:130
@ LFT_HTTP_RECEIVED_STATUS_CODE
Definition: ByteCode.h:124
@ LFT_NONE
Definition: ByteCode.h:31
@ LFT_SSL_CLIENT_SNI
Definition: ByteCode.h:221
@ LFT_CLIENT_HANDSHAKE
Definition: ByteCode.h:51
@ LFT_NOTE
Definition: ByteCode.h:236
@ LFT_CREDENTIALS
Definition: ByteCode.h:215
@ LFT_SERVER_REQ_URI
Definition: ByteCode.h:101
@ LFT_ICAP_REQUEST_URI
Definition: ByteCode.h:196
@ LFT_TIME_SUBSECOND
Definition: ByteCode.h:159
@ LFT_SSL_SERVER_CERT_SUBJECT
Definition: ByteCode.h:222
@ LFT_ICAP_ADDR
Definition: ByteCode.h:194
@ LFT_CLIENT_LOCAL_TOS
Definition: ByteCode.h:46
@ LFT_SERVER_FQDN_OR_PEER_NAME
Definition: ByteCode.h:60
@ LFT_LOCAL_LISTENING_PORT
Definition: ByteCode.h:55
@ LFT_EXT_ACL_CLIENT_EUI48
Definition: ByteCode.h:247
@ LFT_ICAP_BYTES_SENT
Definition: ByteCode.h:198
Quoting
Quoting style for a format output.
Definition: ByteCode.h:259
@ LFT_SQUID_HIERARCHY
Definition: ByteCode.h:174

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors