ExternalACL.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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 virtual void checkForAsync(ACLChecklist *)const;
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 *);
46
47 virtual char const *typeString() const;
48 virtual void parse();
49 virtual int match(ACLChecklist *checklist);
50 /* This really should be dynamic based on the external class defn */
51 virtual bool requiresAle() const {return true;}
52 virtual bool requiresRequest() const {return true;}
53
54 /* when requiresRequest is made dynamic, review this too */
55 // virtual bool requiresReply() const {return true;}
56 virtual bool isProxyAuth() const;
57 virtual SBufList dump() const;
58 virtual bool valid () const;
59 virtual bool empty () const;
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)
virtual int match(ACLChecklist *checklist)
Matches the actual data in checklist against this ACL.
virtual SBufList dump() const
MEMPROXY_CLASS(ACLExternal)
virtual char const * typeString() const
ACLExternal(char const *)
virtual void parse()
parses node representation in squid.conf; dies on failures
external_acl_data * data
Definition: ExternalACL.h:62
virtual bool requiresAle() const
whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry
Definition: ExternalACL.h:51
virtual bool isProxyAuth() const
virtual bool requiresRequest() const
whether our (i.e. shallow) match() requires checklist to have a request
Definition: ExternalACL.h:52
virtual bool empty() const
static void ExternalAclLookup(ACLChecklist *ch, ACLExternal *)
virtual bool valid() const
char const * class_
Definition: ExternalACL.h:63
Definition: Acl.h:40
virtual void checkForAsync(ACLChecklist *) const
static ExternalACLLookup instance_
Definition: ExternalACL.h:31
static void Start(ACLChecklist *checklist, external_acl_data *acl, bool bg)
static ExternalACLLookup * Instance()
static void LookupDone(void *data, const ExternalACLEntryPointer &result)
Called when an async lookup returns.
static void handler(int signo)
Definition: purge.cc:854
std::list< SBuf > SBufList
Definition: forward.h:23

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors