Token.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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#include "squid.h"
10#include "format/Config.h"
11#include "format/Token.h"
13#include "globals.h"
14#include "proxyp/Elements.h"
15#include "sbuf/Stream.h"
16#include "SquidConfig.h"
17#include "Store.h"
18
19// Due to token overlaps between 1 and 2 letter tokens (Bug 3310)
20// We split the token table into sets determined by the token length
21namespace Format
22{
23
26
30
34
39
41
43
44 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
45};
46
49
54 /*TokenTableEntry( "lA", LFT_LOCAL_NAME ), */
55
59
66
70
73
76 /*TokenTableEntry( "ur", LFT_USER_REALM ), */
77 /*TokenTableEntry( "us", LFT_USER_SCHEME ), */
80
84 /*TokenTableEntry( "Ht", LFT_HTTP_STATUS ), */
86
89
91
98 /*TokenTableEntry(">rq", LFT_CLIENT_REQ_QUERY),*/
100
102 TokenTableEntry("ru", LFT_REQUEST_URI), /* doesn't include the query-string */
104 /* TokenTableEntry( "rq", LFT_REQUEST_QUERY ), * / / * the query-string, INCLUDING the leading ? */
107
114 /*TokenTableEntry("<rq", LFT_SERVER_REQ_QUERY),*/
116
119 /*TokenTableEntry( ">sb", LFT_REQUEST_SIZE_BODY ), */
120 /*TokenTableEntry( ">sB", LFT_REQUEST_SIZE_BODY_NO_TE ), */
121
122 TokenTableEntry("<st", LFT_ADAPTED_REPLY_SIZE_TOTAL), // XXX: adapted should be code: <sta
125 TokenTableEntry("<sh", LFT_ADAPTED_REPLY_SIZE_HEADERS ), // XXX: adapted should be code: <sha
126 /*TokenTableEntry( "<sb", LFT_REPLY_SIZE_BODY ), */
127 /*TokenTableEntry( "<sB", LFT_REPLY_SIZE_BODY_NO_TE ), */
128
129 TokenTableEntry("st", LFT_CLIENT_IO_SIZE_TOTAL), // XXX: total from client should be stC ??
130 /*TokenTableEntry("stP", LFT_SERVER_IO_SIZE_TOTAL),*/
131
135
136 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
137};
138
147 TokenTableEntry("err_code", LFT_SQUID_ERROR ),
149 TokenTableEntry("note", LFT_NOTE ),
150 TokenTableEntry("credentials", LFT_CREDENTIALS),
151 TokenTableEntry("master_xaction", LFT_MASTER_XACTION),
152 /*
153 * Legacy external_acl_type format tokens
154 */
158 TokenTableEntry("EXT_LOG", LFT_EXT_LOG),
159 TokenTableEntry("EXT_TAG", LFT_TAG),
172 TokenTableEntry("SRC", LFT_CLIENT_IP_ADDRESS), // keep after longer SRC* tokens
173 TokenTableEntry("TAG", LFT_TAG),
175#if USE_OPENSSL
178#endif
179 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
180};
181
184};
185
188};
189
190#if USE_ADAPTATION
195 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
196};
197#endif
198
199#if ICAP_CLIENT
203 TokenTableEntry("<last_h", LFT_ADAPTATION_LAST_HEADER), // deprecated
204
206 TokenTableEntry("<service_name", LFT_ICAP_SERV_NAME),
212
215
220
221 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
222};
223#endif
224
225#if USE_OPENSSL
226// TLS/SSL (tls:: or ssl::) tokens
240 TokenTableEntry(">received_hello_version", LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION),
241 TokenTableEntry("<received_hello_version", LFT_TLS_SERVER_RECEIVED_HELLO_VERSION),
242 TokenTableEntry(">received_supported_version", LFT_TLS_CLIENT_SUPPORTED_VERSION),
243 TokenTableEntry("<received_supported_version", LFT_TLS_SERVER_SUPPORTED_VERSION),
244 TokenTableEntry(nullptr, LFT_NONE)
245};
246#endif
247} // namespace Format
248
250void
252{
253 // TODO standard log tokens
254
255#if USE_ADAPTATION
257#endif
258#if ICAP_CLIENT
260#endif
261#if USE_OPENSSL
264#endif
267}
268
271const char *
273{
274 for (TokenTableEntry const *lte = table; lte->configTag != nullptr; ++lte) {
275 debugs(46, 8, "compare tokens '" << lte->configTag << "' with '" << cur << "'");
276 if (strncmp(lte->configTag, cur, strlen(lte->configTag)) == 0) {
277 type = lte->tokenType;
278 label = lte->configTag;
279 debugs(46, 7, "Found token '" << label << "'");
280 return cur + strlen(lte->configTag);
281 }
282 }
283 return cur;
284}
285
286/* parses a single token. Returns the token length in characters,
287 * and fills in the lt item with the token information.
288 * def is for sure null-terminated
289 */
290int
291Format::Token::parse(const char *def, Quoting *quoting)
292{
293 const char *cur = def;
294
295 int l;
296
297 l = strcspn(cur, "%");
298
299 if (l > 0) {
300 char *cp;
301 /* it's a string for sure, until \0 or the next % */
302 cp = (char *)xmalloc(l + 1);
303 xstrncpy(cp, cur, l + 1);
305 data.string = cp;
306
307 while (l > 0) {
308 switch (*cur) {
309
310 case '"':
311
312 if (*quoting == LOG_QUOTE_NONE)
313 *quoting = LOG_QUOTE_QUOTES;
314 else if (*quoting == LOG_QUOTE_QUOTES)
315 *quoting = LOG_QUOTE_NONE;
316
317 break;
318
319 case '[':
320 if (*quoting == LOG_QUOTE_NONE)
321 *quoting = LOG_QUOTE_MIMEBLOB;
322
323 break;
324
325 case ']':
326 if (*quoting == LOG_QUOTE_MIMEBLOB)
327 *quoting = LOG_QUOTE_NONE;
328
329 break;
330 }
331
332 ++cur;
333 --l;
334 }
335
336 } else if (*cur) {
337
338 ++cur;
339
340 // select quoting style for his particular token
341 switch (*cur) {
342
343 case '"':
345 ++cur;
346 break;
347
348 case '\'':
350 ++cur;
351 break;
352
353 case '[':
355 ++cur;
356 break;
357
358 case '#':
360 ++cur;
361 break;
362
363 case '/':
365 ++cur;
366 break;
367
368 default:
369 quote = *quoting;
370 break;
371 }
372
373 if (*cur == '-') {
374 left = true;
375 ++cur;
376 }
377
378 if (*cur == '0') {
379 zero = true;
380 ++cur;
381 }
382
383 char *endp;
384 if (xisdigit(*cur)) {
385 widthMin = strtol(cur, &endp, 10);
386 cur = endp;
387 }
388
389 if (*cur == '.' && xisdigit(*(++cur))) {
390 widthMax = strtol(cur, &endp, 10);
391 cur = endp;
392 }
393
394 // when {arg} field is before the token (old logformat syntax)
395 if (*cur == '{') {
396 char *cp;
397 ++cur;
398 l = strcspn(cur, "}");
399 cp = (char *)xmalloc(l + 1);
400 xstrncpy(cp, cur, l + 1);
401 data.string = cp;
402 cur += l;
403
404 if (*cur == '}')
405 ++cur;
406 }
407
408 type = LFT_NONE;
409
410 // Scan each registered token namespace
411 debugs(46, 9, "check for token in " << TheConfig.tokens.size() << " namespaces.");
412 for (const auto &itr : TheConfig.tokens) {
413 debugs(46, 7, "check for possible " << itr.prefix << ":: token");
414 const size_t len = itr.prefix.length();
415 if (itr.prefix.cmp(cur, len) == 0 && cur[len] == ':' && cur[len+1] == ':') {
416 debugs(46, 5, "check for " << itr.prefix << ":: token in '" << cur << "'");
417 const char *old = cur;
418 cur = scanForToken(itr.tokenSet, cur+len+2);
419 if (old != cur) // found
420 break;
421 else // reset to start of namespace
422 cur = cur - len - 2;
423 }
424 }
425
426 if (type == LFT_NONE) {
427 // For upward compatibility, assume "http::" prefix as default prefix
428 // for all log access formatting codes, except those starting with a
429 // "%" or a known namespace. (ie "icap::", "adapt::")
430 if (strncmp(cur,"http::", 6) == 0 && *(cur+6) != '%' )
431 cur += 6;
432
433 // NP: scan the sets of tokens in decreasing size to guarantee no
434 // mistakes made with overlapping names. (Bug 3310)
435
436 // Scan for various long tokens
437 debugs(46, 5, "scan for possible Misc token");
438 cur = scanForToken(TokenTableMisc, cur);
439 // scan for 2-char tokens
440 if (type == LFT_NONE) {
441 debugs(46, 5, "scan for possible 2C token");
442 cur = scanForToken(TokenTable2C, cur);
443 }
444 // finally scan for 1-char tokens.
445 if (type == LFT_NONE) {
446 debugs(46, 5, "scan for possible 1C token");
447 cur = scanForToken(TokenTable1C, cur);
448 }
449 }
450
451 if (type == LFT_NONE)
452 throw TexcHere(ToSBuf("Unsupported %code: '", def, "'"));
453
454 // when {arg} field is after the token (old external_acl_type token syntax)
455 // but accept only if there was none before the token
456 if (*cur == '{' && !data.string) {
457 char *cp;
458 ++cur;
459 l = strcspn(cur, "}");
460 cp = (char *)xmalloc(l + 1);
461 xstrncpy(cp, cur, l + 1);
462 data.string = cp;
463 cur += l;
464
465 if (*cur == '}')
466 ++cur;
467 }
468
469 if (*cur == ' ') {
470 space = true;
471 ++cur;
472 }
473 }
474
475 switch (type) {
476
477#if USE_ADAPTATION
479#endif
480
481#if ICAP_CLIENT
483
485#endif
486
488
490
491 case LFT_REPLY_HEADER:
492
493 case LFT_NOTE:
494
496
497 if (data.string) {
498 char *header = data.string;
499 const auto initialType = type;
500
501 const auto pseudoHeader = header[0] == ':';
502 char *cp = strchr(pseudoHeader ? header+1 : header, ':');
503
504 if (cp) {
505 *cp = '\0';
506 ++cp;
507
508 if (*cp == ',' || *cp == ';' || *cp == ':') {
509 data.header.separator = *cp;
510 ++cp;
511 } else {
512 data.header.separator = ',';
513 }
514
515 data.header.element = cp;
516
517 switch (type) {
520 break;
521
524 break;
525
526 case LFT_REPLY_HEADER:
528 break;
529#if USE_ADAPTATION
532 break;
533#endif
534#if ICAP_CLIENT
537 break;
540 break;
541#endif
544 break;
545 default:
546 break;
547 }
548 }
549
550 if (!*header)
551 throw TexcHere(ToSBuf("Can't parse configuration token: '", def, "': missing header name"));
552
553 if (initialType == LFT_PROXY_PROTOCOL_RECEIVED_HEADER)
554 data.headerId = ProxyProtocol::FieldNameToFieldType(SBuf(header));
555 else if (pseudoHeader)
556 throw TexcHere(ToSBuf("Pseudo headers are not supported in this context; got: '", def, "'"));
557
558 data.header.header = header;
559 } else {
560 switch (type) {
563 break;
564
567 break;
568
569 case LFT_REPLY_HEADER:
571 break;
572#if USE_ADAPTATION
575 break;
576#endif
577#if ICAP_CLIENT
580 break;
583 break;
584#endif
587 break;
588 default:
589 break;
590 }
592 }
593
594 break;
595
600#if ICAP_CLIENT
602 case LFT_ICAP_IO_TIME:
604#endif
605 case LFT_TIME_START:
607 divisor = 1000;
608
609 if (widthMax > 0) {
610 divisor = 1000000;
611
612 for (int i = widthMax; i > 0; --i)
613 divisor /= 10;
614
615 if (!divisor)
616 divisor = 1;
617 }
618 break;
619
621 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"Hs\" formatting code is deprecated. Use the \">Hs\" instead.");
623 break;
624
626 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"oa\" formatting code is deprecated. Use the \"<la\" instead.");
628 break;
629
631 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"rp\" formatting code is deprecated. Use the \">rp\" instead.");
633 break;
634
636 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \">v\" formatting code is deprecated. Use the \">rv\" instead.");
638 break;
639
640#if !USE_SQUID_EUI
641 case LFT_CLIENT_EUI:
642 debugs(46, DBG_CRITICAL, "WARNING: The \">eui\" formatting code requires EUI features which are disabled in this Squid.");
643 break;
644#endif
645
646#if USE_OPENSSL
651 break;
652#endif
653
655 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"rG\" formatting code is deprecated. Use \"note{urlgroup}\" instead.");
656 type = LFT_NOTE;
657 data.header.header = xstrdup("urlgroup");
658 break;
659
660 default:
661 break;
662 }
663
664 return (cur - def);
665}
666
668 label(nullptr),
669 widthMin(-1),
670 widthMax(-1),
672 left(false),
673 space(false),
674 zero(false),
675 divisor(1),
676 next(nullptr)
677{
678 data.string = nullptr;
679 data.header.header = nullptr;
680 data.header.element = nullptr;
681 data.header.separator = ',';
683}
684
686{
687 label = nullptr; // drop reference to global static.
688 safe_free(data.string);
689 while (next) {
690 Token *tokens = next;
691 next = next->next;
692 tokens->next = nullptr;
693 delete tokens;
694 }
695}
696
#define false
Definition: GnuRegex.c:240
int cur
Definition: ModDevPoll.cc:74
class SquidConfig Config
Definition: SquidConfig.cc:12
#define TexcHere(msg)
legacy convenience macro; it is not difficult to type Here() now
Definition: TextException.h:59
std::list< TokenNamespace > tokens
list of token namespaces registered
Definition: Config.h:64
void registerTokens(const SBuf &nsName, TokenTableEntry const *tokenArray)
Definition: Config.cc:48
One entry in a table of format tokens.
const char * scanForToken(TokenTableEntry const table[], const char *cur)
Definition: Token.cc:272
struct Format::Token::@70 data
int parse(const char *def, enum Quoting *quote)
Definition: Token.cc:291
static void Init()
Initialize the format token registrations.
Definition: Token.cc:251
Definition: SBuf.h:94
struct SquidConfig::@111 onoff
int log_mime_hdrs
Definition: SquidConfig.h:284
bool logTlsServerHelloDetails
Definition: SquidConfig.h:339
#define DBG_PARSE_NOTE(x)
Definition: Stream.h:45
#define DBG_IMPORTANT
Definition: Stream.h:41
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:196
#define DBG_CRITICAL
Definition: Stream.h:40
int type
Definition: errorpage.cc:152
const char * quote
Definition: html_quote.c:21
static TokenTableEntry TokenTableMisc[]
Miscellaneous >2 byte tokens.
Definition: Token.cc:140
@ LFT_REPLY_HEADER
Definition: ByteCode.h:129
@ LFT_ICAP_REP_ALL_HEADERS
Definition: ByteCode.h:208
@ LFT_REQUEST_VERSION_OLD_2X
Definition: ByteCode.h:85
@ LFT_TLS_SERVER_NEGOTIATED_VERSION
Definition: ByteCode.h:227
@ 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_ICAP_REQUEST_URI
Definition: ByteCode.h:196
@ LFT_SSL_SERVER_CERT_ERRORS
Definition: ByteCode.h:224
@ 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:176
@ LFT_SSL_BUMP_MODE
Definition: ByteCode.h:218
@ LFT_TLS_SERVER_NEGOTIATED_CIPHER
Definition: ByteCode.h:229
@ LFT_SERVER_LOCAL_TOS
Definition: ByteCode.h:67
@ LFT_EXT_ACL_CLIENT_EUI48
Definition: ByteCode.h:247
@ LFT_USER_LOGIN
Definition: ByteCode.h:150
@ LFT_PERCENT
Definition: ByteCode.h:237
@ LFT_REQUEST_VERSION
Definition: ByteCode.h:86
@ LFT_ICAP_TR_RESPONSE_TIME
Definition: ByteCode.h:210
@ 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:204
@ 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:242
@ LFT_REQUEST_ALL_HEADERS
Definition: ByteCode.h:92
@ LFT_SSL_SERVER_CERT_SUBJECT
Definition: ByteCode.h:222
@ LFT_ADAPTED_REQUEST_ALL_HEADERS
Definition: ByteCode.h:97
@ LFT_ICAP_ADDR
Definition: ByteCode.h:194
@ 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:192
@ LFT_SERVER_PORT
Definition: ByteCode.h:61
@ LFT_REQUEST_HEADER
Definition: ByteCode.h:90
@ LFT_ICAP_REQ_HEADER
Definition: ByteCode.h:202
@ LFT_EXT_ACL_DATA
Definition: ByteCode.h:250
@ LFT_TIME_START
Definition: ByteCode.h:162
@ LFT_SQUID_HIERARCHY
Definition: ByteCode.h:174
@ LFT_ICAP_BYTES_READ
Definition: ByteCode.h:199
@ LFT_SERVER_REQ_URLSCHEME
Definition: ByteCode.h:102
@ LFT_SSL_SERVER_CERT_ISSUER
Definition: ByteCode.h:223
@ LFT_CLIENT_REQ_URLPATH
Definition: ByteCode.h:76
@ LFT_SEQUENCE_NUMBER
Definition: ByteCode.h:180
@ LFT_PROXY_PROTOCOL_RECEIVED_ALL_HEADERS
Definition: ByteCode.h:255
@ LFT_TLS_SERVER_SUPPORTED_VERSION
Definition: ByteCode.h:233
@ LFT_SQUID_ERROR_DETAIL
Definition: ByteCode.h:173
@ LFT_HTTP_BODY_BYTES_READ
Definition: ByteCode.h:126
@ LFT_USER_IDENT
Definition: ByteCode.h:151
@ LFT_EXT_ACL_CLIENT_EUI64
Definition: ByteCode.h:248
@ LFT_CLIENT_LOCAL_TOS
Definition: ByteCode.h:46
@ LFT_TLS_CLIENT_NEGOTIATED_CIPHER
Definition: ByteCode.h:228
@ LFT_TIME_SECONDS_SINCE_EPOCH
Definition: ByteCode.h:158
@ LFT_TIME_SUBSECOND
Definition: ByteCode.h:159
@ LFT_NOTE
Definition: ByteCode.h:236
@ LFT_ADAPTATION_SUM_XACT_TIMES
Definition: ByteCode.h:183
@ 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:211
@ LFT_REPLY_OBJECTSIZE
Definition: ByteCode.h:141
@ LFT_HTTP_SENT_STATUS_CODE
Definition: ByteCode.h:123
@ LFT_TAG
Definition: ByteCode.h:177
@ 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:219
@ LFT_ADAPTATION_LAST_HEADER
Definition: ByteCode.h:185
@ LFT_EXT_LOG
Definition: ByteCode.h:178
@ 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:253
@ LFT_SQUID_ERROR
Definition: ByteCode.h:172
@ LFT_ADAPTATION_LAST_ALL_HEADERS
Definition: ByteCode.h:187
@ LFT_SSL_USER_CERT_ISSUER
Definition: ByteCode.h:220
@ LFT_TLS_CLIENT_NEGOTIATED_VERSION
Definition: ByteCode.h:226
@ LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:230
@ LFT_ICAP_REP_HEADER_ELEM
Definition: ByteCode.h:207
@ LFT_EXT_ACL_NAME
Definition: ByteCode.h:249
@ 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:186
@ LFT_ADAPTATION_ALL_XACT_TIMES
Definition: ByteCode.h:184
@ LFT_CREDENTIALS
Definition: ByteCode.h:215
@ LFT_REQUEST_URLPATH_OLD_31
Definition: ByteCode.h:83
@ LFT_CLIENT_EUI
Definition: ByteCode.h:40
@ LFT_ICAP_REP_HEADER
Definition: ByteCode.h:206
@ LFT_USER_EXTERNAL
Definition: ByteCode.h:154
@ LFT_SERVER_REQ_URLPATH
Definition: ByteCode.h:105
@ LFT_TLS_CLIENT_SUPPORTED_VERSION
Definition: ByteCode.h:232
@ 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:195
@ LFT_CLIENT_LOCAL_IP
Definition: ByteCode.h:43
@ LFT_SSL_SERVER_CERT_WHOLE
Definition: ByteCode.h:225
@ LFT_PROXY_PROTOCOL_RECEIVED_HEADER_ELEM
Definition: ByteCode.h:254
@ LFT_TIME_LOCALTIME
Definition: ByteCode.h:160
@ LFT_ICAP_BYTES_SENT
Definition: ByteCode.h:198
@ LFT_ICAP_OUTCOME
Definition: ByteCode.h:212
@ LFT_CLIENT_REQ_URI
Definition: ByteCode.h:72
@ LFT_ICAP_STATUS_CODE
Definition: ByteCode.h:213
@ LFT_SERVER_REQ_VERSION
Definition: ByteCode.h:107
@ LFT_ICAP_REQUEST_METHOD
Definition: ByteCode.h:197
@ LFT_HTTP_RECEIVED_STATUS_CODE
Definition: ByteCode.h:124
@ LFT_SQUID_STATUS
Definition: ByteCode.h:171
@ LFT_ICAP_REQ_HEADER_ELEM
Definition: ByteCode.h:203
@ LFT_SSL_CLIENT_SNI
Definition: ByteCode.h:221
@ LFT_TLS_SERVER_RECEIVED_HELLO_VERSION
Definition: ByteCode.h:231
@ LFT_MASTER_XACTION
Definition: ByteCode.h:238
@ LFT_EXT_ACL_USER_CERTCHAIN_RAW
Definition: ByteCode.h:243
@ LFT_SERVER_REQ_METHOD
Definition: ByteCode.h:100
@ LFT_ICAP_BODY_BYTES_READ
Definition: ByteCode.h:200
@ LFT_REQUEST_URLGROUP_OLD_2X
Definition: ByteCode.h:87
static TokenTableEntry TokenTableIcap[]
ICAP (icap::) tokens.
Definition: Token.cc:201
static TokenTableEntry TokenTableTransport[]
Definition: Token.cc:186
FmtConfig TheConfig
Definition: Config.cc:16
static TokenTableEntry TokenTableSsl[]
Definition: Token.cc:227
static TokenTableEntry TokenTable2C[]
2-char tokens
Definition: Token.cc:48
static TokenTableEntry TokenTableAdapt[]
Definition: Token.cc:191
static TokenTableEntry TokenTableProxyProtocol[]
Definition: Token.cc:182
static TokenTableEntry TokenTable1C[]
1-char tokens.
Definition: Token.cc:25
Quoting
Quoting style for a format output.
Definition: ByteCode.h:259
@ LOG_QUOTE_MIMEBLOB
Definition: ByteCode.h:262
@ LOG_QUOTE_URL
Definition: ByteCode.h:263
@ LOG_QUOTE_RAW
Definition: ByteCode.h:265
@ LOG_QUOTE_SHELL
Definition: ByteCode.h:264
@ LOG_QUOTE_NONE
Definition: ByteCode.h:260
@ LOG_QUOTE_QUOTES
Definition: ByteCode.h:261
Two::FieldType FieldNameToFieldType(const SBuf &nameOrId)
Definition: Elements.cc:102
#define xstrdup
#define xmalloc
struct tok tokens[]
Definition: parse.c:168
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
struct tok * next
Definition: parse.c:165
#define safe_free(x)
Definition: xalloc.h:73
#define xisdigit(x)
Definition: xis.h:20
char * xstrncpy(char *dst, const char *src, size_t n)
Definition: xstring.cc:37

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors