#include <BoolOps.h>

Inheritance diagram for Acl::AndNode:
Collaboration diagram for Acl::AndNode:

Public Member Functions

virtual char const * typeString () const
 
virtual ACLclone () const
 
virtual void parse ()
 parses node representation in squid.conf; dies on failures More...
 
bool resumeMatchingAt (ACLChecklist *checklist, Acl::Nodes::const_iterator pos) const
 Resumes matching (suspended by an async call) at the given position. More...
 
Nodes::size_type childrenCount () const
 the number of children nodes More...
 
virtual void prepareForUse ()
 
virtual bool empty () const
 
virtual SBufList dump () const
 
size_t lineParse ()
 
void add (ACL *node)
 appends the node to the collection and takes control over it More...
 
void * operator new (size_t)
 
void operator delete (void *)
 
void context (const char *name, const char *configuration)
 sets user-specified ACL name and squid.conf context More...
 
bool matches (ACLChecklist *checklist) const
 
virtual const Acl::Optionsoptions ()
 
virtual void parseFlags ()
 configures ACL options, throwing on configuration errors More...
 
virtual bool isProxyAuth () const
 
virtual bool valid () const
 
int cacheMatchAcl (dlink_list *cache, ACLChecklist *)
 
virtual int matchForCache (ACLChecklist *checklist)
 
SBufList dumpOptions ()
 

Static Public Member Functions

static void ParseAclLine (ConfigParser &parser, ACL **head)
 
static void Initialize ()
 
static ACLFindByName (const char *name)
 

Public Attributes

char name [ACL_NAME_SZ]
 
char * cfgline
 
ACLnext
 
bool registered
 added to the global list of ACLs via aclRegister() More...
 

Protected Member Functions

virtual int match (ACLChecklist *checklist)
 Matches the actual data in checklist against this ACL. More...
 

Protected Attributes

std::vector< ACL * > nodes
 children nodes of this intermediate node More...
 

Private Member Functions

 MEMPROXY_CLASS (AndNode)
 
virtual int doMatch (ACLChecklist *checklist, Nodes::const_iterator start) const
 
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...
 

Detailed Description

An inner ACL expression tree node representing a boolean conjunction (AND) operator applied to a list of child tree nodes. For example, conditions expressed on a single http_access line are ANDed.

Definition at line 43 of file BoolOps.h.

Member Function Documentation

◆ add()

void Acl::InnerNode::add ( ACL node)
inherited

Definition at line 35 of file InnerNode.cc.

References aclRegister(), assert, and NULL.

Referenced by Acl::NotNode::NotNode(), Acl::Tree::add(), Acl::AllOf::parse(), and ParseAclWithAction().

◆ cacheMatchAcl()

◆ childrenCount()

Nodes::size_type Acl::InnerNode::childrenCount ( ) const
inlineinherited

Definition at line 30 of file InnerNode.h.

References Acl::InnerNode::nodes.

Referenced by Acl::AllOf::parse().

◆ clone()

ACL * Acl::AndNode::clone ( ) const
virtual

Definition at line 82 of file BoolOps.cc.

◆ context()

void ACL::context ( const char *  name,
const char *  configuration 
)
inherited

◆ doMatch()

int Acl::AndNode::doMatch ( ACLChecklist checklist,
Nodes::const_iterator  start 
) const
privatevirtual

checks whether the nodes match, starting with the given one kids determine what a match means for their type of intermediate nodes

Implements Acl::InnerNode.

Definition at line 88 of file BoolOps.cc.

References ACLChecklist::keepMatching(), and ACLChecklist::matchChild().

◆ dump()

SBufList Acl::InnerNode::dump ( ) const
virtualinherited

Implements ACL.

Reimplemented in Acl::NotNode, and Acl::AllOf.

Definition at line 80 of file InnerNode.cc.

◆ dumpOptions()

SBufList ACL::dumpOptions ( )
inherited
Returns
approximate options configuration

Definition at line 296 of file Acl.cc.

References SBufStream::buf(), SBuf::isEmpty(), and ACL::options().

Referenced by dump_acl().

◆ empty()

bool Acl::InnerNode::empty ( ) const
virtualinherited

Implements ACL.

Definition at line 29 of file InnerNode.cc.

Referenced by aclParseAccessLine().

◆ FindByName()

ACL * ACL::FindByName ( const char *  name)
staticinherited

◆ Initialize()

void ACL::Initialize ( )
staticinherited

Definition at line 404 of file Acl.cc.

References SquidConfig::aclList, Config, debugs, ACL::next, and ACL::prepareForUse().

Referenced by serverConnectionsOpen().

◆ isProxyAuth()

bool ACL::isProxyAuth ( ) const
virtualinherited

Reimplemented in ACLIdent, ACLExternal, and ACLProxyAuth.

Definition at line 283 of file Acl.cc.

Referenced by aclIsProxyAuth().

◆ lineParse()

size_t Acl::InnerNode::lineParse ( )
inherited

parses a [ [!]acl1 [!]acl2... ] sequence, appending to nodes

Returns
the number of parsed ACL names

Definition at line 44 of file InnerNode.cc.

References config_input_line, DBG_CRITICAL, debugs, ACL::FindByName(), NULL, self_destruct(), ConfigParser::strtokFile(), and xstrdup.

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

◆ match()

int Acl::InnerNode::match ( ACLChecklist checklist)
protectedvirtualinherited

Implements ACL.

Definition at line 89 of file InnerNode.cc.

◆ matches()

bool ACL::matches ( ACLChecklist checklist) const
inherited

Orchestrates matching checklist against the ACL 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 120 of file Acl.cc.

References AclMatchedName, ACLChecklist::asyncInProgress(), DBG_IMPORTANT, debugs, ACLChecklist::hasAle(), ACLChecklist::hasReply(), ACLChecklist::hasRequest(), ACL::match(), ACL::name, ACL::requiresAle(), ACL::requiresReply(), ACL::requiresRequest(), and ACLChecklist::verifyAle().

Referenced by ACLChecklist::matchAndFinish(), and ACLChecklist::matchChild().

◆ matchForCache()

int ACL::matchForCache ( ACLChecklist checklist)
virtualinherited

Reimplemented in ACLProxyAuth.

Definition at line 315 of file Acl.cc.

References fatal().

Referenced by ACL::cacheMatchAcl().

◆ MEMPROXY_CLASS()

Acl::AndNode::MEMPROXY_CLASS ( AndNode  )
private

◆ operator delete()

void ACL::operator delete ( void *  )
inherited

Definition at line 86 of file Acl.cc.

References fatal().

◆ operator new()

void * ACL::operator new ( size_t  )
inherited

Definition at line 79 of file Acl.cc.

References fatal().

◆ options()

virtual const Acl::Options& ACL::options ( )
inlinevirtualinherited
Returns
(linked) Options supported by this ACL

Reimplemented in ACLMaxUserIP, ACLStrategised< M >, and ACLDestinationIP.

Definition at line 63 of file Acl.h.

References Acl::NoOptions().

Referenced by ACL::dumpOptions(), and ACL::parseFlags().

◆ parse()

void Acl::AndNode::parse ( )
virtual

Implements ACL.

Definition at line 101 of file BoolOps.cc.

References assert.

◆ ParseAclLine()

◆ parseFlags()

void ACL::parseFlags ( )
virtualinherited

Reimplemented in ACLIdent, ACLProxyAuth, ACLStrategised< M >, and ACLExtUser.

Definition at line 289 of file Acl.cc.

References Acl::NoFlags(), ACL::options(), and Acl::ParseFlags().

◆ prepareForUse()

void Acl::InnerNode::prepareForUse ( )
virtualinherited

Reimplemented from ACL.

Definition at line 22 of file InnerNode.cc.

References Acl::InnerNode::nodes.

◆ requiresAle()

bool ACL::requiresAle ( ) const
privatevirtualinherited

Reimplemented in ACLExternal.

Definition at line 375 of file Acl.cc.

Referenced by ACL::matches().

◆ requiresReply()

bool ACL::requiresReply ( ) const
privatevirtualinherited

Reimplemented in ACLStrategised< M >, and ACLHTTPStatus.

Definition at line 381 of file Acl.cc.

Referenced by ACL::matches().

◆ requiresRequest()

bool ACL::requiresRequest ( ) const
privatevirtualinherited

Reimplemented in ACLExternal, ACLProxyAuth, ACLMaxUserIP, Acl::TransactionInitiator, and ACLStrategised< M >.

Definition at line 387 of file Acl.cc.

Referenced by ACL::matches().

◆ resumeMatchingAt()

bool Acl::InnerNode::resumeMatchingAt ( ACLChecklist checklist,
Acl::Nodes::const_iterator  pos 
) const
inherited

Definition at line 95 of file InnerNode.cc.

References ACLChecklist::asyncInProgress(), and debugs.

Referenced by ACLChecklist::matchAndFinish(), and ACLChecklist::matchChild().

◆ typeString()

char const * Acl::AndNode::typeString ( ) const
virtual

Implements ACL.

Definition at line 76 of file BoolOps.cc.

◆ valid()

bool ACL::valid ( ) const
virtualinherited

Reimplemented in ACLExternal, ACLProxyAuth, ACLMaxUserIP, ACLStrategised< M >, ACLRandom, and ACLMaxConnection.

Definition at line 114 of file Acl.cc.

Member Data Documentation

◆ cfgline

char* ACL::cfgline
inherited

Definition at line 84 of file Acl.h.

Referenced by ACL::~ACL(), ACL::context(), and Acl::AllOf::parse().

◆ name

◆ next

ACL* ACL::next
inherited

Definition at line 85 of file Acl.h.

Referenced by dump_acl(), ACL::FindByName(), and ACL::Initialize().

◆ nodes

std::vector<ACL*> Acl::InnerNode::nodes
protectedinherited

◆ registered

bool ACL::registered
inherited

Definition at line 86 of file Acl.h.

Referenced by aclDeregister(), aclDestroyAcls(), and aclRegister().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors