|
Squid Web Cache master
|
#include <Ip.h>
Public Types | |
| typedef Splay< acl_ip_data * > | IPSplay |
| using | Pointer = RefCount< Node > |
Public Member Functions | |
| void * | operator new (size_t) |
| void | operator delete (void *) |
| ACLIP () | |
| ~ACLIP () override | |
| char const * | typeString () const override=0 |
| void | parse () override |
| parses node representation in squid.conf; dies on failures | |
| int | match (ACLChecklist *checklist) override=0 |
| Matches the actual data in checklist against this Acl::Node. | |
| SBufList | dump () const override |
| bool | empty () const override |
| 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 bool | isProxyAuth () const |
| 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 |
Protected Member Functions | |
| int | match (const Ip::Address &) |
Protected Attributes | |
| IPSplay * | data |
Private Member Functions | |
| bool | parseGlobal (const char *) |
| 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 | |
Private Attributes | |
| bool | matchAnyIpv4 = false |
| whether match() should return 1 for any IPv4 parameter | |
| bool | matchAnyIpv6 = false |
| whether match() should return 1 for any IPv6 parameter | |
| typedef Splay<acl_ip_data *> ACLIP::IPSplay |
|
inherited |
|
override |
Definition at line 493 of file Ip.cc.
References data, and Splay< V >::destroy().
|
inherited |
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().
|
inherited |
Definition at line 220 of file Acl.cc.
References safe_free, and xstrdup.
Referenced by aclParseAccessLine(), aclParseAclList(), Acl::AllOf::parse(), and ParseAclWithAction().
|
overridevirtual |
Implements Acl::Node.
Definition at line 509 of file Ip.cc.
References IpAclDumpVisitor::contents, data, matchAnyIpv4, matchAnyIpv6, and Splay< V >::visit().
|
inherited |
|
overridevirtual |
Implements Acl::Node.
Definition at line 525 of file Ip.cc.
References data, Splay< V >::empty(), matchAnyIpv4, and matchAnyIpv6.
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().
|
staticinherited |
Definition at line 471 of file Acl.cc.
References Config, debugs, and SquidConfig::namedAcls.
Referenced by serverConnectionsOpen().
|
virtualinherited |
Reimplemented in ACLProxyAuth, and ACLExternal.
|
inlineprivatevirtualinherited |
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().
|
overridepure virtual |
Implements Acl::Node.
Implemented in ACLDestinationIP, ACLLocalIP, and ACLSourceIP.
Referenced by ACLDestinationIP::match(), ACLLocalIP::match(), and ACLSourceIP::match().
|
protected |
Definition at line 531 of file Ip.cc.
References aclIpAddrNetworkCompare(), acl_ip_data::addr1, acl_ip_data::addr2, data, debugs, Splay< V >::find(), Ip::Address::isIPv4(), Ip::Address::isIPv6(), acl_ip_data::mask, matchAnyIpv4, matchAnyIpv6, and Ip::Address::setEmpty().
|
inherited |
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().
|
virtualinherited |
|
inlineprivatevirtualinherited |
Reimplemented in Acl::DestinationDomainCheck, ACLDestinationIP, Acl::AnnotationCheck, Acl::ServerNameCheck, and ACLMaxUserIP.
Definition at line 98 of file Node.h.
References Acl::NoOptions().
|
overridevirtual |
Implements Acl::Node.
Definition at line 472 of file Ip.cc.
References data, acl_ip_data::FactoryParse(), Acl::SplayInserter< DataValue >::Merge(), acl_ip_data::next, parseGlobal(), and ConfigParser::strtokFile().
|
inherited |
Definition at line 360 of file Acl.cc.
References Acl::ParseFlags().
|
private |
handles special ACL data parameters that apply to the whole ACLIP object
Definition at line 426 of file Ip.cc.
References DBG_CRITICAL, debugs, matchAnyIpv4, and matchAnyIpv6.
Referenced by parse().
|
staticprivateinherited |
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().
|
staticinherited |
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().
|
inlinevirtualinherited |
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 >.
|
privatevirtualinherited |
Reimplemented in ACLExternal.
|
privatevirtualinherited |
Reimplemented in Acl::HttpRepHeaderCheck, ACLHTTPStatus, and Acl::ReplyHeaderCheck< header >.
|
privatevirtualinherited |
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.
|
overridepure virtual |
Implements Acl::Node.
Implemented in ACLDestinationIP, ACLLocalIP, and ACLSourceIP.
|
virtualinherited |
Reimplemented in ACLMaxConnection, ACLRandom, Acl::ServerNameCheck, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
|
protected |
|
private |
|
private |
|
inherited |
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().