Squid Web Cache master
Loading...
Searching...
No Matches
Random.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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
14class ACLRandom : public Acl::Node
15{
17
18public:
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
29protected:
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
bool valid() const override
Definition Random.cc:41
~ACLRandom() override
Definition Random.cc:25
bool empty() const override
Definition Random.cc:35
int match(ACLChecklist *checklist) override
Matches the actual data in checklist against this Acl::Node.
Definition Random.cc:93
void parse() override
parses node representation in squid.conf; dies on failures
Definition Random.cc:50
char const * class_
Definition Random.h:32
SBufList dump() const override
Definition Random.cc:109
MEMPROXY_CLASS(ACLRandom)
char pattern[256]
Definition Random.h:31
char const * typeString() const override
Definition Random.cc:29
std::list< SBuf > SBufList
Definition forward.h:23