|
Squid Web Cache master
|
#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 | |
| bool | matches (ACLChecklist *checklist) const |
| void | parseFlags () |
| configures Acl::Node options, throwing on configuration errors | |
| virtual void | parse ()=0 |
| parses node representation in squid.conf; dies on failures | |
| 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 () |
| 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") | |
| static void | Initialize () |
| static Acl::Node * | FindByName (const SBuf &) |
| A configured ACL with a given name or nil. | |
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. | |
| virtual bool | requiresAle () const |
| whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry | |
| virtual bool | requiresRequest () const |
| whether our (i.e. shallow) match() requires checklist to have a request | |
| virtual bool | requiresReply () const |
| whether our (i.e. shallow) match() requires checklist to have a reply | |
| 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 | |
A configurable condition. A node in the ACL expression tree. Can evaluate itself in FilledChecklist context. Does not change during evaluation.
| using Acl::Node::Pointer = RefCount<Node> |
|
delete |
|
virtual |
| 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().
| 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().
|
pure virtual |
Implemented in Acl::AllOf, ACLARP, Acl::NotNode, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLEui64, ACLExtUser, ACLHTTPStatus, Acl::InnerNode, ACLIP, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLTimeData >, ACLRandom, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
| void Acl::Node::dumpWhole | ( | const char * | directiveName, |
| std::ostream & | os | ||
| ) |
|
pure virtual |
Implemented in ACLARP, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLEui64, ACLExtUser, ACLHTTPStatus, Acl::InnerNode, ACLIP, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLTimeData >, ACLRandom, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
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().
|
static |
Definition at line 471 of file Acl.cc.
References Config, debugs, and SquidConfig::namedAcls.
Referenced by serverConnectionsOpen().
|
virtual |
Reimplemented in ACLProxyAuth, and ACLExternal.
|
inlineprivatevirtual |
Reimplemented in ACLExtUser, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLTimeData >, and ACLProxyAuth.
Definition at line 102 of file Node.h.
References Acl::NoOptions().
|
privatepure virtual |
Implemented in Acl::AdaptationServiceCheck, Acl::AnnotateClientCheck, Acl::AnnotateTransactionCheck, Acl::AtStepCheck, Acl::ClientCertificateCheck, Acl::DestinationDomainCheck, Acl::HasComponentCheck, Acl::HierCodeCheck, Acl::HttpRepHeaderCheck, Acl::HttpReqHeaderCheck, Acl::LocalPortCheck, Acl::MethodCheck, Acl::MyPortNameCheck, Acl::NoteCheck, Acl::PeerNameCheck, Acl::ProtocolCheck, Acl::ReplyHeaderCheck< header >, Acl::RequestHeaderCheck< header >, Acl::ServerCertificateCheck, Acl::ServerNameCheck, Acl::SourceDomainCheck, Acl::SquidErrorCheck, Acl::CertificateErrorCheck, Acl::TagCheck, Acl::CurrentTimeCheck, Acl::UrlCheck, Acl::UrlLoginCheck, Acl::UrlPathCheck, Acl::UrlPortCheck, Acl::SnmpCommunityCheck, ACLARP, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLDestinationIP, ACLEui64, ACLExtUser, ACLHTTPStatus, Acl::InnerNode, ACLLocalIP, ACLMaxConnection, ACLRandom, ACLSourceIP, Acl::TransactionInitiator, ACLProxyAuth, ACLExternal, ACLIP, ACLMaxUserIP, Acl::ReplyHeaderCheck< header >, and Acl::RequestHeaderCheck< header >.
| bool Acl::Node::matches | ( | ACLChecklist * | checklist | ) | const |
Orchestrates matching checklist against the Acl::Node using match(), after checking preconditions and while providing debugging.
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().
|
virtual |
| void Acl::Node::operator delete | ( | void * | ) |
| void * Acl::Node::operator new | ( | size_t | ) |
|
inlineprivatevirtual |
Reimplemented in Acl::DestinationDomainCheck, ACLDestinationIP, Acl::AnnotationCheck, Acl::ServerNameCheck, and ACLMaxUserIP.
Definition at line 98 of file Node.h.
References Acl::NoOptions().
|
pure virtual |
Implemented in Acl::AllOf, Acl::AnyOf, ACLARP, Acl::NotNode, Acl::AndNode, Acl::OrNode, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLEui64, ACLExtUser, ACLHTTPStatus, ACLIP, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, Acl::ParameterizedNode< ACLTimeData >, ACLRandom, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
| void Acl::Node::parseFlags | ( | ) |
Definition at line 360 of file Acl.cc.
References Acl::ParseFlags().
|
staticprivate |
Definition at line 253 of file Acl.cc.
References Assure, SBuf::cmp(), config_input_line, DBG_CRITICAL, DBG_IMPORTANT, DBG_PARSE_NOTE, debugs, ConfigParser::destruct(), fatalf(), HttpPortList, Acl::Make(), and ConfigParser::NextToken().
|
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().
|
inlinevirtual |
Reimplemented in Acl::InnerNode, ACLMaxConnection, Acl::ParameterizedNode< P >, Acl::ParameterizedNode< ACLData< ACLChecklist * > >, Acl::ParameterizedNode< ACLData< AnyP::ProtocolType > >, Acl::ParameterizedNode< ACLData< const char * > >, Acl::ParameterizedNode< ACLData< const HttpHeader & > >, Acl::ParameterizedNode< ACLData< const Security::CertErrors * > >, Acl::ParameterizedNode< ACLData< err_type > >, Acl::ParameterizedNode< ACLData< hier_code > >, Acl::ParameterizedNode< ACLData< HttpRequestMethod > >, Acl::ParameterizedNode< ACLData< int > >, Acl::ParameterizedNode< ACLData< NotePairs::Entry * > >, Acl::ParameterizedNode< ACLData< X509 * > >, Acl::ParameterizedNode< ACLData< XactionStep > >, and Acl::ParameterizedNode< ACLTimeData >.
|
privatevirtual |
Reimplemented in ACLExternal.
|
privatevirtual |
Reimplemented in Acl::HttpRepHeaderCheck, ACLHTTPStatus, and Acl::ReplyHeaderCheck< header >.
|
privatevirtual |
Reimplemented in Acl::DestinationDomainCheck, ACLExtUser, Acl::HierCodeCheck, Acl::HttpReqHeaderCheck, Acl::MethodCheck, Acl::NoteCheck, Acl::ProtocolCheck, Acl::RequestHeaderCheck< header >, Acl::ServerNameCheck, Acl::TransactionInitiator, Acl::UrlCheck, Acl::UrlLoginCheck, Acl::UrlPathCheck, Acl::UrlPortCheck, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
|
pure virtual |
Implemented in Acl::AllOf, Acl::AnyOf, ACLARP, Acl::NotNode, Acl::AndNode, Acl::OrNode, Acl::ConnectionsEncrypted, Acl::ConnMark, ACLDestinationIP, ACLEui64, ACLExtUser, ACLHTTPStatus, ACLLocalIP, ACLMaxConnection, ACLRandom, ACLSourceIP, Acl::TransactionInitiator, ACLMaxUserIP, ACLProxyAuth, ACLExternal, and ACLIP.
|
virtual |
Reimplemented in ACLMaxConnection, ACLRandom, Acl::ServerNameCheck, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
| 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 Acl::NotNode::NotNode(), aclDestroyAccessList(), Acl::AnnotateClientCheck::match(), Acl::AnnotateTransactionCheck::match(), Acl::SourceDomainCheck::match(), ACLDestinationIP::match(), ACLRandom::match(), ACLExternal::parse(), and ACLMaxConnection::prepareForUse().