]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
reamed acl_address to AclAddress and moved it to own file in acl/
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 5 Sep 2012 19:54:09 +0000 (21:54 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 5 Sep 2012 19:54:09 +0000 (21:54 +0200)
src/SquidConfig.h
src/acl/AclAddress.cc [new file with mode: 0644]
src/acl/AclAddress.h [new file with mode: 0644]
src/acl/Makefile.am
src/cache_cf.cc
src/forward.cc
src/structs.h

index 1983dcf3b26a5b84e395960710c3050c95d3f2da..d2daaf97a1ec92b76db364faeb9c9c5d5ef7183f 100644 (file)
@@ -32,6 +32,7 @@
  *
  */
 
+#include "acl/AclAddress.h"
 #include "ClientDelayConfig.h"
 #include "DelayConfig.h"
 #include "HttpHeaderTools.h"
@@ -371,7 +372,7 @@ public:
 #endif
         acl_access *redirector;
         acl_access *reply;
-        acl_address *outgoing_address;
+        AclAddress *outgoing_address;
 #if USE_HTCP
 
         acl_access *htcp;
diff --git a/src/acl/AclAddress.cc b/src/acl/AclAddress.cc
new file mode 100644 (file)
index 0000000..9818d68
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * 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 "squid.h"
+#include "AclAddress.h"
+
+//TODO: fill in
diff --git a/src/acl/AclAddress.h b/src/acl/AclAddress.h
new file mode 100644 (file)
index 0000000..2f598b6
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef ACLADDRESS_H_
+#define ACLADDRESS_H_
+#include "Acl.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 "ip/Address.h"
+#include "acl/Acl.h"
+
+struct AclAddress {
+    AclAddress *next;
+    ACLList *aclList;
+
+    Ip::Address addr;
+};
+
+#endif /* ACLADDRESS_H_ */
index 500018d89cfab04ba53e1959880118c02fa2bcc9..f9a4e54b768b75886240cfa6688c70a01805016f 100644 (file)
@@ -19,7 +19,9 @@ libstate_la_SOURCES = \
        Strategised.h \
        \
        FilledChecklist.cc \
-       FilledChecklist.h
+       FilledChecklist.h \
+       AclAddress.h \
+       AclAddress.cc
 
 ## data-specific ACLs
 libacls_la_SOURCES = \
index c847a9c324bb458083b6feadd1213faeaa5760bf..d2b9617394295bbda5c7a4a6da4faa1bb69b66be 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "squid.h"
 #include "acl/Acl.h"
+#include "acl/AclAddress.h"
 #include "acl/AclDenyInfoList.h"
 #include "acl/AclNameList.h"
 #include "acl/Gadgets.h"
@@ -1364,13 +1365,13 @@ free_address(Ip::Address *addr)
     addr->SetEmpty();
 }
 
-CBDATA_TYPE(acl_address);
+CBDATA_TYPE(AclAddress);
 
 static void
-dump_acl_address(StoreEntry * entry, const char *name, acl_address * head)
+dump_acl_address(StoreEntry * entry, const char *name, AclAddress * head)
 {
     char buf[MAX_IPSTRLEN];
-    acl_address *l;
+    AclAddress *l;
 
     for (l = head; l; l = l->next) {
         if (!l->addr.IsAnyAddr())
@@ -1387,17 +1388,17 @@ dump_acl_address(StoreEntry * entry, const char *name, acl_address * head)
 static void
 freed_acl_address(void *data)
 {
-    acl_address *l = static_cast<acl_address *>(data);
+    AclAddress *l = static_cast<AclAddress *>(data);
     aclDestroyAclList(&l->aclList);
 }
 
 static void
-parse_acl_address(acl_address ** head)
+parse_acl_address(AclAddress ** head)
 {
-    acl_address *l;
-    acl_address **tail = head; /* sane name below */
-    CBDATA_INIT_TYPE_FREECB(acl_address, freed_acl_address);
-    l = cbdataAlloc(acl_address);
+    AclAddress *l;
+    AclAddress **tail = head;  /* sane name below */
+    CBDATA_INIT_TYPE_FREECB(AclAddress, freed_acl_address);
+    l = cbdataAlloc(AclAddress);
     parse_address(&l->addr);
     aclParseAclList(LegacyParser, &l->aclList);
 
@@ -1408,10 +1409,10 @@ parse_acl_address(acl_address ** head)
 }
 
 static void
-free_acl_address(acl_address ** head)
+free_acl_address(AclAddress ** head)
 {
     while (*head) {
-        acl_address *l = *head;
+        AclAddress *l = *head;
         *head = l->next;
         cbdataFree(l);
     }
index 471f5be26ce6344163745eb6271bf6e35f7b01cc..f8b1a42b30bc44074e3d71052f44c98b5dfe8501 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "squid.h"
 #include "AccessLogEntry.h"
+#include "acl/AclAddress.h"
 #include "acl/FilledChecklist.h"
 #include "acl/Gadgets.h"
 #include "anyp/PortCfg.h"
@@ -1423,7 +1424,7 @@ getOutgoingAddress(HttpRequest * request, Comm::ConnectionPointer conn)
     // TODO use the connection details in ACL.
     // needs a bit of rework in ACLFilledChecklist to use Comm::Connection instead of ConnStateData
 
-    acl_address *l;
+    AclAddress *l;
     for (l = Config.accessList.outgoing_address; l; l = l->next) {
 
         /* check if the outgoing address is usable to the destination */
index 2d59eb2a392e4008e1729a081ee03eeaa63034ad..127448988e76d2e016f68ed069fe782334bc8aba 100644 (file)
@@ -68,13 +68,6 @@ public:
 
 class ACLList;
 
-struct acl_address {
-    acl_address *next;
-    ACLList *aclList;
-
-    Ip::Address addr;
-};
-
 struct acl_tos {
     acl_tos *next;
     ACLList *aclList;