#include <Random.h>

Inheritance diagram for ACLRandom:
Collaboration diagram for ACLRandom:

Public Types

using Pointer = RefCount< Node >
 

Public Member Functions

 ACLRandom (char const *)
 
 ~ACLRandom () override
 
const char * typeString () const override
 
void parse () override
 parses node representation in squid.conf; dies on failures More...
 
int match (ACLChecklist *checklist) override
 Matches the actual data in checklist against this Acl::Node. More...
 
SBufList dump () const override
 
bool empty () const override
 
bool valid () const override
 
void * operator new (size_t)
 
void operator delete (void *)
 
void context (const SBuf &aName, const char *configuration)
 sets user-specified ACL name and squid.conf context More...
 
bool matches (ACLChecklist *checklist) const
 
void parseFlags ()
 configures Acl::Node options, throwing on configuration errors More...
 
virtual bool isProxyAuth () const
 
int cacheMatchAcl (dlink_list *cache, ACLChecklist *)
 
virtual int matchForCache (ACLChecklist *checklist)
 
virtual void prepareForUse ()
 
void dumpWhole (const char *directiveName, std::ostream &)
 

Static Public Member Functions

static void ParseNamedAcl (ConfigParser &, NamedAcls *&)
 parses acl directive parts that follow directive name (i.e. "acl") More...
 
static void Initialize ()
 
static Acl::NodeFindByName (const SBuf &)
 A configured ACL with a given name or nil. More...
 

Public Attributes

SBuf name
 
char * cfgline = nullptr
 

Protected Attributes

double data
 
char pattern [256]
 
const char * class_
 

Private Member Functions

 MEMPROXY_CLASS (ACLRandom)
 
virtual bool requiresAle () const
 whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry More...
 
virtual bool requiresRequest () const
 whether our (i.e. shallow) match() requires checklist to have a request More...
 
virtual bool requiresReply () const
 whether our (i.e. shallow) match() requires checklist to have a reply More...
 
virtual const Acl::Optionsoptions ()
 
virtual const Acl::OptionslineOptions ()
 

Static Private Member Functions

static void ParseNamed (ConfigParser &, NamedAcls &, const SBuf &name)
 parses acl directive parts that follow aclname More...
 

Detailed Description

Definition at line 14 of file Random.h.

Member Typedef Documentation

◆ Pointer

using Acl::Node::Pointer = RefCount<Node>
inherited

Definition at line 29 of file Node.h.

Constructor & Destructor Documentation

◆ ACLRandom()

ACLRandom::ACLRandom ( char const *  theClass)

Definition at line 20 of file Random.cc.

References pattern.

◆ ~ACLRandom()

ACLRandom::~ACLRandom ( )
override

Definition at line 25 of file Random.cc.

Member Function Documentation

◆ cacheMatchAcl()

◆ context()

void Acl::Node::context ( const SBuf aName,
const char *  configuration 
)
inherited

Definition at line 220 of file Acl.cc.

References safe_free, and xstrdup.

Referenced by aclParseAccessLine(), aclParseAclList(), Acl::AllOf::parse(), and ParseAclWithAction().

◆ dump()

SBufList ACLRandom::dump ( ) const
overridevirtual

Implements Acl::Node.

Definition at line 109 of file Random.cc.

References pattern.

◆ dumpWhole()

void Acl::Node::dumpWhole ( const char *  directiveName,
std::ostream &  os 
)
inherited

Prints aggregated "acl" (or similar) directive configuration, including the given directive name, ACL name, ACL type, and ACL parameters. The printed parameters are collected from all same-name "acl" directives.

Definition at line 371 of file Acl.cc.

References asList().

◆ empty()

bool ACLRandom::empty ( ) const
overridevirtual

Implements Acl::Node.

Definition at line 35 of file Random.cc.

References data.

Referenced by valid().

◆ FindByName()

Acl::Node * Acl::Node::FindByName ( const SBuf name)
staticinherited

◆ Initialize()

void Acl::Node::Initialize ( )
staticinherited

Definition at line 471 of file Acl.cc.

References Config, debugs, and SquidConfig::namedAcls.

Referenced by serverConnectionsOpen().

◆ isProxyAuth()

bool Acl::Node::isProxyAuth ( ) const
virtualinherited

Reimplemented in ACLExternal, and ACLProxyAuth.

Definition at line 354 of file Acl.cc.

◆ lineOptions()

◆ match()

int ACLRandom::match ( ACLChecklist checklist)
overridevirtual

Implements Acl::Node.

Definition at line 93 of file Random.cc.

References data, debugs, Acl::Node::name, and pattern.

◆ matches()

bool Acl::Node::matches ( ACLChecklist checklist) const
inherited

Orchestrates matching checklist against the Acl::Node using match(), after checking preconditions and while providing debugging.

Returns
true if and only if there was a successful match. Updates the checklist state on match, async, and failure.

Definition at line 189 of file Acl.cc.

References ACLChecklist::asyncInProgress(), DBG_IMPORTANT, debugs, ACLChecklist::hasAle(), ACLChecklist::hasReply(), ACLChecklist::hasRequest(), ACLChecklist::setLastCheckedName(), and ACLChecklist::verifyAle().

Referenced by ACLChecklist::matchAndFinish().

◆ matchForCache()

int Acl::Node::matchForCache ( ACLChecklist checklist)
virtualinherited

Reimplemented in ACLProxyAuth.

Definition at line 383 of file Acl.cc.

References fatal().

◆ MEMPROXY_CLASS()

ACLRandom::MEMPROXY_CLASS ( ACLRandom  )
private

◆ operator delete()

void Acl::Node::operator delete ( void *  )
inherited

Definition at line 153 of file Acl.cc.

References fatal().

◆ operator new()

void * Acl::Node::operator new ( size_t  )
inherited

Definition at line 147 of file Acl.cc.

References fatal().

◆ options()

virtual const Acl::Options& Acl::Node::options ( )
inlineprivatevirtualinherited
Returns
(linked) 'global' Options supported by this Acl::Node

Reimplemented in Acl::ServerNameCheck, Acl::DestinationDomainCheck, Acl::AnnotationCheck, ACLMaxUserIP, and ACLDestinationIP.

Definition at line 98 of file Node.h.

References Acl::NoOptions().

◆ parse()

void ACLRandom::parse ( )
overridevirtual

◆ parseFlags()

void Acl::Node::parseFlags ( )
inherited

Definition at line 360 of file Acl.cc.

References Acl::ParseFlags().

◆ ParseNamed()

void Acl::Node::ParseNamed ( ConfigParser parser,
NamedAcls namedAcls,
const SBuf name 
)
staticprivateinherited

◆ ParseNamedAcl()

void Acl::Node::ParseNamedAcl ( ConfigParser parser,
NamedAcls *&  namedAcls 
)
staticinherited

◆ prepareForUse()

◆ requiresAle()

bool Acl::Node::requiresAle ( ) const
privatevirtualinherited

Reimplemented in ACLExternal.

Definition at line 443 of file Acl.cc.

◆ requiresReply()

bool Acl::Node::requiresReply ( ) const
privatevirtualinherited

Reimplemented in ACLHTTPStatus, Acl::ReplyHeaderCheck< header >, and Acl::HttpRepHeaderCheck.

Definition at line 449 of file Acl.cc.

◆ requiresRequest()

◆ typeString()

const char * ACLRandom::typeString ( ) const
overridevirtual

Implements Acl::Node.

Definition at line 29 of file Random.cc.

References class_.

◆ valid()

bool ACLRandom::valid ( ) const
overridevirtual

Reimplemented from Acl::Node.

Definition at line 41 of file Random.cc.

References empty().

Member Data Documentation

◆ cfgline

char* Acl::Node::cfgline = nullptr
inherited

Definition at line 83 of file Node.h.

◆ class_

const char* ACLRandom::class_
protected

Definition at line 32 of file Random.h.

Referenced by typeString().

◆ data

double ACLRandom::data
protected

Definition at line 30 of file Random.h.

Referenced by empty(), match(), and parse().

◆ name

SBuf Acl::Node::name
inherited

Either aclname parameter from the explicitly configured acl directive or a label generated for an internal ACL tree node. All Node objects corresponding to one Squid configuration have unique names. See also: context() and FindByName().

Definition at line 81 of file Node.h.

Referenced by aclDestroyAccessList(), Acl::AnnotateClientCheck::match(), Acl::AnnotateTransactionCheck::match(), match(), Acl::SourceDomainCheck::match(), ACLDestinationIP::match(), Acl::NotNode::NotNode(), ACLExternal::parse(), and ACLMaxConnection::prepareForUse().

◆ pattern

char ACLRandom::pattern[256]
protected

Definition at line 31 of file Random.h.

Referenced by ACLRandom(), dump(), match(), and parse().


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

 

Introduction

Documentation

Support

Miscellaneous