ExternalACL.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_EXTERNALACL_H
10#define SQUID_EXTERNALACL_H
11
12#include "acl/Checklist.h"
13#include "base/RefCount.h"
14
15class external_acl;
17class StoreEntry;
18
20{
21
22public:
24 void checkForAsync(ACLChecklist *)const override;
25
26 // If possible, starts an asynchronous lookup of an external ACL.
27 // Otherwise, asserts (or bails if background refresh is requested).
28 static void Start(ACLChecklist *checklist, external_acl_data *acl, bool bg);
29
30private:
32 static void LookupDone(void *data, const ExternalACLEntryPointer &result);
33};
34
35#include "acl/Acl.h"
36
37class ACLExternal : public ACL
38{
40
41public:
42 static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *);
43
44 ACLExternal(char const *);
45 ~ACLExternal() override;
46
47 char const *typeString() const override;
48 void parse() override;
49 int match(ACLChecklist *checklist) override;
50 /* This really should be dynamic based on the external class defn */
51 bool requiresAle() const override {return true;}
52 bool requiresRequest() const override {return true;}
53
54 /* when requiresRequest is made dynamic, review this too */
55 // virtual bool requiresReply() const {return true;}
56 bool isProxyAuth() const override;
57 SBufList dump() const override;
58 bool valid () const override;
59 bool empty () const override;
60
61protected:
63 char const *class_;
64};
65
67void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *);
69typedef void EAH(void *data, const ExternalACLEntryPointer &result);
70void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data);
71void externalAclInit(void);
72void externalAclShutdown(void);
73
74#endif /* SQUID_EXTERNALACL_H */
75
void externalAclInit(void)
void parse_externalAclHelper(external_acl **)
void dump_externalAclHelper(StoreEntry *sentry, const char *name, const external_acl *)
void free_externalAclHelper(external_acl **)
void externalAclLookup(ACLChecklist *ch, void *acl_data, EAH *handler, void *data)
void EAH(void *data, const ExternalACLEntryPointer &result)
Definition: ExternalACL.h:69
void externalAclShutdown(void)
bool empty() const override
bool isProxyAuth() const override
MEMPROXY_CLASS(ACLExternal)
ACLExternal(char const *)
bool requiresRequest() const override
whether our (i.e. shallow) match() requires checklist to have a request
Definition: ExternalACL.h:52
external_acl_data * data
Definition: ExternalACL.h:62
~ACLExternal() override
bool requiresAle() const override
whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry
Definition: ExternalACL.h:51
char const * typeString() const override
static void ExternalAclLookup(ACLChecklist *ch, ACLExternal *)
bool valid() const override
int match(ACLChecklist *checklist) override
Matches the actual data in checklist against this ACL.
void parse() override
parses node representation in squid.conf; dies on failures
SBufList dump() const override
char const * class_
Definition: ExternalACL.h:63
Definition: Acl.h:46
static ExternalACLLookup instance_
Definition: ExternalACL.h:31
static void Start(ACLChecklist *checklist, external_acl_data *acl, bool bg)
static ExternalACLLookup * Instance()
void checkForAsync(ACLChecklist *) const override
static void LookupDone(void *data, const ExternalACLEntryPointer &result)
Called when an async lookup returns.
static void handler(int signo)
Definition: purge.cc:858
std::list< SBuf > SBufList
Definition: forward.h:23

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors