Format Namespace Reference

Classes

class  TokenNamespace
 
class  FmtConfig
 
class  Format
 
class  Token
 
class  TokenTableEntry
 One entry in a table of format tokens. More...
 

Enumerations

enum  ByteCode_t {
  LFT_NONE,
  LFT_STRING,
  LFT_CLIENT_IP_ADDRESS,
  LFT_CLIENT_FQDN,
  LFT_CLIENT_PORT,
  LFT_CLIENT_EUI,
  LFT_CLIENT_LOCAL_IP,
  LFT_CLIENT_LOCAL_PORT,
  LFT_CLIENT_LOCAL_TOS,
  LFT_CLIENT_LOCAL_NFMARK,
  LFT_LOCAL_LISTENING_IP,
  LFT_LOCAL_LISTENING_PORT,
  LFT_SERVER_IP_ADDRESS,
  LFT_SERVER_FQDN_OR_PEER_NAME,
  LFT_SERVER_PORT,
  LFT_SERVER_LOCAL_IP,
  LFT_SERVER_LOCAL_IP_OLD_27,
  LFT_SERVER_LOCAL_PORT,
  LFT_SERVER_LOCAL_TOS,
  LFT_SERVER_LOCAL_NFMARK,
  LFT_CLIENT_REQ_METHOD,
  LFT_CLIENT_REQ_URI,
  LFT_CLIENT_REQ_URLSCHEME,
  LFT_CLIENT_REQ_URLDOMAIN,
  LFT_CLIENT_REQ_URLPORT,
  LFT_CLIENT_REQ_URLPATH,
  LFT_CLIENT_REQ_VERSION,
  LFT_REQUEST_METHOD,
  LFT_REQUEST_URI,
  LFT_REQUEST_URLPATH_OLD_31,
  LFT_REQUEST_VERSION_OLD_2X,
  LFT_REQUEST_VERSION,
  LFT_REQUEST_URLGROUP_OLD_2X,
  LFT_REQUEST_HEADER,
  LFT_REQUEST_HEADER_ELEM,
  LFT_REQUEST_ALL_HEADERS,
  LFT_ADAPTED_REQUEST_HEADER,
  LFT_ADAPTED_REQUEST_HEADER_ELEM,
  LFT_ADAPTED_REQUEST_ALL_HEADERS,
  LFT_SERVER_REQ_METHOD,
  LFT_SERVER_REQ_URI,
  LFT_SERVER_REQ_URLSCHEME,
  LFT_SERVER_REQ_URLDOMAIN,
  LFT_SERVER_REQ_URLPORT,
  LFT_SERVER_REQ_URLPATH,
  LFT_SERVER_REQ_VERSION,
  LFT_CLIENT_REQUEST_SIZE_TOTAL,
  LFT_CLIENT_REQUEST_SIZE_HEADERS,
  LFT_HTTP_SENT_STATUS_CODE_OLD_30,
  LFT_HTTP_SENT_STATUS_CODE,
  LFT_HTTP_RECEIVED_STATUS_CODE,
  LFT_HTTP_BODY_BYTES_READ,
  LFT_REPLY_HEADER,
  LFT_REPLY_HEADER_ELEM,
  LFT_REPLY_ALL_HEADERS,
  LFT_ADAPTED_REPLY_SIZE_TOTAL,
  LFT_REPLY_HIGHOFFSET,
  LFT_REPLY_OBJECTSIZE,
  LFT_ADAPTED_REPLY_SIZE_HEADERS,
  LFT_CLIENT_IO_SIZE_TOTAL,
  LFT_USER_NAME,
  LFT_USER_LOGIN,
  LFT_USER_IDENT,
  LFT_USER_EXTERNAL,
  LFT_TIME_SECONDS_SINCE_EPOCH,
  LFT_TIME_SUBSECOND,
  LFT_TIME_LOCALTIME,
  LFT_TIME_GMT,
  LFT_TIME_START,
  LFT_TIME_TO_HANDLE_REQUEST,
  LFT_PEER_RESPONSE_TIME,
  LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME,
  LFT_DNS_WAIT_TIME,
  LFT_SQUID_STATUS,
  LFT_SQUID_ERROR,
  LFT_SQUID_ERROR_DETAIL,
  LFT_SQUID_HIERARCHY,
  LFT_MIME_TYPE,
  LFT_TAG,
  LFT_EXT_LOG,
  LFT_SEQUENCE_NUMBER,
  LFT_ADAPTATION_SUM_XACT_TIMES,
  LFT_ADAPTATION_ALL_XACT_TIMES,
  LFT_ADAPTATION_LAST_HEADER,
  LFT_ADAPTATION_LAST_HEADER_ELEM,
  LFT_ADAPTATION_LAST_ALL_HEADERS,
  LFT_ICAP_TOTAL_TIME,
  LFT_ICAP_ADDR,
  LFT_ICAP_SERV_NAME,
  LFT_ICAP_REQUEST_URI,
  LFT_ICAP_REQUEST_METHOD,
  LFT_ICAP_BYTES_SENT,
  LFT_ICAP_BYTES_READ,
  LFT_ICAP_BODY_BYTES_READ,
  LFT_ICAP_REQ_HEADER,
  LFT_ICAP_REQ_HEADER_ELEM,
  LFT_ICAP_REQ_ALL_HEADERS,
  LFT_ICAP_REP_HEADER,
  LFT_ICAP_REP_HEADER_ELEM,
  LFT_ICAP_REP_ALL_HEADERS,
  LFT_ICAP_TR_RESPONSE_TIME,
  LFT_ICAP_IO_TIME,
  LFT_ICAP_OUTCOME,
  LFT_ICAP_STATUS_CODE,
  LFT_CREDENTIALS,
  LFT_SSL_BUMP_MODE,
  LFT_SSL_USER_CERT_SUBJECT,
  LFT_SSL_USER_CERT_ISSUER,
  LFT_SSL_CLIENT_SNI,
  LFT_SSL_SERVER_CERT_SUBJECT,
  LFT_SSL_SERVER_CERT_ISSUER,
  LFT_SSL_SERVER_CERT_ERRORS,
  LFT_TLS_CLIENT_NEGOTIATED_VERSION,
  LFT_TLS_SERVER_NEGOTIATED_VERSION,
  LFT_TLS_CLIENT_NEGOTIATED_CIPHER,
  LFT_TLS_SERVER_NEGOTIATED_CIPHER,
  LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION,
  LFT_TLS_SERVER_RECEIVED_HELLO_VERSION,
  LFT_TLS_CLIENT_SUPPORTED_VERSION,
  LFT_TLS_SERVER_SUPPORTED_VERSION,
  LFT_NOTE,
  LFT_PERCENT,
  LFT_EXT_ACL_USER_CERT_RAW,
  LFT_EXT_ACL_USER_CERTCHAIN_RAW,
  LFT_EXT_ACL_USER_CERT,
  LFT_EXT_ACL_USER_CA_CERT,
  LFT_EXT_ACL_CLIENT_EUI48,
  LFT_EXT_ACL_CLIENT_EUI64,
  LFT_EXT_ACL_NAME,
  LFT_EXT_ACL_DATA
}
 
enum  Quoting {
  LOG_QUOTE_NONE = 0,
  LOG_QUOTE_QUOTES,
  LOG_QUOTE_MIMEBLOB,
  LOG_QUOTE_URL,
  LOG_QUOTE_SHELL,
  LOG_QUOTE_RAW
}
 Quoting style for a format output. More...
 

Functions

char * QuoteUrlEncodeUsername (const char *name)
 
char * QuoteMimeBlob (const char *header)
 

Variables

FmtConfig TheConfig
 
const SBuf Dash
 
static TokenTableEntry TokenTable1C []
 1-char tokens. More...
 
static TokenTableEntry TokenTable2C []
 2-char tokens More...
 
static TokenTableEntry TokenTableMisc []
 Miscellaneous >2 byte tokens. More...
 
static TokenTableEntry TokenTableAdapt []
 
static TokenTableEntry TokenTableIcap []
 ICAP (icap::) tokens. More...
 
static TokenTableEntry TokenTableSsl []
 

Enumeration Type Documentation

Enumerator
LFT_NONE 
LFT_STRING 
LFT_CLIENT_IP_ADDRESS 
LFT_CLIENT_FQDN 
LFT_CLIENT_PORT 
LFT_CLIENT_EUI 
LFT_CLIENT_LOCAL_IP 
LFT_CLIENT_LOCAL_PORT 
LFT_CLIENT_LOCAL_TOS 
LFT_CLIENT_LOCAL_NFMARK 
LFT_LOCAL_LISTENING_IP 
LFT_LOCAL_LISTENING_PORT 
LFT_SERVER_IP_ADDRESS 
LFT_SERVER_FQDN_OR_PEER_NAME 
LFT_SERVER_PORT 
LFT_SERVER_LOCAL_IP 
LFT_SERVER_LOCAL_IP_OLD_27 
LFT_SERVER_LOCAL_PORT 
LFT_SERVER_LOCAL_TOS 
LFT_SERVER_LOCAL_NFMARK 
LFT_CLIENT_REQ_METHOD 
LFT_CLIENT_REQ_URI 
LFT_CLIENT_REQ_URLSCHEME 
LFT_CLIENT_REQ_URLDOMAIN 
LFT_CLIENT_REQ_URLPORT 
LFT_CLIENT_REQ_URLPATH 
LFT_CLIENT_REQ_VERSION 
LFT_REQUEST_METHOD 
LFT_REQUEST_URI 
LFT_REQUEST_URLPATH_OLD_31 
LFT_REQUEST_VERSION_OLD_2X 
LFT_REQUEST_VERSION 
LFT_REQUEST_URLGROUP_OLD_2X 
LFT_REQUEST_HEADER 
LFT_REQUEST_HEADER_ELEM 
LFT_REQUEST_ALL_HEADERS 
LFT_ADAPTED_REQUEST_HEADER 
LFT_ADAPTED_REQUEST_HEADER_ELEM 
LFT_ADAPTED_REQUEST_ALL_HEADERS 
LFT_SERVER_REQ_METHOD 
LFT_SERVER_REQ_URI 
LFT_SERVER_REQ_URLSCHEME 
LFT_SERVER_REQ_URLDOMAIN 
LFT_SERVER_REQ_URLPORT 
LFT_SERVER_REQ_URLPATH 
LFT_SERVER_REQ_VERSION 
LFT_CLIENT_REQUEST_SIZE_TOTAL 
LFT_CLIENT_REQUEST_SIZE_HEADERS 
LFT_HTTP_SENT_STATUS_CODE_OLD_30 
LFT_HTTP_SENT_STATUS_CODE 
LFT_HTTP_RECEIVED_STATUS_CODE 
LFT_HTTP_BODY_BYTES_READ 
LFT_REPLY_HEADER 
LFT_REPLY_HEADER_ELEM 
LFT_REPLY_ALL_HEADERS 
LFT_ADAPTED_REPLY_SIZE_TOTAL 
LFT_REPLY_HIGHOFFSET 
LFT_REPLY_OBJECTSIZE 
LFT_ADAPTED_REPLY_SIZE_HEADERS 
LFT_CLIENT_IO_SIZE_TOTAL 
LFT_USER_NAME 
LFT_USER_LOGIN 
LFT_USER_IDENT 
LFT_USER_EXTERNAL 
LFT_TIME_SECONDS_SINCE_EPOCH 
LFT_TIME_SUBSECOND 
LFT_TIME_LOCALTIME 
LFT_TIME_GMT 
LFT_TIME_START 
LFT_TIME_TO_HANDLE_REQUEST 
LFT_PEER_RESPONSE_TIME 
LFT_TOTAL_SERVER_SIDE_RESPONSE_TIME 
LFT_DNS_WAIT_TIME 
LFT_SQUID_STATUS 
LFT_SQUID_ERROR 
LFT_SQUID_ERROR_DETAIL 
LFT_SQUID_HIERARCHY 
LFT_MIME_TYPE 
LFT_TAG 
LFT_EXT_LOG 
LFT_SEQUENCE_NUMBER 
LFT_ADAPTATION_SUM_XACT_TIMES 
LFT_ADAPTATION_ALL_XACT_TIMES 
LFT_ADAPTATION_LAST_HEADER 
LFT_ADAPTATION_LAST_HEADER_ELEM 
LFT_ADAPTATION_LAST_ALL_HEADERS 
LFT_ICAP_TOTAL_TIME 
LFT_ICAP_ADDR 
LFT_ICAP_SERV_NAME 
LFT_ICAP_REQUEST_URI 
LFT_ICAP_REQUEST_METHOD 
LFT_ICAP_BYTES_SENT 
LFT_ICAP_BYTES_READ 
LFT_ICAP_BODY_BYTES_READ 
LFT_ICAP_REQ_HEADER 
LFT_ICAP_REQ_HEADER_ELEM 
LFT_ICAP_REQ_ALL_HEADERS 
LFT_ICAP_REP_HEADER 
LFT_ICAP_REP_HEADER_ELEM 
LFT_ICAP_REP_ALL_HEADERS 
LFT_ICAP_TR_RESPONSE_TIME 
LFT_ICAP_IO_TIME 
LFT_ICAP_OUTCOME 
LFT_ICAP_STATUS_CODE 
LFT_CREDENTIALS 
LFT_SSL_BUMP_MODE 
LFT_SSL_USER_CERT_SUBJECT 
LFT_SSL_USER_CERT_ISSUER 
LFT_SSL_CLIENT_SNI 
LFT_SSL_SERVER_CERT_SUBJECT 
LFT_SSL_SERVER_CERT_ISSUER 
LFT_SSL_SERVER_CERT_ERRORS 
LFT_TLS_CLIENT_NEGOTIATED_VERSION 
LFT_TLS_SERVER_NEGOTIATED_VERSION 
LFT_TLS_CLIENT_NEGOTIATED_CIPHER 
LFT_TLS_SERVER_NEGOTIATED_CIPHER 
LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION 
LFT_TLS_SERVER_RECEIVED_HELLO_VERSION 
LFT_TLS_CLIENT_SUPPORTED_VERSION 
LFT_TLS_SERVER_SUPPORTED_VERSION 
LFT_NOTE 
LFT_PERCENT 
LFT_EXT_ACL_USER_CERT_RAW 
LFT_EXT_ACL_USER_CERTCHAIN_RAW 
LFT_EXT_ACL_USER_CERT 
LFT_EXT_ACL_USER_CA_CERT 
LFT_EXT_ACL_CLIENT_EUI48 
LFT_EXT_ACL_CLIENT_EUI64 
LFT_EXT_ACL_NAME 
LFT_EXT_ACL_DATA 

Definition at line 30 of file ByteCode.h.

Enumerator
LOG_QUOTE_NONE 
LOG_QUOTE_QUOTES 
LOG_QUOTE_MIMEBLOB 
LOG_QUOTE_URL 
LOG_QUOTE_SHELL 
LOG_QUOTE_RAW 

Definition at line 249 of file ByteCode.h.

Function Documentation

char * Format::QuoteMimeBlob ( const char *  header)

URL-style encoding on a MIME headers blob. May accept NULL or empty strings.

Returns
A dynamically allocated string. recipient is responsible for free()'ing

Definition at line 43 of file Quoting.cc.

References buf, c2x, i, NULL, and xcalloc.

Referenced by Format::Format::assemble(), Log::Format::HttpdCombined(), Log::Format::HttpdCommon(), helper::packStatsInto(), QuoteUrlEncodeUsername(), and Log::Format::SquidNative().

char * Format::QuoteUrlEncodeUsername ( const char *  name)

Safely URL-encode a username. Accepts NULL or empty strings.

Definition at line 31 of file Quoting.cc.

References NULL, and QuoteMimeBlob().

Referenced by Log::Format::HttpdCombined(), Log::Format::HttpdCommon(), Log::Format::SquidIcap(), and Log::Format::SquidNative().

Variable Documentation

const SBuf Format::Dash
Format::FmtConfig Format::TheConfig

Definition at line 16 of file Config.cc.

Referenced by Format::Token::Init(), and Format::Token::parse().

TokenTableEntry Format::TokenTable1C[]
static
Initial value:
= {
TokenTableEntry(">a", LFT_CLIENT_IP_ADDRESS),
TokenTableEntry(">p", LFT_CLIENT_PORT),
TokenTableEntry(">A", LFT_CLIENT_FQDN),
TokenTableEntry("<a", LFT_SERVER_IP_ADDRESS),
TokenTableEntry("<p", LFT_SERVER_PORT),
TokenTableEntry("<A", LFT_SERVER_FQDN_OR_PEER_NAME),
TokenTableEntry(">h", LFT_REQUEST_HEADER),
TokenTableEntry(">h", LFT_REQUEST_ALL_HEADERS),
TokenTableEntry("<h", LFT_REPLY_HEADER),
TokenTableEntry("<h", LFT_REPLY_ALL_HEADERS),
TokenTableEntry(">v", LFT_REQUEST_VERSION_OLD_2X),
TokenTableEntry("%", LFT_PERCENT),
TokenTableEntry(NULL, LFT_NONE)
}
#define NULL
Definition: types.h:166

Definition at line 23 of file Token.cc.

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

TokenTableEntry Format::TokenTable2C[]
static

Definition at line 46 of file Token.cc.

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

TokenTableEntry Format::TokenTableAdapt[]
static
Initial value:

Definition at line 179 of file Token.cc.

Referenced by Format::Token::Init().

TokenTableEntry Format::TokenTableIcap[]
static
Initial value:
= {
TokenTableEntry("tt", LFT_ICAP_TOTAL_TIME),
TokenTableEntry("<last_h", LFT_ADAPTATION_LAST_HEADER),
TokenTableEntry("<A", LFT_ICAP_ADDR),
TokenTableEntry("<service_name", LFT_ICAP_SERV_NAME),
TokenTableEntry("ru", LFT_ICAP_REQUEST_URI),
TokenTableEntry("rm", LFT_ICAP_REQUEST_METHOD),
TokenTableEntry(">st", LFT_ICAP_BYTES_SENT),
TokenTableEntry("<st", LFT_ICAP_BYTES_READ),
TokenTableEntry("<bs", LFT_ICAP_BODY_BYTES_READ),
TokenTableEntry(">h", LFT_ICAP_REQ_HEADER),
TokenTableEntry("<h", LFT_ICAP_REP_HEADER),
TokenTableEntry("tr", LFT_ICAP_TR_RESPONSE_TIME),
TokenTableEntry("tio", LFT_ICAP_IO_TIME),
TokenTableEntry("to", LFT_ICAP_OUTCOME),
TokenTableEntry("Hs", LFT_ICAP_STATUS_CODE),
TokenTableEntry(NULL, LFT_NONE)
}
#define NULL
Definition: types.h:166

Definition at line 189 of file Token.cc.

Referenced by Format::Token::Init().

TokenTableEntry Format::TokenTableMisc[]
static

Definition at line 138 of file Token.cc.

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

TokenTableEntry Format::TokenTableSsl[]
static
Initial value:
= {
TokenTableEntry("bump_mode", LFT_SSL_BUMP_MODE),
TokenTableEntry(">cert_subject", LFT_SSL_USER_CERT_SUBJECT),
TokenTableEntry(">cert_issuer", LFT_SSL_USER_CERT_ISSUER),
TokenTableEntry(">sni", LFT_SSL_CLIENT_SNI),
TokenTableEntry("<cert_subject", LFT_SSL_SERVER_CERT_SUBJECT),
TokenTableEntry("<cert_issuer", LFT_SSL_SERVER_CERT_ISSUER),
TokenTableEntry("<cert_errors", LFT_SSL_SERVER_CERT_ERRORS),
TokenTableEntry(">negotiated_version", LFT_TLS_CLIENT_NEGOTIATED_VERSION),
TokenTableEntry("<negotiated_version", LFT_TLS_SERVER_NEGOTIATED_VERSION),
TokenTableEntry(">negotiated_cipher", LFT_TLS_CLIENT_NEGOTIATED_CIPHER),
TokenTableEntry("<negotiated_cipher", LFT_TLS_SERVER_NEGOTIATED_CIPHER),
TokenTableEntry(">received_hello_version", LFT_TLS_CLIENT_RECEIVED_HELLO_VERSION),
TokenTableEntry("<received_hello_version", LFT_TLS_SERVER_RECEIVED_HELLO_VERSION),
TokenTableEntry(">received_supported_version", LFT_TLS_CLIENT_SUPPORTED_VERSION),
TokenTableEntry("<received_supported_version", LFT_TLS_SERVER_SUPPORTED_VERSION),
TokenTableEntry(NULL, LFT_NONE)
}
#define NULL
Definition: types.h:166

Definition at line 215 of file Token.cc.

Referenced by Format::Token::Init().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors