#include <Strategised.h>

Inheritance diagram for ACLStrategised< M >:
Collaboration diagram for ACLStrategised< M >:

Public Types

typedef M MatchType
 

Public Member Functions

 ~ACLStrategised ()
 
 ACLStrategised (ACLData< MatchType > *, ACLStrategy< MatchType > *, char const *)
 
 ACLStrategised (ACLStrategised const &&)=delete
 
virtual char const * typeString () const
 
virtual void parseFlags ()
 configures ACL options, throwing on configuration errors 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 void prepareForUse ()
 
virtual const Acl::Optionsoptions ()
 
virtual void parse ()
 parses node represenation in squid.conf; dies on failures More...
 
virtual int match (ACLChecklist *checklist)
 Matches the actual data in checklist against this ACL. More...
 
virtual int match (M const &)
 
virtual SBufList dump () const
 
virtual bool empty () const
 
virtual bool valid () const
 
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 bool isProxyAuth () 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...
 

Private Member Functions

 MEMPROXY_CLASS (ACLStrategised)
 

Private Attributes

ACLData< MatchType > * data
 
char const * type_
 
ACLStrategy< MatchType > * matcher
 

Detailed Description

template<class M>
class ACLStrategised< M >

Splits the ACL API into two individually configurable components:

  • ACLStrategy that usually extracts information from the current transaction
  • ACLData that usually matches information against admin-configured values

Definition at line 28 of file Strategised.h.

Member Typedef Documentation

template<class M>
typedef M ACLStrategised< M >::MatchType

Definition at line 33 of file Strategised.h.

Constructor & Destructor Documentation

template<class MatchType >
ACLStrategised< MatchType >::~ACLStrategised ( )

Definition at line 64 of file Strategised.h.

References data.

template<class MatchType >
ACLStrategised< MatchType >::ACLStrategised ( ACLData< MatchType > *  newData,
ACLStrategy< MatchType > *  theStrategy,
char const *  theType 
)

Definition at line 70 of file Strategised.h.

template<class M>
ACLStrategised< M >::ACLStrategised ( ACLStrategised< M > const &&  )
delete

Member Function Documentation

void ACL::context ( const char *  name,
const char *  configuration 
)
inherited
template<class MatchType >
SBufList ACLStrategised< MatchType >::dump ( ) const
virtual

Implements ACL.

Definition at line 119 of file Strategised.h.

References data.

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().

template<class MatchType >
bool ACLStrategised< MatchType >::empty ( ) const
virtual

Implements ACL.

Definition at line 96 of file Strategised.h.

References data.

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

Definition at line 404 of file Acl.cc.

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

Referenced by serverConnectionsOpen().

bool ACL::isProxyAuth ( ) const
virtualinherited

Reimplemented in ACLExternal, ACLIdent, and ACLProxyAuth.

Definition at line 283 of file Acl.cc.

Referenced by aclIsProxyAuth().

template<class MatchType >
int ACLStrategised< MatchType >::match ( ACLChecklist checklist)
virtual

Implements ACL.

Definition at line 103 of file Strategised.h.

References assert, and data.

template<class MatchType >
int ACLStrategised< MatchType >::match ( M const &  toFind)
virtual

Definition at line 112 of file Strategised.h.

References data.

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 121 of file Acl.cc.

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

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

int ACL::matchForCache ( ACLChecklist checklist)
virtualinherited

Reimplemented in ACLProxyAuth.

Definition at line 315 of file Acl.cc.

References fatal().

Referenced by ACL::cacheMatchAcl().

template<class M>
ACLStrategised< M >::MEMPROXY_CLASS ( ACLStrategised< M >  )
private
void ACL::operator delete ( void *  )
inherited

Definition at line 87 of file Acl.cc.

References fatal().

void * ACL::operator new ( size_t  )
inherited

Definition at line 80 of file Acl.cc.

References fatal().

template<class M>
virtual const Acl::Options& ACLStrategised< M >::options ( )
inlinevirtual
Returns
(linked) Options supported by this ACL

Reimplemented from ACL.

Definition at line 47 of file Strategised.h.

References ACLStrategised< M >::matcher, and ACLStrategy< M >::options().

template<class MatchType >
void ACLStrategised< MatchType >::parse ( )
virtual

Implements ACL.

Definition at line 89 of file Strategised.h.

References data.

template<class MatchType >
void ACLStrategised< MatchType >::parseFlags ( )
virtual

Reimplemented from ACL.

Definition at line 82 of file Strategised.h.

References data, and Acl::ParseFlags().

template<class M>
virtual void ACLStrategised< M >::prepareForUse ( )
inlinevirtual

Reimplemented from ACL.

Definition at line 46 of file Strategised.h.

References ACLStrategised< M >::data, and ACLData< M >::prepareForUse().

template<class M>
virtual bool ACLStrategised< M >::requiresReply ( ) const
inlinevirtual

Reimplemented from ACL.

Definition at line 44 of file Strategised.h.

References ACLStrategised< M >::matcher, and ACLStrategy< M >::requiresReply().

template<class M>
virtual bool ACLStrategised< M >::requiresRequest ( ) const
inlinevirtual

Reimplemented from ACL.

Definition at line 42 of file Strategised.h.

References ACLStrategised< M >::matcher, and ACLStrategy< M >::requiresRequest().

template<class MatchType >
char const * ACLStrategised< MatchType >::typeString ( ) const
virtual

Implements ACL.

Definition at line 75 of file Strategised.h.

template<class MatchType >
bool ACLStrategised< MatchType >::valid ( ) const
virtual

Reimplemented from ACL.

Definition at line 126 of file Strategised.h.

Member Data Documentation

char* ACL::cfgline
inherited

Definition at line 84 of file Acl.h.

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

template<class M>
ACLData<MatchType>* ACLStrategised< M >::data
private

Definition at line 56 of file Strategised.h.

Referenced by ACLStrategised< M >::prepareForUse().

ACL* ACL::next
inherited

Definition at line 85 of file Acl.h.

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

bool ACL::registered
inherited

Definition at line 86 of file Acl.h.

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

template<class M>
char const* ACLStrategised< M >::type_
private

Definition at line 57 of file Strategised.h.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors