1 #ifndef _SQUID_FMT_BYTECODE_H
2 #define _SQUID_FMT_BYTECODE_H
5 * Squid configuration allows users to define custom formats in
11 * These enumerations and classes define the API for parsing of
12 * format directives to define these patterns. Along with output
13 * functionality to produce formatted buffers.
20 * Bytecodes for the configureable format stuff
25 /* arbitrary string between tokens */
28 /* client TCP connection remote end details */
29 LFT_CLIENT_IP_ADDRESS
,
34 /* client TCP connection local end details */
36 LFT_CLIENT_LOCAL_PORT
,
37 /*LFT_CLIENT_LOCAL_FQDN, (rDNS) */
39 LFT_CLIENT_LOCAL_NFMARK
,
41 /* client connection local squid.conf details */
42 LFT_LOCAL_LISTENING_IP
,
43 LFT_LOCAL_LISTENING_PORT
,
44 /*LFT_LOCAL_LISTENING_NAME, (myportname) */
46 /* server TCP connection remote end details */
47 LFT_SERVER_IP_ADDRESS
,
48 LFT_SERVER_FQDN_OR_PEER_NAME
,
51 /* server TCP connection local end details */
53 LFT_SERVER_LOCAL_IP_OLD_27
,
54 LFT_SERVER_LOCAL_PORT
,
56 LFT_SERVER_LOCAL_NFMARK
,
58 /* original Request-Line details recieved from client */
59 LFT_CLIENT_REQ_METHOD
,
61 LFT_CLIENT_REQ_URLSCHEME
,
62 LFT_CLIENT_REQ_URLDOMAIN
,
63 LFT_CLIENT_REQ_URLPORT
,
64 LFT_CLIENT_REQ_URLPATH
,
65 /* LFT_CLIENT_REQ_QUERY, */
66 LFT_CLIENT_REQ_VERSION
,
68 /* Request-Line details recieved from client (legacy, filtered) */
71 LFT_REQUEST_URLPATH_OLD_31
,
72 /*LFT_REQUEST_QUERY, */
73 LFT_REQUEST_VERSION_OLD_2X
,
75 LFT_REQUEST_URLGROUP_OLD_2X
,
77 /* request header details pre-adaptation */
79 LFT_REQUEST_HEADER_ELEM
,
80 LFT_REQUEST_ALL_HEADERS
,
82 /* request header details post-adaptation */
83 LFT_ADAPTED_REQUEST_HEADER
,
84 LFT_ADAPTED_REQUEST_HEADER_ELEM
,
85 LFT_ADAPTED_REQUEST_ALL_HEADERS
,
87 /* Request-Line details sent to the server/peer */
88 LFT_SERVER_REQ_METHOD
,
90 LFT_SERVER_REQ_URLSCHEME
,
91 LFT_SERVER_REQ_URLDOMAIN
,
92 LFT_SERVER_REQ_URLPORT
,
93 LFT_SERVER_REQ_URLPATH
,
94 /*LFT_SERVER_REQ_QUERY, */
95 LFT_SERVER_REQ_VERSION
,
97 /* request meta details */
98 LFT_CLIENT_REQUEST_SIZE_TOTAL
,
99 LFT_CLIENT_REQUEST_SIZE_HEADERS
,
100 /*LFT_REQUEST_SIZE_BODY, */
101 /*LFT_REQUEST_SIZE_BODY_NO_TE, */
103 /* original Status-Line details recieved from server */
106 /* Status-Line details sent to the client */
109 /* response Status-Line details (legacy, filtered) */
110 LFT_HTTP_SENT_STATUS_CODE_OLD_30
,
111 LFT_HTTP_SENT_STATUS_CODE
,
112 LFT_HTTP_RECEIVED_STATUS_CODE
,
113 /*LFT_HTTP_STATUS, */
114 LFT_HTTP_BODY_BYTES_READ
,
116 /* response header details pre-adaptation */
118 LFT_REPLY_HEADER_ELEM
,
119 LFT_REPLY_ALL_HEADERS
,
121 /* response header details post-adaptation */
122 /* LFT_ADAPTED_REPLY_HEADER, */
123 /* LFT_ADAPTED_REPLY_HEADER_ELEM, */
124 /* LFT_ADAPTED_REPLY_ALL_HEADERS, */
126 /* response meta details */
127 LFT_ADAPTED_REPLY_SIZE_TOTAL
,
128 LFT_REPLY_HIGHOFFSET
,
129 LFT_REPLY_OBJECTSIZE
,
130 LFT_ADAPTED_REPLY_SIZE_HEADERS
,
131 /*LFT_REPLY_SIZE_BODY, */
132 /*LFT_REPLY_SIZE_BODY_NO_TE, */
134 LFT_CLIENT_IO_SIZE_TOTAL
,
136 /* client credentials */
137 LFT_USER_NAME
, /* any source will do */
141 /*LFT_USER_SCHEME, */
143 /* LFT_USER_SSL_CERT, */
145 /* global time details */
146 LFT_TIME_SECONDS_SINCE_EPOCH
,
150 LFT_TIME_START
, // the time the master transaction started
152 /* processing time details */
153 LFT_TIME_TO_HANDLE_REQUEST
,
154 LFT_PEER_RESPONSE_TIME
,
155 LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME
,
158 /* Squid internal processing details */
161 LFT_SQUID_ERROR_DETAIL
,
171 LFT_ADAPTATION_SUM_XACT_TIMES
,
172 LFT_ADAPTATION_ALL_XACT_TIMES
,
173 LFT_ADAPTATION_LAST_HEADER
,
174 LFT_ADAPTATION_LAST_HEADER_ELEM
,
175 LFT_ADAPTATION_LAST_ALL_HEADERS
,
184 LFT_ICAP_REQUEST_URI
,
185 LFT_ICAP_REQUEST_METHOD
,
188 LFT_ICAP_BODY_BYTES_READ
,
191 LFT_ICAP_REQ_HEADER_ELEM
,
192 LFT_ICAP_REQ_ALL_HEADERS
,
195 LFT_ICAP_REP_HEADER_ELEM
,
196 LFT_ICAP_REP_ALL_HEADERS
,
198 LFT_ICAP_TR_RESPONSE_TIME
,
201 LFT_ICAP_STATUS_CODE
,
207 LFT_SSL_USER_CERT_SUBJECT
,
208 LFT_SSL_USER_CERT_ISSUER
,
212 LFT_PERCENT
, /* special string cases for escaped chars */
214 // TODO assign better bytecode names and Token strings for these
215 LFT_EXT_ACL_USER_CERT_RAW
,
216 LFT_EXT_ACL_USER_CERTCHAIN_RAW
,
217 LFT_EXT_ACL_USER_CERT
,
218 LFT_EXT_ACL_USER_CA_CERT
,
219 LFT_EXT_ACL_CLIENT_EUI48
,
220 LFT_EXT_ACL_CLIENT_EUI64
,
226 /// Quoting style for a format output.
235 } // namespace Format
237 #endif /* _SQUID_FMT_BYTECODE_H */