#include <Token.h>

Collaboration diagram for Format::Token:

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
 
Tokennext
 

Private Member Functions

const char * scanForToken (TokenTableEntry const table[], const char *cur)
 

Detailed Description

Definition at line 35 of file Token.h.

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 ( )

Definition at line 687 of file Token.cc.

References tok::next, safe_free, and tokens.

Member Function Documentation

◆ Init()

void Format::Token::Init ( )
static

◆ parse()

int Format::Token::parse ( const char *  def,
enum Quoting quote 
)

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()

const char * Format::Token::scanForToken ( TokenTableEntry const  table[],
const char *  cur 
)
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

int Format::Token::divisor

Definition at line 70 of file Token.h.

◆ element

char* Format::Token::element

Definition at line 60 of file Token.h.

◆ header [1/2]

char* Format::Token::header

Definition at line 59 of file Token.h.

◆  [2/2]

struct { ... } Format::Token::header

◆ headerId

ProxyProtocol::Two::FieldType Format::Token::headerId

Definition at line 56 of file Token.h.

◆ label

const char* Format::Token::label

Definition at line 51 of file Token.h.

◆ left

bool Format::Token::left

Definition at line 67 of file Token.h.

◆ next

Token* Format::Token::next

◆ quote

enum Quoting Format::Token::quote

Definition at line 66 of file Token.h.

◆ separator

char Format::Token::separator

Definition at line 61 of file Token.h.

◆ space

bool Format::Token::space

Definition at line 68 of file Token.h.

Referenced by parse_externalAclHelper().

◆ string

char* Format::Token::string

Definition at line 53 of file Token.h.

◆ type

ByteCode_t Format::Token::type

Definition at line 50 of file Token.h.

Referenced by parse_externalAclHelper().

◆ widthMax

int Format::Token::widthMax

Definition at line 65 of file Token.h.

◆ widthMin

int Format::Token::widthMin

Definition at line 64 of file Token.h.

◆ zero

bool Format::Token::zero

Definition at line 69 of file Token.h.


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors