AclMaxUserIp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 ACL *clone() const;
25  virtual char const *typeString() const;
26  virtual const Acl::Options &options();
27  virtual void parse();
28  virtual int match(ACLChecklist *cl);
29  virtual SBufList dump() const;
30  virtual bool empty() const;
31  virtual bool valid() const;
32  virtual bool requiresRequest() const {return true;}
33 
34  int getMaximum() const {return maximum;}
35 
36 private:
37  int match(Auth::UserRequest::Pointer auth_user_request, Ip::Address const &src_addr);
38 
39 public:
41 
42 private:
43  char const *class_;
44  int maximum;
45 };
46 
47 #endif /* USE_AUTH */
48 #endif /* SQUID_ACLMAXUSERIP_H */
49 
Definition: Acl.h:39
virtual char const * typeString() const
Definition: AclMaxUserIp.cc:33
ACLMaxUserIP(char const *theClass)
Definition: AclMaxUserIp.cc:21
OptionValue< bool > BooleanOptionValue
Definition: Options.h:132
virtual const Acl::Options & options()
Definition: AclMaxUserIp.cc:51
MEMPROXY_CLASS(ACLMaxUserIP)
virtual void parse()
parses node represenation in squid.conf; dies on failures
Definition: AclMaxUserIp.cc:60
int getMaximum() const
Definition: AclMaxUserIp.h:34
char const * class_
Definition: AclMaxUserIp.h:43
std::list< SBuf > SBufList
Definition: forward.h:26
virtual int match(ACLChecklist *cl)
Matches the actual data in checklist against this ACL.
virtual SBufList dump() const
Acl::BooleanOptionValue beStrict
Enforce "one user, one device" policy?
Definition: AclMaxUserIp.h:40
virtual bool requiresRequest() const
whether our (i.e. shallow) match() requires checklist to have a request
Definition: AclMaxUserIp.h:32
std::map< OptionName, const Option *, OptionNameCmp > Options
name:option map
Definition: Options.h:159
virtual bool empty() const
Definition: AclMaxUserIp.cc:39
virtual bool valid() const
Definition: AclMaxUserIp.cc:45
virtual ACL * clone() const
Definition: AclMaxUserIp.cc:27

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors