]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/DestinationIp.h
Boilerplate: update copyright blurbs on src/
[thirdparty/squid.git] / src / acl / DestinationIp.h
1 /*
2 * Copyright (C) 1996-2014 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_ACLDESTINATIONIP_H
10 #define SQUID_ACLDESTINATIONIP_H
11 #include "acl/Checklist.h"
12 #include "acl/Ip.h"
13 #include "ipcache.h"
14
15 class DestinationIPLookup : public ACLChecklist::AsyncState
16 {
17
18 public:
19 static DestinationIPLookup *Instance();
20 virtual void checkForAsync(ACLChecklist *)const;
21
22 private:
23 static DestinationIPLookup instance_;
24 static IPH LookupDone;
25 };
26
27 class ACLDestinationIP : public ACLIP
28 {
29
30 public:
31 MEMPROXY_CLASS(ACLDestinationIP);
32
33 ACLDestinationIP(): ACLIP(ACLDestinationIP::SupportedFlags) {}
34 virtual char const *typeString() const;
35 virtual int match(ACLChecklist *checklist);
36 virtual bool requiresRequest() const {return true;}
37
38 virtual ACL *clone()const;
39
40 static ACLFlag SupportedFlags[];
41 private:
42 static Prototype RegistryProtoype;
43 static ACLDestinationIP RegistryEntry_;
44 };
45
46 MEMPROXY_CLASS_INLINE(ACLDestinationIP);
47
48 #endif /* SQUID_ACLDESTINATIONIP_H */