Gadgets.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_GADGETS_H
10 #define SQUID_SRC_ACL_GADGETS_H
11 
12 #include "acl/forward.h"
13 #include "error/forward.h"
14 #include "sbuf/forward.h"
15 
16 #include <optional>
17 #include <sstream>
18 
19 class ConfigParser;
20 class dlink_list;
21 class StoreEntry;
22 class wordlist;
23 
25 void aclDestroyAccessList(acl_access **list);
27 void aclDestroyAclList(ACLList **);
28 
30 void aclParseAccessLine(const char *directive, ConfigParser &, acl_access **);
31 
35 size_t aclParseAclList(ConfigParser &, ACLList **, const char *label);
36 
38 template <class Any>
39 inline size_t
40 aclParseAclList(ConfigParser &parser, ACLList ** const tree, const Any any)
41 {
42  std::ostringstream buf;
43  buf << any;
44  return aclParseAclList(parser, tree, buf.str().c_str());
45 }
46 
49 bool aclIsProxyAuth(const std::optional<SBuf> &name);
50 
53 err_type FindDenyInfoPage(const Acl::Answer &, bool allowCustomStatus);
54 
62 void aclCacheMatchFlush(dlink_list * cache);
64 void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head);
66 void dump_acl_list(StoreEntry * entry, ACLList * head);
67 
68 namespace Acl {
74 const Tree &ToTree(const TreePointer *cfg);
75 }
76 
77 #endif /* SQUID_SRC_ACL_GADGETS_H */
78 
Definition: Acl.cc:33
RefCount< Acl::Tree > TreePointer
reconfiguration-safe storage of ACL rules
Definition: forward.h:38
err_type
Definition: forward.h:14
void aclParseAccessLine(const char *directive, ConfigParser &, acl_access **)
Parses a single line of a "action followed by acls" directive (e.g., http_access).
Definition: Gadgets.cc:132
size_t aclParseAclList(ConfigParser &, ACLList **, const char *label)
Definition: Gadgets.cc:184
void aclDestroyDenyInfoList(AclDenyInfoList **)
Definition: Gadgets.cc:236
wordlist * aclDumpGeneric(const Acl::Node *)
void dump_acl_access(StoreEntry *entry, const char *name, acl_access *head)
Definition: cache_cf.cc:1511
void aclCacheMatchFlush(dlink_list *cache)
Definition: Acl.cc:425
void aclDestroyAccessList(acl_access **list)
Definition: Gadgets.cc:223
void dump_acl_list(StoreEntry *entry, ACLList *head)
Definition: cache_cf.cc:1503
err_type FindDenyInfoPage(const Acl::Answer &, bool allowCustomStatus)
Definition: Gadgets.cc:34
squidaio_request_t * head
Definition: aiops.cc:127
Definition: Node.h:25
bool aclIsProxyAuth(const std::optional< SBuf > &name)
Definition: Gadgets.cc:62
const Tree & ToTree(const TreePointer *cfg)
Definition: Gadgets.cc:123
void aclDestroyAclList(ACLList **)
Definition: Gadgets.cc:214
void aclParseDenyInfoLine(AclDenyInfoList **)
Definition: Gadgets.cc:88
deny_info representation. Currently a POD.

 

Introduction

Documentation

Support

Miscellaneous