#include <Acl.h>

Inheritance diagram for ACL:
Collaboration diagram for ACL:

Public Member Functions

void * operator new (size_t)
 
void operator delete (void *)
 
 ACL ()
 
 ACL (ACL &&)=delete
 
virtual ~ACL ()
 
void context (const char *name, const char *configuration)
 sets user-specified ACL name and squid.conf context More...
 
bool matches (ACLChecklist *checklist) const
 
void parseFlags ()
 configures ACL options, throwing on configuration errors More...
 
virtual void parse ()=0
 parses node representation in squid.conf; dies on failures More...
 
virtual char const * typeString () const =0
 
virtual bool isProxyAuth () const
 
virtual SBufList dump () const =0
 
virtual bool empty () const =0
 
virtual bool valid () const
 
int cacheMatchAcl (dlink_list *cache, ACLChecklist *)
 
virtual int matchForCache (ACLChecklist *checklist)
 
virtual void prepareForUse ()
 
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...
 

Private Member Functions

virtual int match (ACLChecklist *checklist)=0
 Matches the actual data in checklist against this ACL. More...
 
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 ()
 

Detailed Description

A configurable condition. A node in the ACL expression tree. Can evaluate itself in FilledChecklist context. Does not change during evaluation.

Definition at line 39 of file Acl.h.

Constructor & Destructor Documentation

◆ ACL() [1/2]

ACL::ACL ( )

Definition at line 106 of file Acl.cc.

References name.

◆ ACL() [2/2]

ACL::ACL ( ACL &&  )
delete

◆ ~ACL()

ACL::~ACL ( )
virtual

Definition at line 404 of file Acl.cc.

References AclMatchedName, cfgline, debugs, name, and safe_free.

Member Function Documentation

◆ cacheMatchAcl()

◆ context()

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

◆ dump()

◆ dumpOptions()

SBufList ACL::dumpOptions ( )
Returns
approximate options configuration

Definition at line 300 of file Acl.cc.

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

Referenced by dump_acl().

◆ empty()

◆ FindByName()

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

◆ Initialize()

void ACL::Initialize ( )
static

Definition at line 412 of file Acl.cc.

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

Referenced by serverConnectionsOpen().

◆ isProxyAuth()

bool ACL::isProxyAuth ( ) const
virtual

Reimplemented in ACLProxyAuth, ACLExternal, and ACLIdent.

Definition at line 283 of file Acl.cc.

Referenced by aclIsProxyAuth().

◆ lineOptions()

virtual const Acl::Options & ACL::lineOptions ( )
inlineprivatevirtual
Returns
(linked) "line" Options supported by this ACL
See also
ACL::options()

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

Definition at line 103 of file Acl.h.

References Acl::NoOptions().

Referenced by parseFlags().

◆ match()

◆ matches()

bool ACL::matches ( ACLChecklist checklist) const

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(), match(), name, requiresAle(), requiresReply(), requiresRequest(), and ACLChecklist::verifyAle().

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

◆ matchForCache()

int ACL::matchForCache ( ACLChecklist checklist)
virtual

Reimplemented in ACLProxyAuth.

Definition at line 323 of file Acl.cc.

References fatal().

Referenced by cacheMatchAcl().

◆ operator delete()

void ACL::operator delete ( void *  )

Definition at line 86 of file Acl.cc.

References fatal().

◆ operator new()

void * ACL::operator new ( size_t  )

Definition at line 79 of file Acl.cc.

References fatal().

◆ options()

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

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

Definition at line 99 of file Acl.h.

References Acl::NoOptions().

Referenced by dumpOptions(), and parseFlags().

◆ parse()

◆ ParseAclLine()

◆ parseFlags()

void ACL::parseFlags ( )

Definition at line 289 of file Acl.cc.

References lineOptions(), options(), and Acl::ParseFlags().

◆ prepareForUse()

virtual void ACL::prepareForUse ( )
inlinevirtual

Reimplemented in Acl::InnerNode, ACLMaxConnection, and ACLStrategised< M >.

Definition at line 77 of file Acl.h.

Referenced by Initialize().

◆ requiresAle()

bool ACL::requiresAle ( ) const
privatevirtual

Reimplemented in ACLExternal.

Definition at line 383 of file Acl.cc.

Referenced by matches().

◆ requiresReply()

bool ACL::requiresReply ( ) const
privatevirtual

Reimplemented in ACLHTTPStatus, and ACLStrategised< M >.

Definition at line 389 of file Acl.cc.

Referenced by matches().

◆ requiresRequest()

bool ACL::requiresRequest ( ) const
privatevirtual

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

Definition at line 395 of file Acl.cc.

Referenced by matches().

◆ typeString()

◆ valid()

bool ACL::valid ( ) const
virtual

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

Definition at line 114 of file Acl.cc.

Member Data Documentation

◆ cfgline

char* ACL::cfgline

Definition at line 82 of file Acl.h.

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

◆ name

◆ next

ACL* ACL::next

Definition at line 83 of file Acl.h.

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

◆ registered

bool ACL::registered

Definition at line 84 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