Token.cc
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#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 TokenTableEntry("busy_time", LFT_BUSY_TIME),
71
74
77 /*TokenTableEntry( "ur", LFT_USER_REALM ), */
78 /*TokenTableEntry( "us", LFT_USER_SCHEME ), */
81
85 /*TokenTableEntry( "Ht", LFT_HTTP_STATUS ), */
87
90
92
99 /*TokenTableEntry(">rq", LFT_CLIENT_REQ_QUERY),*/
101
103 TokenTableEntry("ru", LFT_REQUEST_URI), /* doesn't include the query-string */
105 /* TokenTableEntry( "rq", LFT_REQUEST_QUERY ), * / / * the query-string, INCLUDING the leading ? */
108
115 /*TokenTableEntry("<rq", LFT_SERVER_REQ_QUERY),*/
117
120 /*TokenTableEntry( ">sb", LFT_REQUEST_SIZE_BODY ), */
121 /*TokenTableEntry( ">sB", LFT_REQUEST_SIZE_BODY_NO_TE ), */
122
123 TokenTableEntry("<st", LFT_ADAPTED_REPLY_SIZE_TOTAL), // XXX: adapted should be code: <sta
126 TokenTableEntry("<sh", LFT_ADAPTED_REPLY_SIZE_HEADERS ), // XXX: adapted should be code: <sha
127 /*TokenTableEntry( "<sb", LFT_REPLY_SIZE_BODY ), */
128 /*TokenTableEntry( "<sB", LFT_REPLY_SIZE_BODY_NO_TE ), */
129
130 TokenTableEntry("st", LFT_CLIENT_IO_SIZE_TOTAL), // XXX: total from client should be stC ??
131 /*TokenTableEntry("stP", LFT_SERVER_IO_SIZE_TOTAL),*/
132
136
137 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
138};
139
148 TokenTableEntry("err_code", LFT_SQUID_ERROR ),
150 TokenTableEntry("request_attempts", LFT_SQUID_REQUEST_ATTEMPTS),
151 TokenTableEntry("note", LFT_NOTE ),
152 TokenTableEntry("credentials", LFT_CREDENTIALS),
153 TokenTableEntry("master_xaction", LFT_MASTER_XACTION),
154 /*
155 * Legacy external_acl_type format tokens
156 */
160 TokenTableEntry("EXT_LOG", LFT_EXT_LOG),
161 TokenTableEntry("EXT_TAG", LFT_TAG),
174 TokenTableEntry("SRC", LFT_CLIENT_IP_ADDRESS), // keep after longer SRC* tokens
175 TokenTableEntry("TAG", LFT_TAG),
177#if USE_OPENSSL
180#endif
181 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
182};
183
186};
187
190};
191
192#if USE_ADAPTATION
197 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
198};
199#endif
200
201#if ICAP_CLIENT
205 TokenTableEntry("<last_h", LFT_ADAPTATION_LAST_HEADER), // deprecated
206
208 TokenTableEntry("<service_name", LFT_ICAP_SERV_NAME),
214
217
222
223 TokenTableEntry(nullptr, LFT_NONE) /* this must be last */
224};
225#endif
226
227#if USE_OPENSSL
228// TLS/SSL (tls:: or ssl::) tokens
242 TokenTableEntry(">received_hello_version", LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION),
243 TokenTableEntry("<received_hello_version", LFT_TLS_SERVER_RECEIVED_HELLO_VERSION),
244 TokenTableEntry(">received_supported_version", LFT_TLS_CLIENT_SUPPORTED_VERSION),
245 TokenTableEntry("<received_supported_version", LFT_TLS_SERVER_SUPPORTED_VERSION),
246 TokenTableEntry(nullptr, LFT_NONE)
247};
248#endif
249} // namespace Format
250
252void
254{
255 // TODO standard log tokens
256
257#if USE_ADAPTATION
259#endif
260#if ICAP_CLIENT
262#endif
263#if USE_OPENSSL
266#endif
269}
270
273const char *
275{
276 for (TokenTableEntry const *lte = table; lte->configTag != nullptr; ++lte) {
277 debugs(46, 8, "compare tokens '" << lte->configTag << "' with '" << cur << "'");
278 if (strncmp(lte->configTag, cur, strlen(lte->configTag)) == 0) {
279 type = lte->tokenType;
280 label = lte->configTag;
281 debugs(46, 7, "Found token '" << label << "'");
282 return cur + strlen(lte->configTag);
283 }
284 }
285 return cur;
286}
287
288/* parses a single token. Returns the token length in characters,
289 * and fills in the lt item with the token information.
290 * def is for sure null-terminated
291 */
292int
293Format::Token::parse(const char *def, Quoting *quoting)
294{
295 const char *cur = def;
296
297 int l;
298
299 l = strcspn(cur, "%");
300
301 if (l > 0) {
302 char *cp;
303 /* it's a string for sure, until \0 or the next % */
304 cp = (char *)xmalloc(l + 1);
305 xstrncpy(cp, cur, l + 1);
306 type = LFT_STRING;
307 data.string = cp;
308
309 while (l > 0) {
310 switch (*cur) {
311
312 case '"':
313
314 if (*quoting == LOG_QUOTE_NONE)
315 *quoting = LOG_QUOTE_QUOTES;
316 else if (*quoting == LOG_QUOTE_QUOTES)
317 *quoting = LOG_QUOTE_NONE;
318
319 break;
320
321 case '[':
322 if (*quoting == LOG_QUOTE_NONE)
323 *quoting = LOG_QUOTE_MIMEBLOB;
324
325 break;
326
327 case ']':
328 if (*quoting == LOG_QUOTE_MIMEBLOB)
329 *quoting = LOG_QUOTE_NONE;
330
331 break;
332 }
333
334 ++cur;
335 --l;
336 }
337
338 } else if (*cur) {
339
340 ++cur;
341
342 // select quoting style for his particular token
343 switch (*cur) {
344
345 case '"':
347 ++cur;
348 break;
349
350 case '\'':
352 ++cur;
353 break;
354
355 case '[':
357 ++cur;
358 break;
359
360 case '#':
362 ++cur;
363 break;
364
365 case '/':
367 ++cur;
368 break;
369
370 default:
371 quote = *quoting;
372 break;
373 }
374
375 if (*cur == '-') {
376 left = true;
377 ++cur;
378 }
379
380 if (*cur == '0') {
381 zero = true;
382 ++cur;
383 }
384
385 char *endp;
386 if (xisdigit(*cur)) {
387 widthMin = strtol(cur, &endp, 10);
388 cur = endp;
389 }
390
391 if (*cur == '.' && xisdigit(*(++cur))) {
392 widthMax = strtol(cur, &endp, 10);
393 cur = endp;
394 }
395
396 // when {arg} field is before the token (old logformat syntax)
397 if (*cur == '{') {
398 char *cp;
399 ++cur;
400 l = strcspn(cur, "}");
401 cp = (char *)xmalloc(l + 1);
402 xstrncpy(cp, cur, l + 1);
403 data.string = cp;
404 cur += l;
405
406 if (*cur == '}')
407 ++cur;
408 }
409
410 type = LFT_NONE;
411
412 // Scan each registered token namespace
413 debugs(46, 9, "check for token in " << TheConfig.tokens.size() << " namespaces.");
414 for (const auto &itr : TheConfig.tokens) {
415 debugs(46, 7, "check for possible " << itr.prefix << ":: token");
416 const size_t len = itr.prefix.length();
417 if (itr.prefix.cmp(cur, len) == 0 && cur[len] == ':' && cur[len+1] == ':') {
418 debugs(46, 5, "check for " << itr.prefix << ":: token in '" << cur << "'");
419 const char *old = cur;
420 cur = scanForToken(itr.tokenSet, cur+len+2);
421 if (old != cur) // found
422 break;
423 else // reset to start of namespace
424 cur = cur - len - 2;
425 }
426 }
427
428 if (type == LFT_NONE) {
429 // For upward compatibility, assume "http::" prefix as default prefix
430 // for all log access formatting codes, except those starting with a
431 // "%" or a known namespace. (ie "icap::", "adapt::")
432 if (strncmp(cur,"http::", 6) == 0 && *(cur+6) != '%' )
433 cur += 6;
434
435 // NP: scan the sets of tokens in decreasing size to guarantee no
436 // mistakes made with overlapping names. (Bug 3310)
437
438 // Scan for various long tokens
439 debugs(46, 5, "scan for possible Misc token");
440 cur = scanForToken(TokenTableMisc, cur);
441 // scan for 2-char tokens
442 if (type == LFT_NONE) {
443 debugs(46, 5, "scan for possible 2C token");
444 cur = scanForToken(TokenTable2C, cur);
445 }
446 // finally scan for 1-char tokens.
447 if (type == LFT_NONE) {
448 debugs(46, 5, "scan for possible 1C token");
449 cur = scanForToken(TokenTable1C, cur);
450 }
451 }
452
453 if (type == LFT_NONE)
454 throw TexcHere(ToSBuf("Unsupported %code: '", def, "'"));
455
456 // when {arg} field is after the token (old external_acl_type token syntax)
457 // but accept only if there was none before the token
458 if (*cur == '{' && !data.string) {
459 char *cp;
460 ++cur;
461 l = strcspn(cur, "}");
462 cp = (char *)xmalloc(l + 1);
463 xstrncpy(cp, cur, l + 1);
464 data.string = cp;
465 cur += l;
466
467 if (*cur == '}')
468 ++cur;
469 }
470
471 if (*cur == ' ') {
472 space = true;
473 ++cur;
474 }
475 }
476
477 switch (type) {
478
479#if USE_ADAPTATION
481#endif
482
483#if ICAP_CLIENT
485
487#endif
488
490
492
493 case LFT_REPLY_HEADER:
494
495 case LFT_NOTE:
496
498
499 if (data.string) {
500 char *header = data.string;
501 const auto initialType = type;
502
503 const auto pseudoHeader = header[0] == ':';
504 char *cp = strchr(pseudoHeader ? header+1 : header, ':');
505
506 if (cp) {
507 *cp = '\0';
508 ++cp;
509
510 if (*cp == ',' || *cp == ';' || *cp == ':') {
511 data.header.separator = *cp;
512 ++cp;
513 } else {
514 data.header.separator = ',';
515 }
516
517 data.header.element = cp;
518
519 switch (type) {
522 break;
523
526 break;
527
528 case LFT_REPLY_HEADER:
530 break;
531#if USE_ADAPTATION
534 break;
535#endif
536#if ICAP_CLIENT
539 break;
542 break;
543#endif
546 break;
547 default:
548 break;
549 }
550 }
551
552 if (!*header)
553 throw TexcHere(ToSBuf("Can't parse configuration token: '", def, "': missing header name"));
554
555 if (initialType == LFT_PROXY_PROTOCOL_RECEIVED_HEADER)
556 data.headerId = ProxyProtocol::FieldNameToFieldType(SBuf(header));
557 else if (pseudoHeader)
558 throw TexcHere(ToSBuf("Pseudo headers are not supported in this context; got: '", def, "'"));
559
560 data.header.header = header;
561 } else {
562 switch (type) {
565 break;
566
569 break;
570
571 case LFT_REPLY_HEADER:
573 break;
574#if USE_ADAPTATION
577 break;
578#endif
579#if ICAP_CLIENT
582 break;
585 break;
586#endif
589 break;
590 default:
591 break;
592 }
594 }
595
596 break;
597
602#if ICAP_CLIENT
604 case LFT_ICAP_IO_TIME:
606#endif
607 case LFT_TIME_START:
609 divisor = 1000;
610
611 if (widthMax > 0) {
612 divisor = 1000000;
613
614 for (int i = widthMax; i > 0; --i)
615 divisor /= 10;
616
617 if (!divisor)
618 divisor = 1;
619 }
620 break;
621
623 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"Hs\" formatting code is deprecated. Use the \">Hs\" instead.");
625 break;
626
628 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"oa\" formatting code is deprecated. Use the \"<la\" instead.");
629 type = LFT_SERVER_LOCAL_IP;
630 break;
631
633 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"rp\" formatting code is deprecated. Use the \">rp\" instead.");
635 break;
636
638 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \">v\" formatting code is deprecated. Use the \">rv\" instead.");
639 type = LFT_REQUEST_VERSION;
640 break;
641
642#if !USE_SQUID_EUI
643 case LFT_CLIENT_EUI:
644 debugs(46, DBG_CRITICAL, "WARNING: The \">eui\" formatting code requires EUI features which are disabled in this Squid.");
645 break;
646#endif
647
648#if USE_OPENSSL
653 break;
654#endif
655
657 debugs(46, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: The \"rG\" formatting code is deprecated. Use \"note{urlgroup}\" instead.");
658 type = LFT_NOTE;
659 data.header.header = xstrdup("urlgroup");
660 break;
661
662 default:
663 break;
664 }
665
666 return (cur - def);
667}
668
670 label(nullptr),
671 widthMin(-1),
672 widthMax(-1),
674 left(false),
675 space(false),
676 zero(false),
677 divisor(1),
678 next(nullptr)
679{
680 data.string = nullptr;
681 data.header.header = nullptr;
682 data.header.element = nullptr;
683 data.header.separator = ',';
685}
686
688{
689 label = nullptr; // drop reference to global static.
690 safe_free(data.string);
691 while (next) {
692 Token *tokens = next;
693 next = next->next;
694 tokens->next = nullptr;
695 delete tokens;
696 }
697}
698
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:63
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:274
int parse(const char *def, enum Quoting *quote)
Definition: Token.cc:293
static void Init()
Initialize the format token registrations.
Definition: Token.cc:253
struct Format::Token::@64 data
Definition: SBuf.h:94
struct SquidConfig::@106 onoff
int log_mime_hdrs
Definition: SquidConfig.h:286
bool logTlsServerHelloDetails
Definition: SquidConfig.h:341
#define DBG_PARSE_NOTE(x)
Definition: Stream.h:42
#define DBG_IMPORTANT
Definition: Stream.h:38
#define debugs(SECTION, LEVEL, CONTENT)
Definition: Stream.h:194
#define DBG_CRITICAL
Definition: Stream.h:37
const char * quote
Definition: Quoting.cc:17
static TokenTableEntry TokenTableMisc[]
Miscellaneous >2 byte tokens.
Definition: Token.cc:141
@ 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_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_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
static TokenTableEntry TokenTableIcap[]
ICAP (icap::) tokens.
Definition: Token.cc:203
static TokenTableEntry TokenTableTransport[]
Definition: Token.cc:188
FmtConfig TheConfig
Definition: Config.cc:16
static TokenTableEntry TokenTableSsl[]
Definition: Token.cc:229
static TokenTableEntry TokenTable2C[]
2-char tokens
Definition: Token.cc:48
static TokenTableEntry TokenTableAdapt[]
Definition: Token.cc:193
static TokenTableEntry TokenTableProxyProtocol[]
Definition: Token.cc:184
static TokenTableEntry TokenTable1C[]
1-char tokens.
Definition: Token.cc:25
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
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:18
char * xstrncpy(char *dst, const char *src, size_t n)
Definition: xstring.cc:37

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors