|
Squid Web Cache master
|
#include <DestinationIp.h>
Public Types | |
| typedef Splay< acl_ip_data * > | IPSplay |
| using | Pointer = RefCount< Node > |
Public Member Functions | |
| char const * | typeString () const override |
| const Acl::Options & | options () override |
| int | match (ACLChecklist *checklist) override |
| Matches the actual data in checklist against this Acl::Node. | |
| void * | operator new (size_t) |
| void | operator delete (void *) |
| void | parse () override |
| parses node representation in squid.conf; dies on failures | |
| 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 | StartLookup (ACLFilledChecklist &, const Acl::Node &) |
| 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 | |
| MEMPROXY_CLASS (ACLDestinationIP) | |
| 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 & | lineOptions () |
Static Private Member Functions | |
| static void | LookupDone (const ipcache_addrs *, const Dns::LookupDetails &, void *data) |
| static void | ParseNamed (ConfigParser &, NamedAcls &, const SBuf &name) |
| parses acl directive parts that follow aclname | |
Private Attributes | |
| Acl::BooleanOptionValue | lookupBanned |
| are DNS lookups allowed? | |
| bool | matchAnyIpv4 = false |
| whether match() should return 1 for any IPv4 parameter | |
| bool | matchAnyIpv6 = false |
| whether match() should return 1 for any IPv6 parameter | |
Definition at line 16 of file DestinationIp.h.
|
inherited |
|
inherited |
|
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().
|
overridevirtualinherited |
Implements Acl::Node.
Definition at line 509 of file Ip.cc.
References IpAclDumpVisitor::contents, ACLIP::data, ACLIP::matchAnyIpv4, ACLIP::matchAnyIpv6, and Splay< V >::visit().
|
inherited |
|
overridevirtualinherited |
Implements Acl::Node.
Definition at line 525 of file Ip.cc.
References ACLIP::data, Splay< V >::empty(), ACLIP::matchAnyIpv4, and ACLIP::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().
|
staticprivate |
Definition at line 94 of file DestinationIp.cc.
References ACLIP::data, RequestFlags::destinationIpLookedUp, Filled(), HttpRequest::flags, HttpRequest::recordLookup(), ACLFilledChecklist::request, and ACLChecklist::resumeNonBlockingCheck().
Referenced by StartLookup().
|
overridevirtual |
Implements ACLIP.
Definition at line 36 of file DestinationIp.cc.
References SquidConfig::client_dst_passthru, Config, ACLFilledChecklist::conn(), debugs, RequestFlags::destinationIpLookedUp, ACLFilledChecklist::dst_addr, Filled(), HttpRequest::flags, ACLChecklist::goAsync(), Dns::CachedIps::goodAndBad(), AnyP::Uri::host(), AnyP::Uri::hostIP(), AnyP::Uri::hostIsNumeric(), RequestFlags::intercepted, RequestFlags::interceptTproxy, IP_LOOKUP_IF_MISS, ipcache_gethostbyname(), lookupBanned, ACLIP::match(), Acl::Node::name, SquidConfig::onoff, ACLFilledChecklist::request, StartLookup(), and HttpRequest::url.
|
protectedinherited |
Definition at line 531 of file Ip.cc.
References aclIpAddrNetworkCompare(), acl_ip_data::addr1, acl_ip_data::addr2, ACLIP::data, debugs, Splay< V >::find(), Ip::Address::isIPv4(), Ip::Address::isIPv6(), acl_ip_data::mask, ACLIP::matchAnyIpv4, ACLIP::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 |
|
private |
|
inherited |
|
inherited |
|
overridevirtual |
Reimplemented from Acl::Node.
Definition at line 27 of file DestinationIp.cc.
References Acl::TypedOption< Recipient >::linkWith(), and lookupBanned.
|
overridevirtualinherited |
Implements Acl::Node.
Definition at line 472 of file Ip.cc.
References ACLIP::data, acl_ip_data::FactoryParse(), Acl::SplayInserter< DataValue >::Merge(), acl_ip_data::next, ACLIP::parseGlobal(), and ConfigParser::strtokFile().
|
inherited |
Definition at line 360 of file Acl.cc.
References Acl::ParseFlags().
|
privateinherited |
handles special ACL data parameters that apply to the whole ACLIP object
Definition at line 426 of file Ip.cc.
References DBG_CRITICAL, debugs, ACLIP::matchAnyIpv4, and ACLIP::matchAnyIpv6.
Referenced by ACLIP::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.
|
static |
Definition at line 88 of file DestinationIp.cc.
References AnyP::Uri::host(), ipcache_nbgethostbyname(), LookupDone(), ACLFilledChecklist::request, and HttpRequest::url.
Referenced by match().
|
overridevirtual |
Implements ACLIP.
Definition at line 21 of file DestinationIp.cc.
|
virtualinherited |
Reimplemented in ACLMaxConnection, ACLRandom, Acl::ServerNameCheck, ACLMaxUserIP, ACLProxyAuth, and ACLExternal.
|
protectedinherited |
Definition at line 72 of file Ip.h.
Referenced by ACLIP::~ACLIP(), ACLIP::dump(), ACLIP::empty(), LookupDone(), ACLIP::match(), and ACLIP::parse().
|
private |
Definition at line 30 of file DestinationIp.h.
|
privateinherited |
Definition at line 78 of file Ip.h.
Referenced by ACLIP::dump(), ACLIP::empty(), ACLIP::match(), and ACLIP::parseGlobal().
|
privateinherited |
Definition at line 81 of file Ip.h.
Referenced by ACLIP::dump(), ACLIP::empty(), ACLIP::match(), and ACLIP::parseGlobal().
|
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(), match(), ACLRandom::match(), ACLExternal::parse(), and ACLMaxConnection::prepareForUse().