]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/PeerName.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / PeerName.cc
1 /*
2 * Copyright (C) 1996-2016 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 #include "squid.h"
10 #include "acl/Checklist.h"
11 #include "acl/PeerName.h"
12 #include "acl/RegexData.h"
13 #include "acl/StringData.h"
14 #include "CachePeer.h"
15
16 int
17 ACLPeerNameStrategy::match (ACLData<MatchType> * &data, ACLFilledChecklist *checklist, ACLFlags &)
18 {
19 if (!checklist->dst_peer_name.isEmpty())
20 return data->match(checklist->dst_peer_name.c_str());
21 return 0;
22 }
23
24 ACLPeerNameStrategy *
25 ACLPeerNameStrategy::Instance()
26 {
27 return &Instance_;
28 }
29
30 ACLPeerNameStrategy ACLPeerNameStrategy::Instance_;
31