ExternalACL.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 
15 class external_acl;
16 class external_acl_data;
17 class StoreEntry;
18 
20 {
21 
22 public:
23  static ExternalACLLookup *Instance();
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 
30 private:
32  static void LookupDone(void *data, const ExternalACLEntryPointer &result);
33 };
34 
35 #include "acl/Acl.h"
36 
37 class ACLExternal : public ACL
38 {
40 
41 public:
42  static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *);
43 
44  ACLExternal(char const *);
45  ACLExternal(ACLExternal const &);
46  ~ACLExternal();
48 
49  virtual ACL *clone()const;
50  virtual char const *typeString() const;
51  virtual void parse();
52  virtual int match(ACLChecklist *checklist);
53  /* This really should be dynamic based on the external class defn */
54  virtual bool requiresAle() const {return true;}
55  virtual bool requiresRequest() const {return true;}
56 
57  /* when requiresRequest is made dynamic, review this too */
58  // virtual bool requiresReply() const {return true;}
59  virtual bool isProxyAuth() const;
60  virtual SBufList dump() const;
61  virtual bool valid () const;
62  virtual bool empty () const;
63 
64 protected:
66  char const *class_;
67 };
68 
70 void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *);
72 typedef void EAH(void *data, const ExternalACLEntryPointer &result);
73 void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data);
74 void externalAclInit(void);
75 void externalAclShutdown(void);
76 
77 #endif /* SQUID_EXTERNALACL_H */
78 
static ExternalACLLookup instance_
Definition: ExternalACL.h:31
virtual bool isProxyAuth() const
void externalAclShutdown(void)
void parse_externalAclHelper(external_acl **)
virtual void parse()
parses node represenation in squid.conf; dies on failures
ACLExternal(char const *)
virtual SBufList dump() const
Definition: Acl.h:39
ACLExternal & operator=(ACLExternal const &)
static void Start(ACLChecklist *checklist, external_acl_data *acl, bool bg)
virtual bool empty() const
virtual int match(ACLChecklist *checklist)
Matches the actual data in checklist against this ACL.
virtual bool valid() const
void const char HLPCB void * data
Definition: stub_helper.cc:16
void externalAclInit(void)
virtual char const * typeString() const
virtual bool requiresAle() const
whether our (i.e. shallow) match() requires checklist to have a AccessLogEntry
Definition: ExternalACL.h:54
virtual ACL * clone() const
virtual bool requiresRequest() const
whether our (i.e. shallow) match() requires checklist to have a request
Definition: ExternalACL.h:55
static void handler(int signo)
Definition: purge.cc:860
void dump_externalAclHelper(StoreEntry *sentry, const char *name, const external_acl *)
std::list< SBuf > SBufList
Definition: forward.h:26
char const * class_
Definition: ExternalACL.h:66
void free_externalAclHelper(external_acl **)
external_acl_data * data
Definition: ExternalACL.h:65
virtual void checkForAsync(ACLChecklist *) const
static void ExternalAclLookup(ACLChecklist *ch, ACLExternal *)
static void LookupDone(void *data, const ExternalACLEntryPointer &result)
Called when an async lookup returns.
MEMPROXY_CLASS(ACLExternal)
static ExternalACLLookup * Instance()
void EAH(void *data, const ExternalACLEntryPointer &result)
Definition: ExternalACL.h:72
void externalAclLookup(ACLChecklist *ch, void *acl_data, EAH *handler, void *data)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors