#include <Token.h>
Public Member Functions | |
Token () | |
~Token () | |
int | parse (const char *def, enum Quoting *quote) |
Static Public Member Functions | |
static void | Init () |
Initialize the format token registrations. More... | |
Public Attributes | |
ByteCode_t | type |
const char * | label |
struct { | |
char * string | |
ProxyProtocol::Two::FieldType headerId | |
the cached ID of the parsed header or zero More... | |
struct { | |
char * header | |
char * element | |
char separator | |
} header | |
} | data |
int | widthMin |
minimum field width More... | |
int | widthMax |
maximum field width More... | |
enum Quoting | quote |
bool | left |
bool | space |
bool | zero |
int | divisor |
Token * | next |
Private Member Functions | |
const char * | scanForToken (TokenTableEntry const table[], const char *cur) |
Detailed Description
Constructor & Destructor Documentation
◆ Token()
Format::Token::Token | ( | ) |
Definition at line 669 of file Token.cc.
References data, ProxyProtocol::Two::htUnknown, and zero.
◆ ~Token()
Format::Token::~Token | ( | ) |
Member Function Documentation
◆ Init()
|
static |
Register all components custom format tokens.
Definition at line 253 of file Token.cc.
References Format::FmtConfig::registerTokens(), Format::TheConfig, Format::TokenTableAdapt, Format::TokenTableIcap, Format::TokenTableProxyProtocol, Format::TokenTableSsl, and Format::TokenTableTransport.
Referenced by SquidMain().
◆ parse()
parses a single token. Returns the token length in characters, and fills in this item with the token information. def is for sure null-terminated.
Definition at line 293 of file Token.cc.
References Config, cur, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, ProxyProtocol::FieldNameToFieldType(), Format::LFT_ADAPTATION_LAST_ALL_HEADERS, Format::LFT_ADAPTATION_LAST_HEADER, Format::LFT_ADAPTATION_LAST_HEADER_ELEM, Format::LFT_ADAPTED_REQUEST_ALL_HEADERS, Format::LFT_ADAPTED_REQUEST_HEADER, Format::LFT_ADAPTED_REQUEST_HEADER_ELEM, Format::LFT_CLIENT_EUI, Format::LFT_CLIENT_REQ_URLPATH, Format::LFT_DNS_WAIT_TIME, Format::LFT_HTTP_SENT_STATUS_CODE, Format::LFT_HTTP_SENT_STATUS_CODE_OLD_30, Format::LFT_ICAP_IO_TIME, Format::LFT_ICAP_REP_ALL_HEADERS, Format::LFT_ICAP_REP_HEADER, Format::LFT_ICAP_REP_HEADER_ELEM, Format::LFT_ICAP_REQ_ALL_HEADERS, Format::LFT_ICAP_REQ_HEADER, Format::LFT_ICAP_REQ_HEADER_ELEM, Format::LFT_ICAP_TOTAL_TIME, Format::LFT_ICAP_TR_RESPONSE_TIME, Format::LFT_NONE, Format::LFT_NOTE, Format::LFT_PEER_RESPONSE_TIME, Format::LFT_PROXY_PROTOCOL_RECEIVED_ALL_HEADERS, Format::LFT_PROXY_PROTOCOL_RECEIVED_HEADER, Format::LFT_PROXY_PROTOCOL_RECEIVED_HEADER_ELEM, Format::LFT_REPLY_ALL_HEADERS, Format::LFT_REPLY_HEADER, Format::LFT_REPLY_HEADER_ELEM, Format::LFT_REQUEST_ALL_HEADERS, Format::LFT_REQUEST_HEADER, Format::LFT_REQUEST_HEADER_ELEM, Format::LFT_REQUEST_URLGROUP_OLD_2X, Format::LFT_REQUEST_URLPATH_OLD_31, Format::LFT_REQUEST_VERSION, Format::LFT_REQUEST_VERSION_OLD_2X, Format::LFT_SERVER_LOCAL_IP, Format::LFT_SERVER_LOCAL_IP_OLD_27, Format::LFT_STRING, Format::LFT_TIME_START, Format::LFT_TIME_SUBSECOND, Format::LFT_TIME_TO_HANDLE_REQUEST, Format::LFT_TLS_SERVER_NEGOTIATED_VERSION, Format::LFT_TLS_SERVER_RECEIVED_HELLO_VERSION, Format::LFT_TLS_SERVER_SUPPORTED_VERSION, Format::LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME, SquidConfig::log_mime_hdrs, Format::LOG_QUOTE_MIMEBLOB, Format::LOG_QUOTE_NONE, Format::LOG_QUOTE_QUOTES, Format::LOG_QUOTE_RAW, Format::LOG_QUOTE_SHELL, Format::LOG_QUOTE_URL, SquidConfig::logTlsServerHelloDetails, SquidConfig::onoff, quote, TexcHere, Format::TheConfig, Format::FmtConfig::tokens, Format::TokenTable1C, Format::TokenTable2C, Format::TokenTableMisc, ToSBuf(), xisdigit, xmalloc, xstrdup, xstrncpy(), and zero.
Referenced by Format::AssembleOne(), and Format::Format::parse().
◆ scanForToken()
|
private |
Scans a token table to see if the next token exists there returns a pointer to next unparsed byte and updates type member if found
Definition at line 274 of file Token.cc.
References Format::TokenTableEntry::configTag, cur, and debugs.
Member Data Documentation
◆
struct { ... } Format::Token::data |
Referenced by Token().
◆ divisor
◆ element
◆ header [1/2]
◆ [2/2]
struct { ... } Format::Token::header |
◆ headerId
ProxyProtocol::Two::FieldType Format::Token::headerId |
◆ label
◆ left
◆ next
Token* Format::Token::next |
Definition at line 71 of file Token.h.
Referenced by accessLogInit(), Format::Format::assemble(), Format::Format::dump(), makeExternalAclKey(), and Format::Format::parse().
◆ quote
◆ separator
◆ space
bool Format::Token::space |
Definition at line 68 of file Token.h.
Referenced by parse_externalAclHelper().
◆ string
◆ type
ByteCode_t Format::Token::type |
Definition at line 50 of file Token.h.
Referenced by parse_externalAclHelper().
◆ widthMax
◆ widthMin
◆ zero
The documentation for this class was generated from the following files: