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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors