]>
Commit | Line | Data |
---|---|---|
6db78a1a AJ |
1 | #include "squid.h" |
2 | #include "ACLPeerName.h" | |
3 | #include "ACLStringData.h" | |
4 | #include "ACLChecklist.h" | |
5 | ||
6 | ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername"); | |
7 | ||
8 | ACLStrategised<const char *> ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername"); | |
9 | ||
10 | int | |
11 | ACLPeerNameStrategy::match (ACLData<MatchType> * &data, ACLChecklist *checklist) | |
12 | { | |
13 | if (checklist->dst_peer != NULL && checklist->dst_peer->name != NULL) | |
14 | return data->match(checklist->dst_peer->name); | |
15 | return 0; | |
16 | } | |
17 | ||
18 | ACLPeerNameStrategy * | |
19 | ACLPeerNameStrategy::Instance() | |
20 | { | |
21 | return &Instance_; | |
22 | } | |
23 | ||
24 | ACLPeerNameStrategy ACLPeerNameStrategy::Instance_; |