#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
 
   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 34 of file Token.h.

Constructor & Destructor Documentation

Format::Token::Token ( )

Definition at line 638 of file Token.cc.

References data, NULL, and zero.

Format::Token::~Token ( )

Definition at line 655 of file Token.cc.

References data, next, tok::next, NULL, safe_free, and tokens.

Member Function Documentation

void Format::Token::Init ( )
static

Register all components custom format tokens.

Definition at line 238 of file Token.cc.

References Format::FmtConfig::registerTokens(), Format::TheConfig, Format::TokenTableAdapt, Format::TokenTableIcap, and Format::TokenTableSsl.

Referenced by SquidMain().

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 276 of file Token.cc.

References Config, cur, data, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, fatalf(), HERE(), i, len, 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_FQDN, 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_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_fqdn, 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, Format::TheConfig, Format::FmtConfig::tokens, Format::TokenTable1C, Format::TokenTable2C, Format::TokenTableMisc, type, xisdigit, xmalloc, xstrdup, xstrncpy(), and zero.

Referenced by Format::Format::parse().

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 257 of file Token.cc.

References Format::TokenTableEntry::configTag, cur, debugs, HERE(), NULL, and type.

Member Data Documentation

struct { ... } Format::Token::data

Referenced by Token().

int Format::Token::divisor

Definition at line 66 of file Token.h.

char* Format::Token::element

Definition at line 56 of file Token.h.

char* Format::Token::header

Definition at line 55 of file Token.h.

struct { ... } Format::Token::header
const char* Format::Token::label

Definition at line 50 of file Token.h.

bool Format::Token::left

Definition at line 63 of file Token.h.

enum Quoting Format::Token::quote

Definition at line 62 of file Token.h.

char Format::Token::separator

Definition at line 57 of file Token.h.

bool Format::Token::space

Definition at line 64 of file Token.h.

Referenced by parse_externalAclHelper().

char* Format::Token::string

Definition at line 52 of file Token.h.

ByteCode_t Format::Token::type

Definition at line 49 of file Token.h.

Referenced by parse_externalAclHelper().

int Format::Token::widthMax

Definition at line 61 of file Token.h.

int Format::Token::widthMin

Definition at line 60 of file Token.h.

bool Format::Token::zero

Definition at line 65 of file Token.h.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors