cache_cf.cc File Reference
#include "squid.h"
#include "acl/Acl.h"
#include "acl/AclDenyInfoList.h"
#include "acl/AclSizeLimit.h"
#include "acl/Address.h"
#include "acl/Gadgets.h"
#include "acl/MethodData.h"
#include "acl/Tree.h"
#include "anyp/PortCfg.h"
#include "anyp/UriScheme.h"
#include "auth/Config.h"
#include "auth/Scheme.h"
#include "AuthReg.h"
#include "base/RunnersRegistry.h"
#include "cache_cf.h"
#include "CachePeer.h"
#include "ConfigParser.h"
#include "CpuAffinityMap.h"
#include "DiskIO/DiskIOModule.h"
#include "eui/Config.h"
#include "ExternalACL.h"
#include "format/Format.h"
#include "ftp/Elements.h"
#include "globals.h"
#include "HttpHeaderTools.h"
#include "icmp/IcmpConfig.h"
#include "ident/Config.h"
#include "ip/Intercept.h"
#include "ip/QosConfig.h"
#include "ip/tools.h"
#include "ipc/Kids.h"
#include "log/Config.h"
#include "log/CustomLog.h"
#include "MemBuf.h"
#include "MessageDelayPools.h"
#include "mgr/ActionPasswordList.h"
#include "mgr/Registration.h"
#include "neighbors.h"
#include "NeighborTypeDomainList.h"
#include "Parsing.h"
#include "pconn.h"
#include "PeerDigest.h"
#include "PeerPoolMgr.h"
#include "redirect.h"
#include "RefreshPattern.h"
#include "rfc1738.h"
#include "sbuf/List.h"
#include "SquidConfig.h"
#include "SquidString.h"
#include "ssl/ProxyCerts.h"
#include "Store.h"
#include "store/Disk.h"
#include "store/Disks.h"
#include "StoreFileSystem.h"
#include "tools.h"
#include "util.h"
#include "wordlist.h"
#include "wccp2.h"
#include "adaptation/Config.h"
#include "adaptation/icap/Config.h"
#include "adaptation/ecap/Config.h"
#include "ssl/Config.h"
#include "ssl/support.h"
#include "esi/Parser.h"
#include "snmp.h"
#include <limits>
#include <list>
#include "ssl/gadgets.h"
#include "DelayConfig.h"
#include "DelayPools.h"
#include "ClientDelayConfig.h"
#include "cf_parser.cci"
#include "AccessLogEntry.h"

Go to the source code of this file.

Classes

class  sslBumpCfgRr
 

Macros

#define free_http_header_access   free_HeaderManglers
 
#define free_http_header_replace   free_HeaderManglers
 
#define parse_PortCfg(l)   parsePortCfg((l), token)
 
#define free_PortCfg(h)   *(h)=NULL
 
#define free_delay_pool_class(X)
 
#define free_delay_pool_access(X)
 
#define free_delay_pool_rates(X)
 
#define dump_delay_pool_class(X, Y, Z)
 
#define dump_delay_pool_access(X, Y, Z)
 
#define dump_delay_pool_rates(X, Y, Z)
 
#define free_client_delay_pool_access(X)
 
#define free_client_delay_pool_rates(X)
 
#define dump_client_delay_pool_access(X, Y, Z)
 
#define dump_client_delay_pool_rates(X, Y, Z)
 
#define free_onoff   free_int
 
#define free_tristate   free_int
 
#define free_pipelinePrefetch   free_int
 
#define dump_pipelinePrefetch   dump_int
 
#define dump_eol   dump_string
 
#define free_eol   free_string
 
#define dump_TokenOrQuotedString   dump_string
 
#define free_TokenOrQuotedString   free_string
 
#define free_b_size_t   free_size_t
 
#define free_b_ssize_t   free_ssize_t
 
#define free_kb_size_t   free_size_t
 
#define free_mb_size_t   free_size_t
 
#define free_gb_size_t   free_size_t
 
#define free_kb_int64_t   free_b_int64_t
 
#define free_wordlist   wordlistDestroy
 
#define free_uri_whitespace   free_int
 

Functions

static void parse_adaptation_service_set_type ()
 
static void parse_adaptation_service_chain_type ()
 
static void parse_adaptation_access_type ()
 
static void parse_icap_service_type (Adaptation::Icap::Config *)
 
static void dump_icap_service_type (StoreEntry *, const char *, const Adaptation::Icap::Config &)
 
static void free_icap_service_type (Adaptation::Icap::Config *)
 
static void parse_icap_class_type ()
 
static void parse_icap_access_type ()
 
static void parse_icap_service_failure_limit (Adaptation::Icap::Config *)
 
static void dump_icap_service_failure_limit (StoreEntry *, const char *, const Adaptation::Icap::Config &)
 
static void free_icap_service_failure_limit (Adaptation::Icap::Config *)
 
static void parse_ecap_service_type (Adaptation::Ecap::Config *)
 
static void dump_ecap_service_type (StoreEntry *, const char *, const Adaptation::Ecap::Config &)
 
static void free_ecap_service_type (Adaptation::Ecap::Config *)
 
static peer_t parseNeighborType (const char *s)
 
static void parse_access_log (CustomLog **customlog_definitions)
 
static int check_null_access_log (CustomLog *customlog_definitions)
 
static void dump_access_log (StoreEntry *entry, const char *name, CustomLog *definitions)
 
static void free_access_log (CustomLog **definitions)
 
static bool setLogformat (CustomLog *cl, const char *name, const bool dieWhenMissing)
 
static void configDoConfigure (void)
 
static void parse_refreshpattern (RefreshPattern **)
 
static uint64_t parseTimeUnits (const char *unit, bool allowMsec)
 
static void parseTimeLine (time_msec_t *tptr, const char *units, bool allowMsec, bool expectMoreArguments)
 
static void parse_u_short (unsigned short *var)
 
static void parse_string (char **)
 
static void default_all (void)
 
static void defaults_if_none (void)
 
static void defaults_postscriptum (void)
 
static int parse_line (char *)
 
static void parse_obsolete (const char *)
 
static void parseBytesLine (size_t *bptr, const char *units)
 
static void parseBytesLineSigned (ssize_t *bptr, const char *units)
 
static size_t parseBytesUnits (const char *unit)
 
static void free_all (void)
 
void requirePathnameExists (const char *name, const char *path)
 
static void free_HeaderManglers (HeaderManglers **pm)
 
static void dump_http_header_access (StoreEntry *entry, const char *name, const HeaderManglers *manglers)
 
static void parse_http_header_access (HeaderManglers **manglers)
 
static void dump_http_header_replace (StoreEntry *entry, const char *name, const HeaderManglers *manglers)
 
static void parse_http_header_replace (HeaderManglers **manglers)
 
static void dump_HeaderWithAclList (StoreEntry *entry, const char *name, HeaderWithAclList *headers)
 
static void parse_HeaderWithAclList (HeaderWithAclList **header)
 
static void free_HeaderWithAclList (HeaderWithAclList **header)
 
static void parse_note (Notes *)
 
static void dump_note (StoreEntry *, const char *, Notes &)
 
static void free_note (Notes *)
 
static void parse_denyinfo (AclDenyInfoList **var)
 
static void dump_denyinfo (StoreEntry *entry, const char *name, AclDenyInfoList *var)
 
static void free_denyinfo (AclDenyInfoList **var)
 
static void parse_IpAddress_list (Ip::Address_list **)
 
static void dump_IpAddress_list (StoreEntry *, const char *, const Ip::Address_list *)
 
static void free_IpAddress_list (Ip::Address_list **)
 
static void parsePortCfg (AnyP::PortCfgPointer *, const char *protocol)
 
static void dump_PortCfg (StoreEntry *, const char *, const AnyP::PortCfgPointer &)
 
static void parse_sslproxy_cert_sign (sslproxy_cert_sign **cert_sign)
 
static void dump_sslproxy_cert_sign (StoreEntry *entry, const char *name, sslproxy_cert_sign *cert_sign)
 
static void free_sslproxy_cert_sign (sslproxy_cert_sign **cert_sign)
 
static void parse_sslproxy_cert_adapt (sslproxy_cert_adapt **cert_adapt)
 
static void dump_sslproxy_cert_adapt (StoreEntry *entry, const char *name, sslproxy_cert_adapt *cert_adapt)
 
static void free_sslproxy_cert_adapt (sslproxy_cert_adapt **cert_adapt)
 
static void parse_sslproxy_ssl_bump (acl_access **ssl_bump)
 
static void dump_sslproxy_ssl_bump (StoreEntry *entry, const char *name, acl_access *ssl_bump)
 
static void free_sslproxy_ssl_bump (acl_access **ssl_bump)
 
static void parse_ftp_epsv (acl_access **ftp_epsv)
 
static void dump_ftp_epsv (StoreEntry *entry, const char *name, acl_access *ftp_epsv)
 
static void free_ftp_epsv (acl_access **ftp_epsv)
 
static void parse_b_size_t (size_t *var)
 
static void parse_b_int64_t (int64_t *var)
 
static void parse_CpuAffinityMap (CpuAffinityMap **const cpuAffinityMap)
 
static void dump_CpuAffinityMap (StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap)
 
static void free_CpuAffinityMap (CpuAffinityMap **const cpuAffinityMap)
 
static void parse_UrlHelperTimeout (SquidConfig::UrlHelperTimeout *)
 
static void dump_UrlHelperTimeout (StoreEntry *, const char *, SquidConfig::UrlHelperTimeout &)
 
static void free_UrlHelperTimeout (SquidConfig::UrlHelperTimeout *)
 
static int parseOneConfigFile (const char *file_name, unsigned int depth)
 
static void parse_configuration_includes_quoted_values (bool *recognizeQuotedValues)
 
static void dump_configuration_includes_quoted_values (StoreEntry *const entry, const char *const name, bool recognizeQuotedValues)
 
static void free_configuration_includes_quoted_values (bool *recognizeQuotedValues)
 
static void parse_on_unsupported_protocol (acl_access **access)
 
static void dump_on_unsupported_protocol (StoreEntry *entry, const char *name, acl_access *access)
 
static void free_on_unsupported_protocol (acl_access **access)
 
static void ParseAclWithAction (acl_access **access, const allow_t &action, const char *desc, ACL *acl=nullptr)
 
void self_destruct (void)
 
static void SetConfigFilename (char const *file_name, bool is_pipe)
 
static const char * skip_ws (const char *s)
 
static int parseManyConfigFiles (char *files, int depth)
 
static void ReplaceSubstr (char *&str, int &len, unsigned substrIdx, unsigned substrLen, const char *newSubstr)
 
static void SubstituteMacro (char *&line, int &len, const char *macroName, const char *substStr)
 
static void ProcessMacros (char *&line, int &len)
 
static void trim_trailing_ws (char *str)
 
static const char * FindStatement (const char *line, const char *statement)
 
static bool StrToInt (const char *str, long &number)
 
static bool EvalBoolExpr (const char *expr)
 
static int parseConfigFileOrThrow (const char *file_name)
 
int parseConfigFile (const char *file_name)
 
static void parseBytesLine64 (int64_t *bptr, const char *units)
 
void parseBytesOptionValue (size_t *bptr, const char *units, char const *value)
 Parse bytes number from a string. More...
 
static void parse_SBufList (SBufList *list)
 
static void dump_SBufList (StoreEntry *entry, const SBufList &words)
 
static void dump_SBufList (StoreEntry *entry, const char *name, SBufList &list)
 
static void free_SBufList (SBufList *list)
 
static void dump_acl (StoreEntry *entry, const char *name, ACL *ae)
 
static void parse_acl (ACL **ae)
 
static void free_acl (ACL **ae)
 
void dump_acl_list (StoreEntry *entry, ACLList *head)
 
void dump_acl_access (StoreEntry *entry, const char *name, acl_access *head)
 
static void parse_acl_access (acl_access **head)
 
static void free_acl_access (acl_access **head)
 
static void dump_address (StoreEntry *entry, const char *name, Ip::Address &addr)
 
static void parse_address (Ip::Address *addr)
 
static void free_address (Ip::Address *addr)
 
static void dump_acl_address (StoreEntry *entry, const char *name, Acl::Address *head)
 
static void parse_acl_address (Acl::Address **head)
 
static void free_acl_address (Acl::Address **head)
 
static void dump_acl_tos (StoreEntry *entry, const char *name, acl_tos *head)
 
static void parse_acl_tos (acl_tos **head)
 
static void free_acl_tos (acl_tos **head)
 
static void dump_acl_b_size_t (StoreEntry *entry, const char *name, AclSizeLimit *head)
 
static void parse_acl_b_size_t (AclSizeLimit **head)
 
static void free_acl_b_size_t (AclSizeLimit **head)
 
static void free_delay_pool_count (DelayConfig *cfg)
 
static void dump_delay_pool_count (StoreEntry *entry, const char *name, DelayConfig &cfg)
 
static void parse_delay_pool_count (DelayConfig *cfg)
 
static void parse_delay_pool_class (DelayConfig *cfg)
 
static void parse_delay_pool_rates (DelayConfig *cfg)
 
static void parse_delay_pool_access (DelayConfig *cfg)
 
static void free_client_delay_pool_count (ClientDelayConfig *cfg)
 
static void dump_client_delay_pool_count (StoreEntry *entry, const char *name, ClientDelayConfig &cfg)
 
static void parse_client_delay_pool_count (ClientDelayConfig *cfg)
 
static void parse_client_delay_pool_rates (ClientDelayConfig *cfg)
 
static void parse_client_delay_pool_access (ClientDelayConfig *cfg)
 
static void dump_cachedir (StoreEntry *entry, const char *name, const Store::DiskConfig &swap)
 
static int check_null_string (char *s)
 
static void parse_authparam (Auth::ConfigVector *config)
 
static void free_authparam (Auth::ConfigVector *cfg)
 
static void dump_authparam (StoreEntry *entry, const char *name, Auth::ConfigVector cfg)
 
static void parse_AuthSchemes (acl_access **authSchemes)
 
static void free_AuthSchemes (acl_access **authSchemes)
 
static void dump_AuthSchemes (StoreEntry *entry, const char *name, acl_access *authSchemes)
 
static int find_fstype (char *type)
 
static void parse_cachedir (Store::DiskConfig *swap)
 
static const char * peer_type_str (const peer_t type)
 
static void dump_peer (StoreEntry *entry, const char *name, CachePeer *p)
 
static bool isUnsignedNumeric (const char *str, size_t len)
 
static unsigned short GetService (const char *proto)
 
unsigned short GetTcpService (void)
 
unsigned short GetUdpService (void)
 
static void parse_peer (CachePeer **head)
 
static void free_peer (CachePeer **P)
 
static void dump_cachemgrpasswd (StoreEntry *entry, const char *name, Mgr::ActionPasswordList *list)
 
static void parse_cachemgrpasswd (Mgr::ActionPasswordList **head)
 
static void free_cachemgrpasswd (Mgr::ActionPasswordList **head)
 
static void parse_peer_access (void)
 
static void parse_hostdomaintype (void)
 
static void dump_int (StoreEntry *entry, const char *name, int var)
 
void parse_int (int *var)
 
static void free_int (int *var)
 
static void dump_int64_t (StoreEntry *entry, const char *name, int64_t var)
 
void parse_int64_t (int64_t *var)
 
static void free_int64_t (int64_t *var)
 
static void dump_onoff (StoreEntry *entry, const char *name, int var)
 
void parse_onoff (int *var)
 
static void dump_tristate (StoreEntry *entry, const char *name, int var)
 
static void parse_tristate (int *var)
 
void parse_pipelinePrefetch (int *var)
 
static void dump_refreshpattern (StoreEntry *entry, const char *name, RefreshPattern *head)
 
static void free_refreshpattern (RefreshPattern **head)
 
static void dump_string (StoreEntry *entry, const char *name, char *var)
 
static void free_string (char **var)
 
void parse_eol (char *volatile *var)
 
static void parse_TokenOrQuotedString (char **var)
 
static void dump_time_t (StoreEntry *entry, const char *name, time_t var)
 
void parse_time_t (time_t *var)
 
static void free_time_t (time_t *var)
 
static void dump_time_msec (StoreEntry *entry, const char *name, time_msec_t var)
 
void parse_time_msec (time_msec_t *var)
 
static void free_time_msec (time_msec_t *var)
 
static void dump_b_size_t (StoreEntry *entry, const char *name, size_t var)
 
static void dump_b_ssize_t (StoreEntry *entry, const char *name, ssize_t var)
 
static void dump_b_int64_t (StoreEntry *entry, const char *name, int64_t var)
 
static void dump_kb_int64_t (StoreEntry *entry, const char *name, int64_t var)
 
static void parse_b_ssize_t (ssize_t *var)
 
static void parse_kb_int64_t (int64_t *var)
 
static void free_size_t (size_t *var)
 
static void free_ssize_t (ssize_t *var)
 
static void free_b_int64_t (int64_t *var)
 
static void dump_u_short (StoreEntry *entry, const char *name, unsigned short var)
 
static void free_u_short (unsigned short *u)
 
static void dump_wordlist (StoreEntry *entry, const char *name, wordlist *list)
 
void parse_wordlist (wordlist **list)
 
static int check_null_acl_access (acl_access *a)
 
static void parse_uri_whitespace (int *var)
 
static void dump_uri_whitespace (StoreEntry *entry, const char *name, int var)
 
static void free_removalpolicy (RemovalPolicySettings **settings)
 
static void parse_removalpolicy (RemovalPolicySettings **settings)
 
static void dump_removalpolicy (StoreEntry *entry, const char *name, RemovalPolicySettings *settings)
 
void free_YesNoNone (YesNoNone *)
 
static void parse_YesNoNone (YesNoNone *option)
 
static void dump_YesNoNone (StoreEntry *entry, const char *name, YesNoNone &option)
 
static void free_memcachemode (SquidConfig *)
 
static void parse_memcachemode (SquidConfig *)
 
static void dump_memcachemode (StoreEntry *entry, const char *name, SquidConfig &)
 
static void parsePortSpecification (const AnyP::PortCfgPointer &s, char *token)
 
static AnyP::ProtocolVersion parsePortProtocol (const SBuf &value)
 
static void parse_port_option (AnyP::PortCfgPointer &s, char *token)
 
void add_http_port (char *portspec)
 
static void dump_generic_port (StoreEntry *e, const char *n, const AnyP::PortCfgPointer &s)
 
void configFreeMemory (void)
 
 RunnerRegistrationEntry (sslBumpCfgRr)
 

Variables

static const char *const T_MILLISECOND_STR = "millisecond"
 
static const char *const T_SECOND_STR = "second"
 
static const char *const T_MINUTE_STR = "minute"
 
static const char *const T_HOUR_STR = "hour"
 
static const char *const T_DAY_STR = "day"
 
static const char *const T_WEEK_STR = "week"
 
static const char *const T_FORTNIGHT_STR = "fortnight"
 
static const char *const T_MONTH_STR = "month"
 
static const char *const T_YEAR_STR = "year"
 
static const char *const T_DECADE_STR = "decade"
 
static const char *const B_BYTES_STR = "bytes"
 
static const char *const B_KBYTES_STR = "KB"
 
static const char *const B_MBYTES_STR = "MB"
 
static const char *const B_GBYTES_STR = "GB"
 
static const char *const list_sep = ", \t\n\r"
 
static OBJH dump_config
 
static ConfigParser LegacyParser = ConfigParser()
 
static bool FtpEspvDeprecated = false
 

Macro Definition Documentation

#define dump_client_delay_pool_access (   X,
  Y,
 
)

Definition at line 1691 of file cache_cf.cc.

#define dump_client_delay_pool_rates (   X,
  Y,
 
)

Definition at line 1692 of file cache_cf.cc.

#define dump_delay_pool_access (   X,
  Y,
 
)

Definition at line 1642 of file cache_cf.cc.

#define dump_delay_pool_class (   X,
  Y,
 
)

Definition at line 1641 of file cache_cf.cc.

#define dump_delay_pool_rates (   X,
  Y,
 
)

Definition at line 1643 of file cache_cf.cc.

#define dump_eol   dump_string

Definition at line 2955 of file cache_cf.cc.

#define dump_pipelinePrefetch   dump_int

Definition at line 2667 of file cache_cf.cc.

#define dump_TokenOrQuotedString   dump_string

Definition at line 2972 of file cache_cf.cc.

#define free_b_size_t   free_size_t

Definition at line 3116 of file cache_cf.cc.

#define free_b_ssize_t   free_ssize_t

Definition at line 3117 of file cache_cf.cc.

#define free_client_delay_pool_access (   X)

Definition at line 1689 of file cache_cf.cc.

#define free_client_delay_pool_rates (   X)

Definition at line 1690 of file cache_cf.cc.

#define free_delay_pool_access (   X)

Definition at line 1639 of file cache_cf.cc.

#define free_delay_pool_class (   X)

Definition at line 1638 of file cache_cf.cc.

#define free_delay_pool_rates (   X)

Definition at line 1640 of file cache_cf.cc.

#define free_eol   free_string

Definition at line 2956 of file cache_cf.cc.

#define free_gb_size_t   free_size_t

Definition at line 3120 of file cache_cf.cc.

#define free_http_header_access   free_HeaderManglers

Definition at line 180 of file cache_cf.cc.

#define free_http_header_replace   free_HeaderManglers

Definition at line 183 of file cache_cf.cc.

#define free_kb_int64_t   free_b_int64_t

Definition at line 3121 of file cache_cf.cc.

#define free_kb_size_t   free_size_t

Definition at line 3118 of file cache_cf.cc.

#define free_mb_size_t   free_size_t

Definition at line 3119 of file cache_cf.cc.

#define free_onoff   free_int

Definition at line 2597 of file cache_cf.cc.

#define free_pipelinePrefetch   free_int

Definition at line 2666 of file cache_cf.cc.

#define free_PortCfg (   h)    *(h)=NULL

Definition at line 207 of file cache_cf.cc.

#define free_TokenOrQuotedString   free_string

Definition at line 2973 of file cache_cf.cc.

#define free_tristate   free_int

Definition at line 2641 of file cache_cf.cc.

#define free_uri_whitespace   free_int

Definition at line 3199 of file cache_cf.cc.

#define free_wordlist   wordlistDestroy

Definition at line 3197 of file cache_cf.cc.

Referenced by free_removalpolicy().

#define parse_PortCfg (   l)    parsePortCfg((l), token)

Definition at line 205 of file cache_cf.cc.

Function Documentation

void add_http_port ( char *  portspec)

Definition at line 3752 of file cache_cf.cc.

References assert, HttpPortList, NULL, parsePortProtocol(), and parsePortSpecification().

Referenced by mainParseOptions().

static int check_null_access_log ( CustomLog customlog_definitions)
static

Definition at line 4148 of file cache_cf.cc.

References NULL.

static int check_null_acl_access ( acl_access a)
static

Definition at line 3192 of file cache_cf.cc.

References NULL.

static int check_null_string ( char *  s)
static

Definition at line 1810 of file cache_cf.cc.

References NULL.

static void configDoConfigure ( void  )
static

Definition at line 625 of file cache_cf.cc.

References SquidConfig::Accel, Auth::SchemeConfig::active(), SquidConfig::Announce, SquidConfig::announce, APP_FULLNAME, SquidConfig::appendDomain, SquidConfig::appendDomainLen, appname_string, SquidConfig::cacheSwap, SquidConfig2::clear(), SquidConfig::client_pconns, SBuf::cmp(), Config, Config2, SquidConfig::connect_retries, Security::PeerOptions::createClientContext(), DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, SquidConfig::directory, Store::Disk::disker, SquidConfig::effectiveGroup, SquidConfig2::effectiveGroupID, SquidConfig::effectiveUser, SquidConfig2::effectiveUserID, SquidConfig2::enable_purge, SquidConfig::errHtmlText, SquidConfig::errorDirectory, fatal(), fatalf(), Auth::SchemeConfig::Find(), RefreshPattern::flags, SquidConfig::foreignIntermediateCertsPath, getMyHostname(), SquidConfig::httpd_suppress_version_string, HttpPortList, i, SquidConfig::icons, RefreshPattern::ignore_no_store, RefreshPattern::ignore_private, RefreshPattern::ignore_reload, InDaemonMode(), SBuf::isEmpty(), wordlist::key, len, Ssl::loadSquidUntrusted(), SquidConfig::Log, SquidConfig::max_filedescriptors, SquidConfig::maxObjectSize, SquidConfig::maxRequestBufferSize, SquidConfig::maxRequestHeaderSize, memConfigure(), SquidConfig::mimeTablePathname, Store::DiskConfig::n_configured, Helper::ChildConfig::n_max, Store::DiskConfig::n_strands, Store::Disk::needsDiskStrand(), RefreshPattern::next, NULL, null_string, SquidConfig::onoff, SquidConfig2::onoff, RefreshPattern::override_expire, RefreshPattern::override_lastmod, p, SquidConfig::peers, SquidConfig::period, SquidConfig::pipeline_max_prefetch, SquidConfig::Program, Security::ProxyOutgoingConfig, SquidConfig::redirect, SquidConfig::redirectChildren, SquidConfig::Refresh, RefreshPattern::reload_into_ims, requirePathnameExists(), Debug::rotateNumber, SquidConfig::rotateNumber, self_destruct(), SQUID_UDP_SO_SNDBUF, SquidConfig::ssl_client, SquidConfig::sslContext, SquidConfig::Store, Store::Controller::store_dirs_rebuilding, SquidConfig::store_id, storeConfigure(), SquidConfig::storeIdChildren, SquidConfig::surrogate_id, Store::DiskConfig::swapDirs, Log::TheConfig, Auth::TheConfig, ACLMethodData::ThePurgeCount, ThisCache, ThisCache2, SquidConfig::udpMaxHitObjsz, uniqueHostname(), SquidConfig::unlinkd, Ssl::useSquidUntrusted(), SquidConfig::via, visible_appname_string, wordlistDestroy(), SquidConfig::workers, xcalloc, and xstrdup.

Referenced by parseConfigFileOrThrow().

void configFreeMemory ( void  )
static void default_all ( void  )
static

Referenced by parseConfigFileOrThrow().

static void defaults_if_none ( void  )
static

Referenced by parseConfigFileOrThrow().

static void defaults_postscriptum ( void  )
static

Referenced by parseConfigFileOrThrow().

static void dump_acl ( StoreEntry entry,
const char *  name,
ACL ae 
)
static
static void dump_acl_address ( StoreEntry entry,
const char *  name,
Acl::Address head 
)
static

Definition at line 1443 of file cache_cf.cc.

References buf, dump_acl_list(), MAX_IPSTRLEN, Acl::Address::next, and storeAppendPrintf().

static void dump_acl_b_size_t ( StoreEntry entry,
const char *  name,
AclSizeLimit head 
)
static
static void dump_acl_tos ( StoreEntry entry,
const char *  name,
acl_tos head 
)
static
static void dump_address ( StoreEntry entry,
const char *  name,
Ip::Address addr 
)
static

Definition at line 1406 of file cache_cf.cc.

References buf, MAX_IPSTRLEN, storeAppendPrintf(), and Ip::Address::toStr().

static void dump_authparam ( StoreEntry entry,
const char *  name,
Auth::ConfigVector  cfg 
)
static

Definition at line 1869 of file cache_cf.cc.

static void dump_AuthSchemes ( StoreEntry entry,
const char *  name,
acl_access authSchemes 
)
static
static void dump_b_int64_t ( StoreEntry entry,
const char *  name,
int64_t  var 
)
static

Definition at line 3045 of file cache_cf.cc.

References B_BYTES_STR, PRId64, and storeAppendPrintf().

static void dump_b_size_t ( StoreEntry entry,
const char *  name,
size_t  var 
)
static

Definition at line 3025 of file cache_cf.cc.

References B_BYTES_STR, and storeAppendPrintf().

static void dump_b_ssize_t ( StoreEntry entry,
const char *  name,
ssize_t  var 
)
static

Definition at line 3031 of file cache_cf.cc.

References B_BYTES_STR, and storeAppendPrintf().

static void dump_cachedir ( StoreEntry entry,
const char *  name,
const Store::DiskConfig swap 
)
static
static void dump_cachemgrpasswd ( StoreEntry entry,
const char *  name,
Mgr::ActionPasswordList list 
)
static
static void dump_client_delay_pool_count ( StoreEntry entry,
const char *  name,
ClientDelayConfig cfg 
)
static

Definition at line 1701 of file cache_cf.cc.

References ClientDelayConfig::dumpPoolCount().

static void dump_configuration_includes_quoted_values ( StoreEntry *const  entry,
const char *const  name,
bool  recognizeQuotedValues 
)
static

Definition at line 4951 of file cache_cf.cc.

References dump_onoff(), and ConfigParser::RecognizeQuotedValues.

static void dump_CpuAffinityMap ( StoreEntry *const  entry,
const char *const  name,
const CpuAffinityMap *const  cpuAffinityMap 
)
static
static void dump_delay_pool_count ( StoreEntry entry,
const char *  name,
DelayConfig cfg 
)
static

Definition at line 1652 of file cache_cf.cc.

References DelayConfig::dumpPoolCount().

static void dump_denyinfo ( StoreEntry entry,
const char *  name,
AclDenyInfoList var 
)
static
static void dump_ecap_service_type ( StoreEntry entry,
const char *  name,
const Adaptation::Ecap::Config cfg 
)
static

Definition at line 4392 of file cache_cf.cc.

References Adaptation::Config::dumpService().

static void dump_ftp_epsv ( StoreEntry entry,
const char *  name,
acl_access ftp_epsv 
)
static

Definition at line 4856 of file cache_cf.cc.

References Acl::AllowOrDeny(), and dump_SBufList().

static void dump_generic_port ( StoreEntry e,
const char *  n,
const AnyP::PortCfgPointer s 
)
static
static void dump_HeaderWithAclList ( StoreEntry entry,
const char *  name,
HeaderWithAclList headers 
)
static

Definition at line 4723 of file cache_cf.cc.

References dump_acl_list(), and storeAppendPrintf().

static void dump_http_header_access ( StoreEntry entry,
const char *  name,
const HeaderManglers manglers 
)
static

Definition at line 1727 of file cache_cf.cc.

References HeaderManglers::dumpAccess().

static void dump_http_header_replace ( StoreEntry entry,
const char *  name,
const HeaderManglers manglers 
)
static

Definition at line 1766 of file cache_cf.cc.

References HeaderManglers::dumpReplacement().

static void dump_icap_service_failure_limit ( StoreEntry entry,
const char *  name,
const Adaptation::Icap::Config cfg 
)
static
static void dump_icap_service_type ( StoreEntry entry,
const char *  name,
const Adaptation::Icap::Config cfg 
)
static

Definition at line 4354 of file cache_cf.cc.

References Adaptation::Config::dumpService().

static void dump_int ( StoreEntry entry,
const char *  name,
int  var 
)
static

Definition at line 2527 of file cache_cf.cc.

References storeAppendPrintf().

static void dump_int64_t ( StoreEntry entry,
const char *  name,
int64_t  var 
)
static

Definition at line 2547 of file cache_cf.cc.

References PRId64, and storeAppendPrintf().

static void dump_IpAddress_list ( StoreEntry e,
const char *  n,
const Ip::Address_list s 
)
static
static void dump_kb_int64_t ( StoreEntry entry,
const char *  name,
int64_t  var 
)
static

Definition at line 3051 of file cache_cf.cc.

References B_KBYTES_STR, PRId64, and storeAppendPrintf().

static void dump_memcachemode ( StoreEntry entry,
const char *  name,
SquidConfig  
)
static
static void dump_note ( StoreEntry entry,
const char *  name,
Notes notes 
)
static

Definition at line 4794 of file cache_cf.cc.

References Notes::dump().

static void dump_on_unsupported_protocol ( StoreEntry entry,
const char *  name,
acl_access access 
)
static

Definition at line 4989 of file cache_cf.cc.

References action(), dump_SBufList(), and allow_t::kind.

static void dump_onoff ( StoreEntry entry,
const char *  name,
int  var 
)
static

Definition at line 2567 of file cache_cf.cc.

References storeAppendPrintf().

Referenced by dump_configuration_includes_quoted_values(), and dump_YesNoNone().

static void dump_PortCfg ( StoreEntry e,
const char *  n,
const AnyP::PortCfgPointer s 
)
static

Definition at line 3937 of file cache_cf.cc.

References dump_generic_port(), NULL, p, and storeAppendPrintf().

static void dump_removalpolicy ( StoreEntry entry,
const char *  name,
RemovalPolicySettings settings 
)
static
static void dump_SBufList ( StoreEntry entry,
const SBufList words 
)
static
static void dump_SBufList ( StoreEntry entry,
const char *  name,
SBufList list 
)
static

Definition at line 1335 of file cache_cf.cc.

References StoreEntry::append(), and dump_SBufList().

static void dump_sslproxy_cert_adapt ( StoreEntry entry,
const char *  name,
sslproxy_cert_adapt cert_adapt 
)
static

Definition at line 4513 of file cache_cf.cc.

References dump_acl_list(), NULL, Ssl::sslCertAdaptAlgoritm(), and storeAppendPrintf().

static void dump_sslproxy_cert_sign ( StoreEntry entry,
const char *  name,
sslproxy_cert_sign cert_sign 
)
static
static void dump_sslproxy_ssl_bump ( StoreEntry entry,
const char *  name,
acl_access ssl_bump 
)
static

Definition at line 4708 of file cache_cf.cc.

References action(), Ssl::BumpModeStr, dump_SBufList(), and allow_t::kind.

static void dump_string ( StoreEntry entry,
const char *  name,
char *  var 
)
static

Definition at line 2902 of file cache_cf.cc.

References NULL, and storeAppendPrintf().

static void dump_time_msec ( StoreEntry entry,
const char *  name,
time_msec_t  var 
)
static

Definition at line 2996 of file cache_cf.cc.

References PRId64, and storeAppendPrintf().

static void dump_time_t ( StoreEntry entry,
const char *  name,
time_t  var 
)
static

Definition at line 2976 of file cache_cf.cc.

References storeAppendPrintf().

Referenced by dump_UrlHelperTimeout().

static void dump_tristate ( StoreEntry entry,
const char *  name,
int  var 
)
static

Definition at line 2600 of file cache_cf.cc.

References storeAppendPrintf().

static void dump_u_short ( StoreEntry entry,
const char *  name,
unsigned short  var 
)
static

Definition at line 3124 of file cache_cf.cc.

References storeAppendPrintf().

static void dump_uri_whitespace ( StoreEntry entry,
const char *  name,
int  var 
)
static
static void dump_wordlist ( StoreEntry entry,
const char *  name,
wordlist list 
)
static

Definition at line 3161 of file cache_cf.cc.

References wordlist::key, wordlist::next, NULL, and storeAppendPrintf().

static void dump_YesNoNone ( StoreEntry entry,
const char *  name,
YesNoNone option 
)
static

Definition at line 3301 of file cache_cf.cc.

References YesNoNone::configured(), and dump_onoff().

static bool EvalBoolExpr ( const char *  expr)
static

Definition at line 386 of file cache_cf.cc.

References assert, fatalf(), NULL, skip_ws(), StrToInt(), trim_trailing_ws(), xfree, xmalloc, and xstrncpy().

Referenced by parseOneConfigFile().

static int find_fstype ( char *  type)
static

Definition at line 1926 of file cache_cf.cc.

References StoreFileSystem::FileSystems(), i, and type.

Referenced by parse_cachedir().

static const char* FindStatement ( const char *  line,
const char *  statement 
)
static

Definition at line 356 of file cache_cf.cc.

References assert, len, NULL, skip_ws(), and xisspace.

Referenced by parseOneConfigFile().

static void free_access_log ( CustomLog **  definitions)
static
static void free_acl ( ACL **  ae)
static

Definition at line 1375 of file cache_cf.cc.

References aclDestroyAcls().

static void free_acl_access ( acl_access **  head)
static
static void free_acl_address ( Acl::Address **  head)
static

Definition at line 1474 of file cache_cf.cc.

References head, and NULL.

static void free_acl_b_size_t ( AclSizeLimit **  head)
static

Definition at line 1625 of file cache_cf.cc.

References head, and NULL.

static void free_acl_tos ( acl_tos **  head)
static

Definition at line 1533 of file cache_cf.cc.

References head, and NULL.

static void free_address ( Ip::Address addr)
static

Definition at line 1437 of file cache_cf.cc.

References Ip::Address::setEmpty().

static void free_all ( void  )
static

Referenced by configFreeMemory().

static void free_authparam ( Auth::ConfigVector cfg)
static

Definition at line 1857 of file cache_cf.cc.

References Auth::Init(), and reconfiguring.

static void free_AuthSchemes ( acl_access **  authSchemes)
static

Definition at line 1890 of file cache_cf.cc.

References free_acl_access(), Auth::Config::schemeLists, and Auth::TheConfig.

static void free_b_int64_t ( int64_t *  var)
static

Definition at line 3111 of file cache_cf.cc.

static void free_cachemgrpasswd ( Mgr::ActionPasswordList **  head)
static

Definition at line 2439 of file cache_cf.cc.

References head.

static void free_client_delay_pool_count ( ClientDelayConfig cfg)
static

Definition at line 1695 of file cache_cf.cc.

References ClientDelayConfig::freePools().

static void free_configuration_includes_quoted_values ( bool *  recognizeQuotedValues)
static

Definition at line 4958 of file cache_cf.cc.

References ConfigParser::RecognizeQuotedValues, and ConfigParser::StrictMode.

static void free_CpuAffinityMap ( CpuAffinityMap **const  cpuAffinityMap)
static

Definition at line 4312 of file cache_cf.cc.

References NULL.

static void free_delay_pool_count ( DelayConfig cfg)
static

Definition at line 1646 of file cache_cf.cc.

References DelayConfig::freePoolCount().

void free_denyinfo ( AclDenyInfoList **  var)
static

Definition at line 2467 of file cache_cf.cc.

static void free_ecap_service_type ( Adaptation::Ecap::Config cfg)
static

Definition at line 4386 of file cache_cf.cc.

References Adaptation::Config::freeService().

static void free_ftp_epsv ( acl_access **  ftp_epsv)
static

Definition at line 4862 of file cache_cf.cc.

References free_acl_access().

static void free_HeaderManglers ( HeaderManglers **  pm)
static

Definition at line 1756 of file cache_cf.cc.

References NULL.

static void free_HeaderWithAclList ( HeaderWithAclList **  header)
static

Definition at line 4770 of file cache_cf.cc.

References aclDestroyAclList(), and NULL.

static void free_icap_service_failure_limit ( Adaptation::Icap::Config cfg)
static
static void free_icap_service_type ( Adaptation::Icap::Config cfg)
static

Definition at line 4348 of file cache_cf.cc.

References Adaptation::Config::freeService().

static void free_int ( int var)
static

Definition at line 2541 of file cache_cf.cc.

static void free_int64_t ( int64_t *  var)
static

Definition at line 2561 of file cache_cf.cc.

static void free_IpAddress_list ( Ip::Address_list **  head)
static

Definition at line 3417 of file cache_cf.cc.

References head, and NULL.

static void free_memcachemode ( SquidConfig )
static

Definition at line 3308 of file cache_cf.cc.

static void free_note ( Notes notes)
static

Definition at line 4799 of file cache_cf.cc.

References Notes::clean().

static void free_on_unsupported_protocol ( acl_access **  access)
static

Definition at line 5005 of file cache_cf.cc.

References free_acl_access().

static void free_peer ( CachePeer **  P)
static

Definition at line 2379 of file cache_cf.cc.

References Config, SquidConfig::npeers, and NULL.

static void free_refreshpattern ( RefreshPattern **  head)
static

Definition at line 2890 of file cache_cf.cc.

References head, and refresh_nocache_hack.

static void free_removalpolicy ( RemovalPolicySettings **  settings)
static

Definition at line 3246 of file cache_cf.cc.

References free_string(), free_wordlist, and NULL.

Referenced by parse_removalpolicy().

static void free_SBufList ( SBufList list)
static

Definition at line 1345 of file cache_cf.cc.

static void free_size_t ( size_t var)
static

Definition at line 3099 of file cache_cf.cc.

static void free_ssize_t ( ssize_t *  var)
static

Definition at line 3105 of file cache_cf.cc.

static void free_sslproxy_cert_adapt ( sslproxy_cert_adapt **  cert_adapt)
static
static void free_sslproxy_cert_sign ( sslproxy_cert_sign **  cert_sign)
static
static void free_sslproxy_ssl_bump ( acl_access **  ssl_bump)
static

Definition at line 4716 of file cache_cf.cc.

References free_acl_access().

static void free_string ( char **  var)
static

Definition at line 2923 of file cache_cf.cc.

References safe_free.

Referenced by free_removalpolicy().

static void free_time_msec ( time_msec_t var)
static

Definition at line 3011 of file cache_cf.cc.

static void free_time_t ( time_t *  var)
static

Definition at line 2990 of file cache_cf.cc.

static void free_u_short ( unsigned short *  u)
static

Definition at line 3130 of file cache_cf.cc.

void free_YesNoNone ( YesNoNone )
inline

Definition at line 3289 of file cache_cf.cc.

static unsigned short GetService ( const char *  proto)
static
Parameters
proto'tcp' or 'udp' for protocol
Returns
Port the named service is supposed to be listening on.

Parses a port number or service name from the squid.conf

Returns either the service port number from /etc/services

Or a numeric translation of the config text.

Definition at line 2084 of file cache_cf.cc.

References getservbyname(), isUnsignedNumeric(), ConfigParser::NextToken(), NULL, port, servent::s_port, self_destruct(), and xatos().

Referenced by GetTcpService(), and GetUdpService().

unsigned short GetTcpService ( void  )
inline
Returns
Port the named TCP service is supposed to be listening on.
Parameters
proto'tcp' or 'udp' for protocol
Returns
Port the named service is supposed to be listening on.

Definition at line 2108 of file cache_cf.cc.

References GetService().

Referenced by parse_peer().

unsigned short GetUdpService ( void  )
inline
Returns
Port the named UDP service is supposed to be listening on.
Parameters
proto'tcp' or 'udp' for protocol
Returns
Port the named service is supposed to be listening on.

Definition at line 2118 of file cache_cf.cc.

References GetService().

Referenced by parse_peer().

static bool isUnsignedNumeric ( const char *  str,
size_t  len 
)
static

utility function to prevent getservbyname() being called with a numeric value on Windows at least it returns garage results.

Definition at line 2068 of file cache_cf.cc.

References len.

Referenced by GetService().

static void parse_access_log ( CustomLog **  logs)
static

We support several access_log configuration styles:

#1: Deprecated ancient style without an explicit logging module: access_log /var/log/access.log

#2: The "none" logging module (i.e., no logging [of matching transactions]): access_log none [acl ...]

#3: Configurable logging module without named options: Logformat or the first ACL name, whichever comes first, may not contain '='. If no explicit logformat name is given, the first ACL name, if any, should not be an existing logformat name or it will be treated as such. access_log module:place [logformat_name] [acl ...]

#4: Configurable logging module with name=value options such as logformat=x: The first ACL name may not contain '='. access_log module:place [option ...] [acl ...]

Definition at line 4003 of file cache_cf.cc.

References CustomLog::aclList, aclParseAclList(), B_BYTES_STR, CustomLog::bufferSize, Log::Format::CLF_NONE, Log::Format::CLF_UNKNOWN, DBG_CRITICAL, debugs, CustomLog::fatal, CustomLog::filename, MAX_URL, CustomLog::next, ConfigParser::NextToken(), NULL, parseBytesOptionValue(), ConfigParser::PeekAtToken(), CustomLog::rotateCount, self_destruct(), setLogformat(), CustomLog::type, xatoi(), xcalloc, xfree, and xstrdup.

static void parse_acl ( ACL **  ae)
static

Definition at line 1369 of file cache_cf.cc.

References ACL::ParseAclLine().

static void parse_acl_access ( acl_access **  head)
static

Definition at line 1394 of file cache_cf.cc.

References aclParseAccessLine(), and cfg_directive.

static void parse_acl_address ( Acl::Address **  head)
static
static void parse_acl_b_size_t ( AclSizeLimit **  head)
static
static void parse_acl_tos ( acl_tos **  head)
static
static void parse_adaptation_access_type ( )
static

Definition at line 4333 of file cache_cf.cc.

References Adaptation::Config::ParseAccess().

static void parse_adaptation_service_chain_type ( )
static

Definition at line 4327 of file cache_cf.cc.

References Adaptation::Config::ParseServiceChain().

static void parse_adaptation_service_set_type ( )
static

Definition at line 4321 of file cache_cf.cc.

References Adaptation::Config::ParseServiceSet().

static void parse_address ( Ip::Address addr)
static
static void parse_authparam ( Auth::ConfigVector config)
static
static void parse_b_int64_t ( int64_t *  var)
static

Definition at line 3087 of file cache_cf.cc.

References B_BYTES_STR, and parseBytesLine64().

Referenced by parse_acl_b_size_t().

static void parse_b_size_t ( size_t var)
static

Definition at line 3067 of file cache_cf.cc.

References B_BYTES_STR, and parseBytesLine().

static void parse_b_ssize_t ( ssize_t *  var)
static

Definition at line 3073 of file cache_cf.cc.

References B_BYTES_STR, and parseBytesLineSigned().

static void parse_client_delay_pool_access ( ClientDelayConfig cfg)
static

Definition at line 1719 of file cache_cf.cc.

References ClientDelayConfig::parsePoolAccess().

static void parse_client_delay_pool_count ( ClientDelayConfig cfg)
static

Definition at line 1707 of file cache_cf.cc.

References ClientDelayConfig::parsePoolCount().

static void parse_client_delay_pool_rates ( ClientDelayConfig cfg)
static

Definition at line 1713 of file cache_cf.cc.

References ClientDelayConfig::parsePoolRates().

static void parse_configuration_includes_quoted_values ( bool *  recognizeQuotedValues)
static
static void parse_CpuAffinityMap ( CpuAffinityMap **const  cpuAffinityMap)
static

Definition at line 4262 of file cache_cf.cc.

References DBG_CRITICAL, debugs, ConfigParser::NextToken(), and self_destruct().

static void parse_delay_pool_access ( DelayConfig cfg)
static

Definition at line 1676 of file cache_cf.cc.

References DelayConfig::parsePoolAccess().

static void parse_delay_pool_class ( DelayConfig cfg)
static

Definition at line 1664 of file cache_cf.cc.

References DelayConfig::parsePoolClass().

static void parse_delay_pool_count ( DelayConfig cfg)
static

Definition at line 1658 of file cache_cf.cc.

References DelayConfig::parsePoolCount().

static void parse_delay_pool_rates ( DelayConfig cfg)
static

Definition at line 1670 of file cache_cf.cc.

References DelayConfig::parsePoolRates().

static void parse_denyinfo ( AclDenyInfoList **  var)
static

Definition at line 2461 of file cache_cf.cc.

References aclParseDenyInfoLine().

static void parse_ecap_service_type ( Adaptation::Ecap::Config cfg)
static

Definition at line 4380 of file cache_cf.cc.

References Adaptation::Config::parseService().

void parse_eol ( char *volatile *  var)
static void parse_http_header_replace ( HeaderManglers **  manglers)
static
static void parse_icap_access_type ( )
static

Definition at line 4368 of file cache_cf.cc.

References DBG_CRITICAL, debugs, and Adaptation::Config::ParseAccess().

static void parse_icap_class_type ( )
static

Definition at line 4360 of file cache_cf.cc.

References DBG_CRITICAL, debugs, and Adaptation::Config::ParseServiceSet().

static void parse_icap_service_type ( Adaptation::Icap::Config cfg)
static

Definition at line 4342 of file cache_cf.cc.

References Adaptation::Config::parseService().

void parse_int ( int var)

Definition at line 2533 of file cache_cf.cc.

References GetInteger(), and i.

Referenced by parse_obsolete(), and parse_pipelinePrefetch().

void parse_int64_t ( int64_t *  var)

Definition at line 2553 of file cache_cf.cc.

References GetInteger64(), and i.

static void parse_IpAddress_list ( Ip::Address_list **  head)
static
static void parse_kb_int64_t ( int64_t *  var)
static

Definition at line 3093 of file cache_cf.cc.

References B_KBYTES_STR, and parseBytesLine64().

static int parse_line ( char *  )
static
static void parse_note ( Notes notes)
static

Definition at line 4788 of file cache_cf.cc.

References assert, and Notes::parse().

void parse_obsolete ( const char *  name)
static

Parse a line containing an obsolete directive. To upgrade it where possible instead of just "Bungled config" for directives which cannot be marked as simply aliases of the some name. For example if the parameter order and content has changed. Or if the directive has been completely removed.

Definition at line 974 of file cache_cf.cc.

References SBuf::append(), SBuf::c_str(), SquidConfig::cache_miss_revalidate, Helper::ChildConfig::concurrency, Config, DBG_CRITICAL, debugs, ConfigParser::NextQuotedOrToEol(), SquidConfig::onoff, Security::PeerOptions::parse(), parse_int(), parse_onoff(), Security::ProxyOutgoingConfig, SquidConfig::redirectChildren, and self_destruct().

static void parse_on_unsupported_protocol ( acl_access **  access)
static
static void parse_peer ( CachePeer **  head)
static

Definition at line 2124 of file cache_cf.cc.

References CachePeer::allow_miss, CachePeer::auth_no_keytab, CachePeer::background_ping, CachePeer::basetime, CachePeer::carp, CachePeer::carp_key, cbdataReference, CachePeer::closest_only, Config, CachePeer::connect_fail_limit, CachePeer::connect_timeout_raw, CachePeer::connection_auth, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, CachePeer::default_parent, CachePeer::digest, CachePeer::digest_url, CachePeer::domain, fatalf(), CachePeer::front_end_https, GetTcpService(), GetUdpService(), CachePeer::host, CachePeer::htcp, CachePeer::htcp_forward_clr, CachePeer::htcp_no_clr, CachePeer::htcp_no_purge_clr, CachePeer::htcp_oldsquid, CachePeer::htcp_only_clr, CachePeer::http_port, CachePeer::icp, CachePeer::index, key, CachePeer::limit, CachePeer::login, CachePeer::max_conn, CachePeer::mcast, CachePeer::mcast_responder, CachePeer::mcast_siblings, CachePeer::name, CachePeer::next, ConfigParser::NextToken(), CachePeer::no_delay, CachePeer::no_digest, CachePeer::no_netdb_exchange, CachePeer::no_query, CachePeer::no_tproxy, SquidConfig::npeers, NULL, CachePeer::options, CachePeer::originserver, p, Security::PeerOptions::parse(), parseNeighborType(), PEER_MULTICAST, PEER_PARENT, peerClearRRStart(), peerDigestCreate(), peerFindByName(), CachePeer::icp_::port, CachePeer::proxy_only, rfc1738_unescape(), CachePeer::roundrobin, safe_free, CachePeer::secure, self_destruct(), CachePeer::sourcehash, CachePeer::standby, CachePeer::ttl, CachePeer::type, CachePeer::userhash, CachePeer::weight, CachePeer::weighted_roundrobin, xatoi(), and xstrdup.

static void parse_peer_access ( void  )
static
void parse_pipelinePrefetch ( int var)
static void parse_removalpolicy ( RemovalPolicySettings **  settings)
static

Definition at line 3261 of file cache_cf.cc.

References free_removalpolicy(), parse_string(), and parse_wordlist().

static void parse_SBufList ( SBufList list)
static

Definition at line 1316 of file cache_cf.cc.

References ConfigParser::NextQuotedToken().

static void parse_string ( char **  var)
static

Definition at line 2909 of file cache_cf.cc.

References ConfigParser::NextToken(), safe_free, self_destruct(), and xstrdup.

Referenced by parse_cachemgrpasswd(), and parse_removalpolicy().

void parse_time_msec ( time_msec_t var)

Definition at line 3005 of file cache_cf.cc.

References parseTimeLine(), and T_SECOND_STR.

void parse_time_t ( time_t *  var)

Definition at line 2982 of file cache_cf.cc.

References parseTimeLine(), and T_SECOND_STR.

static void parse_TokenOrQuotedString ( char **  var)
static

Definition at line 2959 of file cache_cf.cc.

References ConfigParser::NextQuotedToken(), safe_free, self_destruct(), and xstrdup.

static void parse_tristate ( int var)
static
static void parse_u_short ( unsigned short *  var)
static

Definition at line 3136 of file cache_cf.cc.

References ConfigParser::ParseUShort().

static void parse_YesNoNone ( YesNoNone option)
static

Definition at line 3293 of file cache_cf.cc.

References YesNoNone::configure(), and parse_onoff().

static void ParseAclWithAction ( acl_access **  access,
const allow_t action,
const char *  desc,
ACL acl = nullptr 
)
static
static void parseBytesLine ( size_t bptr,
const char *  units 
)
static
static void parseBytesLine64 ( int64_t *  bptr,
const char *  units 
)
static
static void parseBytesLineSigned ( ssize_t *  bptr,
const char *  units 
)
static
void parseBytesOptionValue ( size_t bptr,
const char *  units,
char const *  value 
)

Parse bytes from a string. Similar to the parseBytesLine function but parses the string value instead of the current token value.

Definition at line 1264 of file cache_cf.cc.

References String::limitInit(), parseBytesUnits(), self_destruct(), String::termedBuf(), and xatoi().

Referenced by Security::ServerOptions::parse(), and parse_access_log().

static size_t parseBytesUnits ( const char *  unit)
static
int parseConfigFile ( const char *  file_name)

Definition at line 612 of file cache_cf.cc.

References DBG_CRITICAL, debugs, parseConfigFileOrThrow(), and self_destruct().

Referenced by mainReconfigureFinish(), and SquidMain().

static int parseManyConfigFiles ( char *  files,
int  depth 
)
static

Definition at line 279 of file cache_cf.cc.

References fatalf(), i, int, NULL, parseOneConfigFile(), strwordtok(), and xstrerr().

Referenced by parseOneConfigFile().

peer_t parseNeighborType ( const char *  s)
static

Definition at line 3356 of file cache_cf.cc.

References DBG_CRITICAL, debugs, PEER_MULTICAST, PEER_PARENT, and PEER_SIBLING.

Referenced by parse_hostdomaintype(), and parse_peer().

static AnyP::ProtocolVersion parsePortProtocol ( const SBuf value)
static

parses the protocol= option of the *_port directive, returning parsed value unsupported option values result in a fatal error message upper case values required; caller may convert for backward compatibility

Definition at line 3522 of file cache_cf.cc.

References cfg_directive, SBuf::cmp(), fatalf(), AnyP::PROTO_HTTPS, Http::ProtocolVersion(), Ftp::ProtocolVersion(), SQUIDSBUFPH, and SQUIDSBUFPRINT.

Referenced by add_http_port(), parse_port_option(), and parsePortCfg().

static void parsePortSpecification ( const AnyP::PortCfgPointer s,
char *  token 
)
static
static void parseTimeLine ( time_msec_t tptr,
const char *  units,
bool  allowMsec,
bool  expectMoreArguments = false 
)
static
static uint64_t parseTimeUnits ( const char *  unit,
bool  allowMsec 
)
static
static const char* peer_type_str ( const peer_t  type)
static

Definition at line 2005 of file cache_cf.cc.

References PEER_MULTICAST, PEER_PARENT, and PEER_SIBLING.

Referenced by dump_peer().

static void ProcessMacros ( char *&  line,
int len 
)
static

Definition at line 338 of file cache_cf.cc.

References SBuf::c_str(), KidIdentifier, service_name, SubstituteMacro(), TheKidName, and xitoa().

Referenced by parseOneConfigFile().

static void ReplaceSubstr ( char *&  str,
int len,
unsigned  substrIdx,
unsigned  substrLen,
const char *  newSubstr 
)
static

Definition at line 309 of file cache_cf.cc.

References assert, and NULL.

Referenced by SubstituteMacro().

void requirePathnameExists ( const char *  name,
const char *  path 
)
RunnerRegistrationEntry ( sslBumpCfgRr  )
void self_destruct ( void  )

Definition at line 255 of file cache_cf.cc.

References ConfigParser::destruct().

Referenced by aclDomainCompare(), configDoConfigure(), dump_wccp2_amethod(), dump_wccp2_method(), errorDynamicPageInfoCreate(), acl_ip_data::FactoryParse(), GetInteger(), GetInteger64(), GetPercentage(), GetService(), GetShort(), Acl::InnerNode::lineParse(), mainReconfigureFinish(), Acl::Make(), ConfigParser::NextToken(), Fs::Ufs::UFSSwapDir::optionIOParse(), Store::Disk::optionObjectSizeParse(), DelaySpec::parse(), ACLAdaptationServiceData::parse(), ACLIntRange::parse(), ACLSquidErrorData::parse(), ACLTimeData::parse(), ACLHasComponentData::parse(), ACLAnnotationData::parse(), IcmpConfig::parse(), ACLAtStepData::parse(), ACLCertificateData::parse(), Security::ServerOptions::parse(), ACLExternal::parse(), Auth::SchemeConfig::parse(), parse_access_log(), parse_acl_tos(), parse_address(), parse_authparam(), parse_AuthSchemes(), parse_cachedir(), parse_CpuAffinityMap(), parse_eol(), parse_externalAclHelper(), parse_ftp_epsv(), parse_HeaderWithAclList(), parse_hostdomaintype(), parse_icap_service_failure_limit(), parse_IpAddress_list(), parse_memcachemode(), parse_obsolete(), parse_on_unsupported_protocol(), parse_onoff(), parse_peer(), parse_peer_access(), parse_pipelinePrefetch(), parse_port_option(), parse_refreshpattern(), parse_sslproxy_cert_adapt(), parse_sslproxy_cert_sign(), parse_sslproxy_ssl_bump(), parse_string(), parse_TokenOrQuotedString(), parse_tristate(), parse_uri_whitespace(), parse_UrlHelperTimeout(), parse_wccp2_amethod(), parse_wccp2_method(), parse_wccp2_service(), parse_wccp2_service_info(), ConfigParser::ParseBool(), parseBytesLine(), parseBytesLine64(), parseBytesLineSigned(), parseBytesOptionValue(), ACLHasComponentData::parseComponent(), Helper::ChildConfig::parseConfig(), parseConfigFile(), Ip::Qos::Config::parseConfigLine(), Log::LogConfig::parseFormats(), Format::FmtConfig::parseFormats(), XactionInitiator::ParseInitiators(), Store::Disk::parseOptions(), parsePortCfg(), parsePortSpecification(), Rock::SwapDir::parseRateOption(), MessageDelayConfig::parseResponseDelayPool(), Rock::SwapDir::parseSizeOption(), parseTimeLine(), Rock::SwapDir::parseTimeOption(), ConfigParser::RegexPattern(), ConfigParser::RegexStrtokFile(), setLogformat(), ConfigParser::TokenParse(), ConfigParser::UnQuote(), xatof(), xatoi(), xatol(), xatoll(), xatos(), and xatoui().

static void SetConfigFilename ( char const *  file_name,
bool  is_pipe 
)
static

Definition at line 261 of file cache_cf.cc.

References cfg_filename.

Referenced by parseOneConfigFile().

static const char* skip_ws ( const char *  s)
static

Definition at line 270 of file cache_cf.cc.

References xisspace.

Referenced by EvalBoolExpr(), FindStatement(), and parseOneConfigFile().

static bool StrToInt ( const char *  str,
long &  number 
)
static

Definition at line 375 of file cache_cf.cc.

References assert, and NULL.

Referenced by EvalBoolExpr().

static void SubstituteMacro ( char *&  line,
int len,
const char *  macroName,
const char *  substStr 
)
static

Definition at line 327 of file cache_cf.cc.

References assert, NULL, and ReplaceSubstr().

Referenced by ProcessMacros().

static void trim_trailing_ws ( char *  str)
static

Definition at line 346 of file cache_cf.cc.

References assert, i, NULL, and xisspace.

Referenced by EvalBoolExpr(), and parseOneConfigFile().

Variable Documentation

const char* const B_BYTES_STR = "bytes"
static
const char* const B_GBYTES_STR = "GB"
static

Definition at line 149 of file cache_cf.cc.

Referenced by parseBytesUnits().

const char* const B_KBYTES_STR = "KB"
static

Definition at line 147 of file cache_cf.cc.

Referenced by dump_kb_int64_t(), parse_kb_int64_t(), and parseBytesUnits().

const char* const B_MBYTES_STR = "MB"
static

Definition at line 148 of file cache_cf.cc.

Referenced by parseBytesUnits().

OBJH dump_config
static

Definition at line 175 of file cache_cf.cc.

Referenced by parseConfigFileOrThrow().

bool FtpEspvDeprecated = false
static

Definition at line 4804 of file cache_cf.cc.

ConfigParser LegacyParser = ConfigParser()
static
const char* const list_sep = ", \t\n\r"
static

Definition at line 151 of file cache_cf.cc.

const char* const T_DAY_STR = "day"
static

Definition at line 139 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_DECADE_STR = "decade"
static

Definition at line 144 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_FORTNIGHT_STR = "fortnight"
static

Definition at line 141 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_HOUR_STR = "hour"
static

Definition at line 138 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_MILLISECOND_STR = "millisecond"
static

Definition at line 135 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_MINUTE_STR = "minute"
static

Definition at line 137 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_MONTH_STR = "month"
static

Definition at line 142 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_SECOND_STR = "second"
static

Definition at line 136 of file cache_cf.cc.

Referenced by parse_time_msec(), parse_time_t(), parse_UrlHelperTimeout(), and parseTimeUnits().

const char* const T_WEEK_STR = "week"
static

Definition at line 140 of file cache_cf.cc.

Referenced by parseTimeUnits().

const char* const T_YEAR_STR = "year"
static

Definition at line 143 of file cache_cf.cc.

Referenced by parseTimeUnits().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors