]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/ServerName.h
Source Format Enforcement (#963)
[thirdparty/squid.git] / src / acl / ServerName.h
1 /*
2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_ACLSERVERNAME_H
10 #define SQUID_ACLSERVERNAME_H
11
12 #include "acl/Acl.h"
13 #include "acl/DomainData.h"
14 #include "acl/Strategy.h"
15
16 class ACLServerNameData : public ACLDomainData {
17 MEMPROXY_CLASS(ACLServerNameData);
18 public:
19 ACLServerNameData() : ACLDomainData() {}
20 virtual bool match(const char *);
21 };
22
23 class ACLServerNameStrategy : public ACLStrategy<char const *>
24 {
25
26 public:
27 /* ACLStrategy API */
28 virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
29 virtual bool requiresRequest() const {return true;}
30 virtual const Acl::Options &options();
31 virtual bool valid() const;
32
33 private:
34 Acl::BooleanOptionValue useClientRequested; ///< Ignore server-supplied names
35 Acl::BooleanOptionValue useServerProvided; ///< Ignore client-supplied names
36 Acl::BooleanOptionValue useConsensus; ///< Ignore mismatching names
37 };
38
39 #endif /* SQUID_ACLSERVERNAME_H */
40