Random.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_SRC_ACL_RANDOM_H
10 #define SQUID_SRC_ACL_RANDOM_H
11 
12 #include "acl/Node.h"
13 
14 class ACLRandom : public Acl::Node
15 {
17 
18 public:
19  ACLRandom(char const *);
20  ~ACLRandom() override;
21 
22  char const *typeString() const override;
23  void parse() override;
24  int match(ACLChecklist *checklist) override;
25  SBufList dump() const override;
26  bool empty () const override;
27  bool valid() const override;
28 
29 protected:
30  double data; // value to be exceeded before this ACL will match
31  char pattern[256]; // pattern from config file. Used to generate 'data'
32  char const *class_;
33 };
34 
35 #endif /* SQUID_SRC_ACL_RANDOM_H */
36 
double data
Definition: Random.h:30
std::list< SBuf > SBufList
Definition: forward.h:22
~ACLRandom() override
Definition: Random.cc:25
int match(ACLChecklist *checklist) override
Matches the actual data in checklist against this Acl::Node.
Definition: Random.cc:93
char pattern[256]
Definition: Random.h:31
bool empty() const override
Definition: Random.cc:35
bool valid() const override
Definition: Random.cc:41
const char * typeString() const override
Definition: Random.cc:29
void parse() override
parses node representation in squid.conf; dies on failures
Definition: Random.cc:50
SBufList dump() const override
Definition: Random.cc:109
MEMPROXY_CLASS(ACLRandom)
const char * class_
Definition: Random.h:32
Definition: Node.h:25
ACLRandom(char const *)
Definition: Random.cc:20

 

Introduction

Documentation

Support

Miscellaneous