*/
#include "squid.h"
+#include "acl/AclSizeLimit.h"
#include "acl/FilledChecklist.h"
#include "globals.h"
#include "HttpBody.h"
#include "SquidTime.h"
#include "Store.h"
#include "StrList.h"
-#include "structs.h"
/* local constants */
ACLFilledChecklist ch(NULL, &request, NULL);
ch.reply = HTTPMSGLOCK(this); // XXX: this lock makes method non-const
- for (acl_size_t *l = Config.ReplyBodySize; l; l = l -> next) {
+ for (AclSizeLimit *l = Config.ReplyBodySize; l; l = l -> next) {
/* if there is no ACL list or if the ACLs listed match use this size value */
if (!l->aclList || ch.fastCheck(l->aclList) == ACCESS_ALLOWED) {
debugs(58, 4, HERE << "bodySizeMax=" << bodySizeMax);
#include "squid.h"
#include "AccessLogEntry.h"
+#include "acl/AclSizeLimit.h"
#include "acl/FilledChecklist.h"
#include "client_side.h"
#include "DnsLookupDetails.h"
ch.src_addr = client_addr;
ch.my_addr = my_addr;
- for (acl_size_t *l = Config.rangeOffsetLimit; l; l = l -> next) {
+ for (AclSizeLimit *l = Config.rangeOffsetLimit; l; l = l -> next) {
/* if there is no ACL list or if the ACLs listed match use this limit value */
if (!l->aclList || ch.fastCheck(l->aclList) == ACCESS_ALLOWED) {
debugs(58, 4, HERE << "rangeOffsetLimit=" << rangeOffsetLimit);
StoreSwapLogData.h \
Server.cc \
Server.h \
- structs.h \
swap_log_op.h \
SwapDir.cc \
SwapDir.h \
## mem.cc wants ClientInfo.h
## libbase.la wants cbdata.*
## libbase.la wants MemBuf.*
-## structs.h wants HelperChildConfig.* (stub it)
ufsdump_SOURCES = \
ClientInfo.h \
cbdata.h \
tests_test_http_range_DEPENDENCIES = \
$(SQUID_CPPUNIT_LA)
-
tests_testHttpParser_SOURCES = \
Debug.h \
HttpParser.cc \
Mem.h \
mem.cc \
String.cc \
- structs.h \
cache_cf.h \
YesNoNone.h \
tests/stub_cache_cf.cc \
#endif
class acl_access;
-class acl_size_t;
+class AclSizeLimit;
class AclDenyInfoList;
namespace Mgr {
class ActionPasswordList;
int64_t maxChunkedRequestBodySize;
size_t maxRequestBufferSize;
size_t maxReplyHeaderSize;
- acl_size_t *ReplyBodySize;
+ AclSizeLimit *ReplyBodySize;
struct {
unsigned short icp;
} comm_incoming;
int max_open_disk_fds;
int uri_whitespace;
- acl_size_t *rangeOffsetLimit;
+ AclSizeLimit *rangeOffsetLimit;
#if MULTICAST_MISS_STREAM
struct {
+#ifndef SQUID_ACLSIZELIMIT_H_
+#define SQUID_ACLSIZELIMIT_H_
/*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
*
*/
-#ifndef SQUID_STRUCTS_H
-#define SQUID_STRUCTS_H
-
-#include "defines.h"
-#include "typedefs.h"
class ACLList;
-
-struct acl_size_t {
- acl_size_t *next;
+/// representation of a class of Size-limit ACLs
+// a POD. TODO: convert to new ACL framework
+class AclSizeLimit {
+public:
+ AclSizeLimit *next;
ACLList *aclList;
int64_t size;
};
-// POD
-class dwrite_q
-{
-public:
- off_t file_offset;
- char *buf;
- size_t len;
- size_t buf_offset;
- dwrite_q *next;
- FREE *free_func;
-};
-
-struct _fde_disk {
- DWCB *wrt_handle;
- void *wrt_handle_data;
- dwrite_q *write_q;
- dwrite_q *write_q_tail;
- off_t offset;
-};
-
-#endif /* SQUID_STRUCTS_H */
+#endif /* SQUID_ACLSIZELIMIT_H_ */
Strategy.h \
Strategised.cc \
Strategised.h \
- \
FilledChecklist.cc \
FilledChecklist.h \
AclAddress.h \
Time.h \
TimeData.cc \
TimeData.h \
- \
Asn.cc \
Asn.h \
Browser.cc \
UrlPort.h \
UserData.cc \
UserData.h \
- \
AclNameList.h \
AclDenyInfoList.h \
Gadgets.cc \
- Gadgets.h
+ Gadgets.h \
+ AclSizeLimit.h
## Add conditional sources
## TODO: move these to their respectful dirs when those dirs are created
#include "acl/AclAddress.h"
#include "acl/AclDenyInfoList.h"
#include "acl/AclNameList.h"
+#include "acl/AclSizeLimit.h"
#include "acl/Gadgets.h"
#include "acl/MethodData.h"
#include "anyp/PortCfg.h"
#include "ssl/ProxyCerts.h"
#include "Store.h"
#include "StoreFileSystem.h"
-#include "structs.h"
#include "SwapDir.h"
#include "wordlist.h"
#include "neighbors.h"
}
#endif /* SO_MARK */
-CBDATA_TYPE(acl_size_t);
+CBDATA_TYPE(AclSizeLimit);
static void
-dump_acl_b_size_t(StoreEntry * entry, const char *name, acl_size_t * head)
+dump_acl_b_size_t(StoreEntry * entry, const char *name, AclSizeLimit * head)
{
- acl_size_t *l;
+ AclSizeLimit *l;
for (l = head; l; l = l->next) {
if (l->size != -1)
static void
freed_acl_b_size_t(void *data)
{
- acl_size_t *l = static_cast<acl_size_t *>(data);
+ AclSizeLimit *l = static_cast<AclSizeLimit *>(data);
aclDestroyAclList(&l->aclList);
}
static void
-parse_acl_b_size_t(acl_size_t ** head)
+parse_acl_b_size_t(AclSizeLimit ** head)
{
- acl_size_t *l;
- acl_size_t **tail = head; /* sane name below */
+ AclSizeLimit *l;
+ AclSizeLimit **tail = head; /* sane name below */
- CBDATA_INIT_TYPE_FREECB(acl_size_t, freed_acl_b_size_t);
+ CBDATA_INIT_TYPE_FREECB(AclSizeLimit, freed_acl_b_size_t);
- l = cbdataAlloc(acl_size_t);
+ l = cbdataAlloc(AclSizeLimit);
parse_b_int64_t(&l->size);
}
static void
-free_acl_b_size_t(acl_size_t ** head)
+free_acl_b_size_t(AclSizeLimit ** head)
{
while (*head) {
- acl_size_t *l = *head;
+ AclSizeLimit *l = *head;
*head = l->next;
l->next = NULL;
cbdataFree(l);
#include "typedefs.h"
class MemBuf;
-// POD
+// POD
class dread_ctrl
{
public:
void *client_data;
};
+// POD
+class dwrite_q
+{
+public:
+ off_t file_offset;
+ char *buf;
+ size_t len;
+ size_t buf_offset;
+ dwrite_q *next;
+ FREE *free_func;
+};
int file_open(const char *path, int mode);
void file_close(int fd);
#define SQUID_FDE_H
#include "comm.h"
+#include "defines.h"
#include "ip/Address.h"
-#include "structs.h"
#if USE_SSL
#include <openssl/ssl.h>
#if USE_DELAY_POOLS
class ClientInfo;
#endif
+
class PconnPool;
+class dwrite_q;
+class _fde_disk {
+public:
+ DWCB *wrt_handle;
+ void *wrt_handle_data;
+ dwrite_q *write_q;
+ dwrite_q *write_q_tail;
+ off_t offset;
+};
class fde
{
#include "hier_code.h"
#include "ip/forward.h"
-#include "structs.h"
#if HAVE_LIBNETFILTER_CONNTRACK_LIBNETFILTER_CONNTRACK_H
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
class fde;
// TODO: move to new ACL framework
+// not integrated in namespace, as this class uses a strange CBDATA definition
// POD
class acl_tos {
public:
tos_t tos;
};
// TODO: move to new ACL framework
+// not integrated in namespace, as this class uses a strange CBDATA definition
// POD
class acl_nfmark {
public:
nfmark_t nfmark;
};
-
namespace Ip
{
#include "SquidTime.h"
#include "Store.h"
#include "StoreEntryStream.h"
-#include "structs.h"
#if HAVE_IOMANIP
#include <iomanip>