--- /dev/null
+#ifndef SQUID_ACL_ACLNAMELIST_H_
+#define SQUID_ACL_ACLNAMELIST_H_
+/*
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#include "defines.h"
+//TODO: convert to a std::list<string>
+class AclNameList {
+public:
+ char name[ACL_NAME_SZ];
+ AclNameList *next;
+};
+
+#endif /* SQUID_ACLNAMELIST_H_ */
#include "squid.h"
#include "acl/Acl.h"
+#include "acl/AclNameList.h"
#include "acl/Checklist.h"
#include "acl/Strategised.h"
#include "acl/Gadgets.h"
debugs(28, 8, HERE << "got called for " << name);
for (A = *head; A; A = A->next) {
- acl_name_list *L = NULL;
+ AclNameList *L = NULL;
if (!redirect_allowed && strchr(A->err_page_name, ':') ) {
debugs(28, 8, HERE << "Skip '" << A->err_page_name << "' 30x redirects not allowed as response here.");
acl_deny_info_list *A = NULL;
acl_deny_info_list *B = NULL;
acl_deny_info_list **T = NULL;
- acl_name_list *L = NULL;
- acl_name_list **Tail = NULL;
+ AclNameList *L = NULL;
+ AclNameList **Tail = NULL;
/* first expect a page name */
Tail = &A->acl_list;
while ((t = strtok(NULL, w_space))) {
- L = (acl_name_list *)memAllocate(MEM_ACL_NAME_LIST);
+ L = (AclNameList *)memAllocate(MEM_ACL_NAME_LIST);
xstrncpy(L->name, t, ACL_NAME_SZ);
*Tail = L;
Tail = &L->next;
{
acl_deny_info_list *a = NULL;
acl_deny_info_list *a_next = NULL;
- acl_name_list *l = NULL;
- acl_name_list *l_next = NULL;
+ AclNameList *l = NULL;
+ AclNameList *l_next = NULL;
debugs(28, 8, "aclDestroyDenyInfoList: invoked");
UserData.cc \
UserData.h \
\
+ AclNameList.h \
Gadgets.cc \
Gadgets.h
#include "squid.h"
#include "acl/Acl.h"
+#include "acl/AclNameList.h"
#include "acl/Gadgets.h"
#include "acl/MethodData.h"
#include "anyp/PortCfg.h"
static void
dump_denyinfo(StoreEntry * entry, const char *name, acl_deny_info_list * var)
{
- acl_name_list *a;
+ AclNameList *a;
while (var != NULL) {
storeAppendPrintf(entry, "%s %s", name, var->err_page_name);
{
acl_deny_info_list *a = NULL;
acl_deny_info_list *a_next = NULL;
- acl_name_list *l = NULL;
- acl_name_list *l_next = NULL;
+ AclNameList *l = NULL;
+ AclNameList *l_next = NULL;
for (a = *list; a; a = a_next) {
for (l = a->acl_list; l; l = l_next) {
*/
#include "squid.h"
-#include "event.h"
+#include "acl/AclNameList.h"
#include "ClientInfo.h"
-#include "Mem.h"
+#include "event.h"
#include "md5.h"
+#include "Mem.h"
#include "MemBuf.h"
#include "memMeter.h"
#include "mgr/Registration.h"
memDataInit(MEM_64K_BUF, "64K Buffer", 65536, 10, false);
memDataInit(MEM_ACL_DENY_INFO_LIST, "acl_deny_info_list",
sizeof(acl_deny_info_list), 0);
- memDataInit(MEM_ACL_NAME_LIST, "acl_name_list", sizeof(acl_name_list), 0);
+ memDataInit(MEM_ACL_NAME_LIST, "acl_name_list", sizeof(AclNameList), 0);
#if USE_CACHE_DIGESTS
memDataInit(MEM_CACHE_DIGEST, "CacheDigest", sizeof(CacheDigest), 0);
#ifndef SQUID_STRUCTS_H
#define SQUID_STRUCTS_H
-#include "RefCount.h"
+#include "acl/AclNameList.h"
#include "cbdata.h"
#include "defines.h"
#include "dlink.h"
#include "err_type.h"
#include "hash.h"
#include "ip/Address.h"
+#include "RefCount.h"
/* needed for the global config */
#include "HttpHeader.h"
#define PEER_MULTICAST_SIBLINGS 1
-struct acl_name_list {
- char name[ACL_NAME_SZ];
- acl_name_list *next;
-};
-
struct acl_deny_info_list {
err_type err_page_id;
char *err_page_name;
- acl_name_list *acl_list;
+ AclNameList *acl_list;
acl_deny_info_list *next;
};