AclMaxUserIp.h
Go to the documentation of this file.
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_ACLMAXUSERIP_H
10 #define SQUID_ACLMAXUSERIP_H
11 
12 #if USE_AUTH
13 
14 #include "acl/Acl.h"
15 #include "auth/UserRequest.h"
16 
17 class ACLMaxUserIP : public ACL
18 {
20 
21 public:
22  explicit ACLMaxUserIP(char const *theClass);
23 
24  virtual char const *typeString() const;
25  virtual const Acl::Options &options();
26  virtual void parse();
27  virtual int match(ACLChecklist *cl);
28  virtual SBufList dump() const;
29  virtual bool empty() const;
30  virtual bool valid() const;
31  virtual bool requiresRequest() const {return true;}
32 
33  int getMaximum() const {return maximum;}
34 
35 private:
36  int match(Auth::UserRequest::Pointer auth_user_request, Ip::Address const &src_addr);
37 
38 public:
40 
41 private:
42  char const *class_;
43  int maximum;
44 };
45 
46 #endif /* USE_AUTH */
47 #endif /* SQUID_ACLMAXUSERIP_H */
48 
OptionValue< bool > BooleanOptionValue
Definition: Options.h:200
virtual const Acl::Options & options()
Definition: AclMaxUserIp.cc:45
virtual char const * typeString() const
Definition: AclMaxUserIp.cc:27
virtual bool requiresRequest() const
whether our (i.e. shallow) match() requires checklist to have a request
Definition: AclMaxUserIp.h:31
std::vector< const Option * > Options
Definition: Options.h:214
virtual bool valid() const
Definition: AclMaxUserIp.cc:39
std::list< SBuf > SBufList
Definition: forward.h:22
virtual SBufList dump() const
virtual bool empty() const
Definition: AclMaxUserIp.cc:33
virtual int match(ACLChecklist *cl)
Matches the actual data in checklist against this ACL.
ACLMaxUserIP(char const *theClass)
Definition: AclMaxUserIp.cc:21
Acl::BooleanOptionValue beStrict
Enforce "one user, one device" policy?
Definition: AclMaxUserIp.h:39
Definition: Acl.h:40
int getMaximum() const
Definition: AclMaxUserIp.h:33
MEMPROXY_CLASS(ACLMaxUserIP)
virtual void parse()
parses node representation in squid.conf; dies on failures
Definition: AclMaxUserIp.cc:54
char const * class_
Definition: AclMaxUserIp.h:42

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors