#include <Node.h>
Public Types | |
using | Pointer = RefCount< Node > |
Public Member Functions | |
void * | operator new (size_t) |
void | operator delete (void *) |
Node () | |
Node (Node &&)=delete | |
virtual | ~Node () |
void | context (const SBuf &aName, const char *configuration) |
sets user-specified ACL name and squid.conf context More... | |
bool | matches (ACLChecklist *checklist) const |
void | parseFlags () |
configures Acl::Node options, throwing on configuration errors More... | |
virtual void | parse ()=0 |
parses node representation in squid.conf; dies on failures More... | |
virtual const char * | 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 () |
void | dumpWhole (const char *directiveName, std::ostream &) |
Static Public Member Functions | |
static void | ParseNamedAcl (ConfigParser &, NamedAcls *&) |
parses acl directive parts that follow directive name (i.e. "acl") More... | |
static void | Initialize () |
static Acl::Node * | FindByName (const SBuf &) |
A configured ACL with a given name or nil. More... | |
Public Attributes | |
SBuf | name |
char * | cfgline = nullptr |
Private Member Functions | |
virtual int | match (ACLChecklist *checklist)=0 |
Matches the actual data in checklist against this Acl::Node. 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::Options & | options () |
virtual const Acl::Options & | lineOptions () |
Static Private Member Functions | |
static void | ParseNamed (ConfigParser &, NamedAcls &, const SBuf &name) |
parses acl directive parts that follow aclname More... | |
Detailed Description
A configurable condition. A node in the ACL expression tree. Can evaluate itself in FilledChecklist context. Does not change during evaluation.
Member Typedef Documentation
◆ Pointer
using Acl::Node::Pointer = RefCount<Node> |
Constructor & Destructor Documentation
◆ Node() [1/2]
◆ Node() [2/2]
|
delete |
◆ ~Node()
|
virtual |
Member Function Documentation
◆ cacheMatchAcl()
int Acl::Node::cacheMatchAcl | ( | dlink_list * | cache, |
ACLChecklist * | checklist | ||
) |
Definition at line 401 of file Acl.cc.
References acl_proxy_auth_match_cache::acl_data, dlink_node::data, debugs, dlinkAddTail(), dlink_list::head, acl_proxy_auth_match_cache::link, acl_proxy_auth_match_cache::matchrv, and dlink_node::next.
Referenced by ACLProxyAuth::matchProxyAuth().
◆ context()
void Acl::Node::context | ( | const SBuf & | aName, |
const char * | configuration | ||
) |
Definition at line 220 of file Acl.cc.
References safe_free, and xstrdup.
Referenced by aclParseAccessLine(), aclParseAclList(), Acl::AllOf::parse(), and ParseAclWithAction().
◆ dump()
|
pure virtual |
◆ dumpWhole()
void Acl::Node::dumpWhole | ( | const char * | directiveName, |
std::ostream & | os | ||
) |
◆ empty()
|
pure virtual |
◆ FindByName()
Definition at line 159 of file Acl.cc.
References assert, Config, debugs, and SquidConfig::namedAcls.
Referenced by aclIsProxyAuth(), Acl::InnerNode::lineParse(), parse_ftp_epsv(), and TestACLMaxUserIP::testParseLine().
◆ Initialize()
|
static |
Definition at line 471 of file Acl.cc.
References Config, debugs, and SquidConfig::namedAcls.
Referenced by serverConnectionsOpen().
◆ isProxyAuth()
|
virtual |
Reimplemented in ACLExternal, and ACLProxyAuth.
◆ lineOptions()
|
inlineprivatevirtual |
- Returns
- (linked) "line" Options supported by this Acl::Node
- See also
- Acl::Node::options()
Reimplemented in ACLProxyAuth, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< hier_code > >, and ACLExtUser.
Definition at line 102 of file Node.h.
References Acl::NoOptions().
◆ match()
|
privatepure virtual |
Implemented in Acl::ReplyHeaderCheck< header >, Acl::RequestHeaderCheck< header >, ACLMaxUserIP, ACLIP, Acl::InnerNode, ACLHTTPStatus, ACLProxyAuth, ACLExternal, Acl::ConnMark, ACLExtUser, Acl::TransactionInitiator, ACLARP, Acl::ConnectionsEncrypted, ACLEui64, ACLDestinationIP, ACLMaxConnection, ACLRandom, ACLLocalIP, ACLSourceIP, Acl::SnmpCommunityCheck, Acl::NoteCheck, Acl::ServerNameCheck, Acl::ReplyHeaderCheck< header >, Acl::RequestHeaderCheck< header >, Acl::ClientCertificateCheck, Acl::DestinationDomainCheck, Acl::ServerCertificateCheck, Acl::SourceDomainCheck, Acl::AtStepCheck, Acl::DestinationAsnCheck, Acl::HierCodeCheck, Acl::HttpRepHeaderCheck, Acl::HttpReqHeaderCheck, Acl::MethodCheck, Acl::ProtocolCheck, Acl::SourceAsnCheck, Acl::SquidErrorCheck, Acl::CertificateErrorCheck, Acl::CurrentTimeCheck, Acl::AdaptationServiceCheck, Acl::HasComponentCheck, Acl::LocalPortCheck, Acl::MyPortNameCheck, Acl::PeerNameCheck, Acl::TagCheck, Acl::UrlCheck, Acl::UrlLoginCheck, Acl::UrlPathCheck, Acl::UrlPortCheck, Acl::AnnotateClientCheck, and Acl::AnnotateTransactionCheck.
◆ matches()
bool Acl::Node::matches | ( | ACLChecklist * | checklist | ) | const |
Orchestrates matching checklist against the Acl::Node 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 189 of file Acl.cc.
References ACLChecklist::asyncInProgress(), DBG_IMPORTANT, debugs, ACLChecklist::hasAle(), ACLChecklist::hasReply(), ACLChecklist::hasRequest(), ACLChecklist::setLastCheckedName(), and ACLChecklist::verifyAle().
Referenced by ACLChecklist::matchAndFinish().
◆ matchForCache()
|
virtual |
◆ operator delete()
void Acl::Node::operator delete | ( | void * | ) |
◆ operator new()
void * Acl::Node::operator new | ( | size_t | ) |
◆ options()
|
inlineprivatevirtual |
- Returns
- (linked) 'global' Options supported by this Acl::Node
Reimplemented in Acl::ServerNameCheck, Acl::DestinationDomainCheck, Acl::AnnotationCheck, ACLMaxUserIP, and ACLDestinationIP.
Definition at line 98 of file Node.h.
References Acl::NoOptions().
◆ parse()
|
pure virtual |
Implemented in Acl::OrNode, ACLIP, Acl::AndNode, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< hier_code > >, ACLHTTPStatus, Acl::NotNode, ACLProxyAuth, ACLExternal, Acl::ConnMark, ACLExtUser, Acl::TransactionInitiator, Acl::AllOf, ACLARP, Acl::ConnectionsEncrypted, ACLEui64, ACLMaxUserIP, Acl::AnyOf, ACLMaxConnection, and ACLRandom.
◆ parseFlags()
void Acl::Node::parseFlags | ( | ) |
Definition at line 360 of file Acl.cc.
References Acl::ParseFlags().
◆ ParseNamed()
|
staticprivate |
Definition at line 253 of file Acl.cc.
References A, Assure, SBuf::cmp(), config_input_line, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, ConfigParser::destruct(), fatalf(), HttpPortList, Acl::Make(), and ConfigParser::NextToken().
◆ ParseNamedAcl()
|
static |
Definition at line 229 of file Acl.cc.
References CallParser(), DBG_CRITICAL, debugs, ConfigParser::destruct(), RefCount< C >::Make(), and ConfigParser::NextToken().
Referenced by parse_acl(), and TestACLMaxUserIP::testParseLine().
◆ prepareForUse()
|
inlinevirtual |
Reimplemented in Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< Ip::Address > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLTimeData >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::InnerNode, and ACLMaxConnection.
◆ requiresAle()
|
privatevirtual |
Reimplemented in ACLExternal.
◆ requiresReply()
|
privatevirtual |
Reimplemented in ACLHTTPStatus, Acl::ReplyHeaderCheck< header >, and Acl::HttpRepHeaderCheck.
◆ requiresRequest()
|
privatevirtual |
Reimplemented in Acl::NoteCheck, ACLProxyAuth, ACLExternal, Acl::ServerNameCheck, ACLMaxUserIP, ACLExtUser, Acl::TransactionInitiator, Acl::RequestHeaderCheck< header >, Acl::DestinationDomainCheck, Acl::DestinationAsnCheck, Acl::HierCodeCheck, Acl::HttpReqHeaderCheck, Acl::MethodCheck, Acl::ProtocolCheck, Acl::UrlCheck, Acl::UrlLoginCheck, Acl::UrlPathCheck, and Acl::UrlPortCheck.
◆ typeString()
|
pure virtual |
Implemented in ACLIP, Acl::OrNode, Acl::AndNode, ACLHTTPStatus, Acl::NotNode, ACLProxyAuth, ACLExternal, Acl::ConnMark, ACLExtUser, Acl::TransactionInitiator, Acl::AllOf, ACLARP, Acl::ConnectionsEncrypted, ACLEui64, Acl::AnyOf, ACLMaxUserIP, ACLDestinationIP, ACLMaxConnection, ACLRandom, ACLLocalIP, and ACLSourceIP.
◆ valid()
|
virtual |
Reimplemented in ACLExternal, ACLProxyAuth, Acl::ServerNameCheck, ACLMaxUserIP, ACLMaxConnection, and ACLRandom.
Member Data Documentation
◆ cfgline
◆ name
SBuf Acl::Node::name |
Either aclname parameter from the explicitly configured acl directive or a label generated for an internal ACL tree node. All Node objects corresponding to one Squid configuration have unique names. See also: context() and FindByName().
Definition at line 81 of file Node.h.
Referenced by aclDestroyAccessList(), Acl::AnnotateClientCheck::match(), Acl::AnnotateTransactionCheck::match(), ACLRandom::match(), Acl::SourceDomainCheck::match(), ACLDestinationIP::match(), Acl::NotNode::NotNode(), ACLExternal::parse(), and ACLMaxConnection::prepareForUse().
The documentation for this class was generated from the following files:
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
Miscellaneous
- Developer Resources
- Related Writings
- Related Software:
- Squid Artwork
Web Site Translations
Mirrors
- Website:
- ... full list