#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 represenation 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
void lineParse ()
 parses one "acl name type acl1 acl2..." line, appending to nodes More...
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
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

virtual int doMatch (ACLChecklist *checklist, Nodes::const_iterator start) const

Detailed Description

An inner ACL expression tree node representing a boolean conjuction (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

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

Definition at line 35 of file InnerNode.cc.

References aclRegister(), assert, and NULL.

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

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

Definition at line 30 of file InnerNode.h.

References Acl::InnerNode::nodes.

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

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

Definition at line 81 of file BoolOps.cc.

void ACL::context ( const char *  name,
const char *  configuration 
int Acl::AndNode::doMatch ( ACLChecklist checklist,
Nodes::const_iterator  start 
) const

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 87 of file BoolOps.cc.

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

SBufList Acl::InnerNode::dump ( ) const

Implements ACL.

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

Definition at line 78 of file InnerNode.cc.

References i.

SBufList ACL::dumpOptions ( )
approximate options configuration

Definition at line 296 of file Acl.cc.

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

Referenced by dump_acl().

bool Acl::InnerNode::empty ( ) const

Implements ACL.

Definition at line 29 of file InnerNode.cc.

Referenced by aclParseAccessLine().

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

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

Reimplemented in ACLExternal, ACLIdent, and ACLProxyAuth.

Definition at line 283 of file Acl.cc.

Referenced by aclIsProxyAuth().

void Acl::InnerNode::lineParse ( )
int Acl::InnerNode::match ( ACLChecklist checklist)

Implements ACL.

Definition at line 87 of file InnerNode.cc.

bool ACL::matches ( ACLChecklist checklist) const

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

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)

Reimplemented in ACLProxyAuth.

Definition at line 315 of file Acl.cc.

References fatal().

Referenced by ACL::cacheMatchAcl().

Acl::AndNode::MEMPROXY_CLASS ( AndNode  )
void ACL::operator delete ( void *  )

Definition at line 87 of file Acl.cc.

References fatal().

void * ACL::operator new ( size_t  )

Definition at line 80 of file Acl.cc.

References fatal().

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

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

Definition at line 63 of file Acl.h.

References Acl::NoOptions().

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

void Acl::AndNode::parse ( )

Implements ACL.

Definition at line 100 of file BoolOps.cc.

References assert.

void ACL::parseFlags ( )

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

Definition at line 289 of file Acl.cc.

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

Referenced by ACL::ParseAclLine().

void Acl::InnerNode::prepareForUse ( )

Reimplemented from ACL.

Definition at line 22 of file InnerNode.cc.

References Acl::InnerNode::nodes.

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

Definition at line 93 of file InnerNode.cc.

References ACLChecklist::asyncInProgress(), and debugs.

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

Implements ACL.

Definition at line 75 of file BoolOps.cc.

bool ACL::valid ( ) const

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

Definition at line 115 of file Acl.cc.

Referenced by ACL::ParseAclLine().

Member Data Documentation

char* ACL::cfgline

Definition at line 84 of file Acl.h.

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

ACL* ACL::next

Definition at line 85 of file Acl.h.

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

std::vector<ACL*> Acl::InnerNode::nodes
bool ACL::registered

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:






Web Site Translations