Implements the "not" or "!" operator. More...

#include <BoolOps.h>

Inheritance diagram for Acl::NotNode:
Collaboration diagram for Acl::NotNode:

Public Member Functions

 NotNode (ACL *acl)
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...
void prepareForUse () override
bool empty () const override
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
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

int match (ACLChecklist *checklist) override
 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

char const * typeString () const override
void parse () override
 parses node representation in squid.conf; dies on failures More...
SBufList dump () const override
int doMatch (ACLChecklist *checklist, Nodes::const_iterator start) const override
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

Definition at line 22 of file BoolOps.h.

Constructor & Destructor Documentation

◆ NotNode()

Acl::NotNode::NotNode ( ACL acl)

Definition at line 17 of file

References Acl::InnerNode::add(), assert, Must, ACL::name, and xstrncpy().

Member Function Documentation

◆ add()

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

Definition at line 35 of file

References aclRegister(), and assert.

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

◆ cacheMatchAcl()

◆ childrenCount()

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

Definition at line 30 of file InnerNode.h.

References Acl::InnerNode::nodes.

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

◆ context()

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

◆ doMatch()

int Acl::NotNode::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 36 of file

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

◆ dump()

SBufList Acl::NotNode::dump ( ) const

Implements ACL.

Definition at line 56 of file

References text.

◆ dumpOptions()

SBufList ACL::dumpOptions ( )
approximate options configuration

Definition at line 326 of file

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

Referenced by dump_acl().

◆ empty()

bool Acl::InnerNode::empty ( ) const

Implements ACL.

Definition at line 29 of file

Referenced by aclParseAccessLine().

◆ FindByName()

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

◆ Initialize()

void ACL::Initialize ( )

Definition at line 438 of file

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

Referenced by serverConnectionsOpen().

◆ isProxyAuth()

bool ACL::isProxyAuth ( ) const

Reimplemented in ACLProxyAuth, ACLExternal, and ACLIdent.

Definition at line 309 of file

Referenced by aclIsProxyAuth().

◆ lineOptions()

◆ lineParse()

size_t Acl::InnerNode::lineParse ( )

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

the number of parsed ACL names

Definition at line 44 of file

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

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

◆ match()

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

Implements ACL.

Definition at line 89 of file

◆ matches()

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 146 of file

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)

Reimplemented in ACLProxyAuth.

Definition at line 349 of file

References fatal().

Referenced by ACL::cacheMatchAcl().


Acl::NotNode::MEMPROXY_CLASS ( NotNode  )

◆ operator delete()

void ACL::operator delete ( void *  )

Definition at line 112 of file

References fatal().

◆ operator new()

void * ACL::operator new ( size_t  )

Definition at line 105 of file

References fatal().

◆ options()

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

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

Definition at line 105 of file Acl.h.

References Acl::NoOptions().

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

◆ parse()

void Acl::NotNode::parse ( )

Implements ACL.

Definition at line 28 of file

References assert.

◆ ParseAclLine()

◆ parseFlags()

void ACL::parseFlags ( )

Definition at line 315 of file

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

◆ prepareForUse()

void Acl::InnerNode::prepareForUse ( )

Reimplemented from ACL.

Definition at line 22 of file

References Acl::InnerNode::nodes.

◆ requiresAle()

bool ACL::requiresAle ( ) const

Reimplemented in ACLExternal.

Definition at line 409 of file

Referenced by ACL::matches().

◆ requiresReply()

bool ACL::requiresReply ( ) const

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

Definition at line 415 of file

Referenced by ACL::matches().

◆ requiresRequest()

◆ resumeMatchingAt()

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

Definition at line 95 of file

References ACLChecklist::asyncInProgress(), and debugs.

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

◆ typeString()

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

Implements ACL.

Definition at line 50 of file

◆ valid()

bool ACL::valid ( ) const

Reimplemented in ACLMaxConnection, ACLRandom, Acl::ServerNameCheck, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.

Definition at line 140 of file

Member Data Documentation

◆ cfgline

char* ACL::cfgline

Definition at line 88 of file Acl.h.

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

◆ name

◆ next

ACL* ACL::next

Definition at line 89 of file Acl.h.

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

◆ nodes

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

◆ registered

bool ACL::registered

Definition at line 90 of file Acl.h.

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

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






Web Site Translations