]> git.ipfire.org Git - thirdparty/squid.git/blame - src/AclRegs.cc
Fix build failure of squid_radius_auth.
[thirdparty/squid.git] / src / AclRegs.cc
CommitLineData
2d46f579
AR
1#include "squid.h"
2
3/** This file exists to provide satic registration code to executables
4 that need ACLs. We cannot place this code in acl/lib*.la because it
5 does not get linked in, because nobody is using these classes by name.
6*/
7
8#include "acl/Acl.h"
4d65855c 9#ifdef USE_ARP_ACL
2d46f579
AR
10#include "acl/Arp.h"
11#endif
12#include "acl/Asn.h"
13#include "acl/Browser.h"
14#include "acl/Checklist.h"
15#include "acl/Data.h"
16#include "acl/DestinationAsn.h"
17#include "acl/DestinationDomain.h"
18#include "acl/DestinationIp.h"
19#include "acl/DomainData.h"
20#include "acl/ExtUser.h"
21#include "acl/FilledChecklist.h"
22#include "acl/Gadgets.h"
23#include "acl/HttpHeaderData.h"
24#include "acl/HttpRepHeader.h"
25#include "acl/HttpReqHeader.h"
26#include "acl/HttpStatus.h"
ee326f02 27#if USE_IDENT
314c9b03 28#include "acl/AclIdent.h"
2d46f579
AR
29#endif
30#include "acl/IntRange.h"
31#include "acl/Ip.h"
32#include "acl/MaxConnection.h"
33#include "acl/MethodData.h"
34#include "acl/Method.h"
35#include "acl/MyIp.h"
36#include "acl/MyPort.h"
37#include "acl/MyPortName.h"
38#include "acl/PeerName.h"
39#include "acl/ProtocolData.h"
40#include "acl/Protocol.h"
41#include "acl/Referer.h"
42#include "acl/RegexData.h"
43#include "acl/ReplyHeaderStrategy.h"
44#include "acl/ReplyMimeType.h"
45#include "acl/RequestHeaderStrategy.h"
46#include "acl/RequestMimeType.h"
47#include "acl/SourceAsn.h"
48#include "acl/SourceDomain.h"
49#include "acl/SourceIp.h"
4d65855c 50#ifdef USE_SSL
2d46f579
AR
51#include "acl/SslErrorData.h"
52#include "acl/SslError.h"
53#include "acl/CertificateData.h"
54#include "acl/Certificate.h"
55#endif
56#include "acl/Strategised.h"
57#include "acl/Strategy.h"
58#include "acl/StringData.h"
bb5e7a79 59#include "acl/Tag.h"
2d46f579
AR
60#include "acl/TimeData.h"
61#include "acl/Time.h"
62#include "acl/Url.h"
63#include "acl/UrlPath.h"
64#include "acl/UrlPort.h"
65#include "acl/UserData.h"
abca32cf
CT
66#include "auth/AclProxyAuth.h"
67#include "auth/AclMaxUserIp.h"
68
2d46f579
AR
69
70ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser");
71ACLStrategised<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_USER_AGENT>::Instance(), "browser");
72ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain");
73ACLStrategised<char const *> ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData, ACLDestinationDomainStrategy::Instance(), "dstdomain");
74ACL::Prototype ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_, "dstdom_regex");
75ACLStrategised<char const *> ACLDestinationDomain::RegexRegistryEntry_(new ACLRegexData,ACLDestinationDomainStrategy::Instance() ,"dstdom_regex");
76ACL::Prototype ACLDestinationIP::RegistryProtoype(&ACLDestinationIP::RegistryEntry_, "dst");
77ACLDestinationIP ACLDestinationIP::RegistryEntry_;
78ACL::Prototype ACLExtUser::UserRegistryProtoype(&ACLExtUser::UserRegistryEntry_, "ext_user");
79ACLExtUser ACLExtUser::UserRegistryEntry_(new ACLUserData, "ext_user");
80ACL::Prototype ACLExtUser::RegexRegistryProtoype(&ACLExtUser::RegexRegistryEntry_, "ext_user_regex" );
81ACLExtUser ACLExtUser::RegexRegistryEntry_(new ACLRegexData, "ext_user_regex");
82ACL::Prototype ACLHTTPRepHeader::RegistryProtoype(&ACLHTTPRepHeader::RegistryEntry_, "rep_header");
83ACLStrategised<HttpHeader*> ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPRepHeaderStrategy::Instance(), "rep_header");
84ACL::Prototype ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_, "req_header");
85ACLStrategised<HttpHeader*> ACLHTTPReqHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPReqHeaderStrategy::Instance(), "req_header");
86ACL::Prototype ACLHTTPStatus::RegistryProtoype(&ACLHTTPStatus::RegistryEntry_, "http_status");
87ACLHTTPStatus ACLHTTPStatus::RegistryEntry_("http_status");
88ACL::Prototype ACLMaxConnection::RegistryProtoype(&ACLMaxConnection::RegistryEntry_, "maxconn");
89ACLMaxConnection ACLMaxConnection::RegistryEntry_("maxconn");
90ACL::Prototype ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_, "method");
91ACLStrategised<HttpRequestMethod> ACLMethod::RegistryEntry_(new ACLMethodData, ACLMethodStrategy::Instance(), "method");
92ACLMyIP ACLMyIP::RegistryEntry_;
93ACLMyIP const &ACLMyIP::RegistryEntry() {return RegistryEntry_;}
94ACL::Prototype ACLMyPort::RegistryProtoype(&ACLMyPort::RegistryEntry_, "myport");
95ACLStrategised<int> ACLMyPort::RegistryEntry_(new ACLIntRange, ACLMyPortStrategy::Instance(), "myport");
96ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname");
97ACLStrategised<const char *> ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname");
98ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername");
99ACLStrategised<const char *> ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername");
100ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto");
101ACLStrategised<protocol_t> ACLProtocol::RegistryEntry_(new ACLProtocolData, ACLProtocolStrategy::Instance(), "proto");
102ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex");
103ACLStrategised<char const *> ACLReferer::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_REFERER>::Instance(), "referer_regex");
104ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type");
105ACLStrategised<char const *> ACLReplyMIMEType::RegistryEntry_(new ACLRegexData, ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "rep_mime_type");
106ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type");
107ACLStrategised<char const *> ACLRequestMIMEType::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "req_mime_type");
108ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain");
109ACLStrategised<char const *> ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain");
110ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex");
111ACLStrategised<char const *> ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData,ACLSourceDomainStrategy::Instance() ,"srcdom_regex");
112ACL::Prototype ACLSourceIP::RegistryProtoype(&ACLSourceIP::RegistryEntry_, "src");
113ACLSourceIP ACLSourceIP::RegistryEntry_;
114ACL::Prototype ACLTime::RegistryProtoype(&ACLTime::RegistryEntry_, "time");
115ACLStrategised<time_t> ACLTime::RegistryEntry_(new ACLTimeData, ACLTimeStrategy::Instance(), "time");
116ACL::Prototype ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_, "url_regex");
117ACLStrategised<char const *> ACLUrl::RegistryEntry_(new ACLRegexData, ACLUrlStrategy::Instance(), "url_regex");
118ACL::Prototype ACLUrlPath::LegacyRegistryProtoype(&ACLUrlPath::RegistryEntry_, "pattern");
119ACL::Prototype ACLUrlPath::RegistryProtoype(&ACLUrlPath::RegistryEntry_, "urlpath_regex");
120ACLStrategised<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrlPathStrategy::Instance(), "urlpath_regex");
121ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
122ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
123
4d65855c 124#ifdef USE_SSL
af6a12ee
AJ
125ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
126ACLStrategised<int> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
127ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
128ACLStrategised<SSL *> ACLCertificate::UserRegistryEntry_(new ACLCertificateData (sslGetUserAttribute), ACLCertificateStrategy::Instance(), "user_cert");
129ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_, "ca_cert");
130ACLStrategised<SSL *> ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute), ACLCertificateStrategy::Instance(), "ca_cert");
2d46f579
AR
131#endif
132
4d65855c 133#ifdef USE_ARP_ACL
af6a12ee
AJ
134ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp");
135ACLARP ACLARP::RegistryEntry_("arp");
2d46f579
AR
136#endif
137
ee326f02 138#if USE_IDENT
af6a12ee
AJ
139ACL::Prototype ACLIdent::UserRegistryProtoype(&ACLIdent::UserRegistryEntry_, "ident");
140ACLIdent ACLIdent::UserRegistryEntry_(new ACLUserData, "ident");
141ACL::Prototype ACLIdent::RegexRegistryProtoype(&ACLIdent::RegexRegistryEntry_, "ident_regex" );
142ACLIdent ACLIdent::RegexRegistryEntry_(new ACLRegexData, "ident_regex");
2d46f579
AR
143#endif
144
145
abca32cf
CT
146ACL::Prototype ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_, "proxy_auth");
147ACLProxyAuth ACLProxyAuth::UserRegistryEntry_(new ACLUserData, "proxy_auth");
148ACL::Prototype ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_, "proxy_auth_regex" );
149ACLProxyAuth ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData, "proxy_auth_regex");
2d46f579 150
abca32cf
CT
151ACL::Prototype ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_, "max_user_ip");
152ACLMaxUserIP ACLMaxUserIP::RegistryEntry_("max_user_ip");
bb5e7a79
AJ
153
154ACL::Prototype ACLTag::RegistryProtoype(&ACLTag::RegistryEntry_, "tag");
155ACLStrategised<const char *> ACLTag::RegistryEntry_(new ACLStringData, ACLTagStrategy::Instance(), "tag");