fi
])
-use_carp=1
-AC_ARG_ENABLE(carp,
-[ --disable-carp Disable CARP support],
-[ if test "$enableval" = "no" ; then
- echo "CARP disabled"
- use_carp=0
- fi
-])
-if test $use_carp = 1; then
- AC_DEFINE(USE_CARP, 1, [Cache Array Routing Protocol])
-fi
-
AC_ARG_ENABLE(async-io,
[ --enable-async-io[=N_THREADS]
Shorthand for
USE_ARP_ACL \
USE_ASYNC_IO \
USE_CACHE_DIGESTS \
- USE_CARP \
USE_CLASSFUL \
USE_DLMALLOC \
USE_DNSSERVERS \
} else if (!strcasecmp(token, "no-netdb-exchange")) {
p->options.no_netdb_exchange = 1;
-#if USE_CARP
} else if (!strcasecmp(token, "carp")) {
if (p->type != PEER_PARENT)
p->options.carp = 1;
-#endif
#if DELAY_POOLS
} else if (!strcasecmp(token, "no-delay")) {
#include "CacheManager.h"
#include "Store.h"
-#if USE_CARP
-
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
static int n_carp_peers = 0;
sumfetches ? (double) p->stats.fetches / sumfetches : -1.0);
}
}
-
-#endif
CD_PARENT_HIT,
CD_SIBLING_HIT,
#endif
-#if USE_CARP
CARP,
-#endif
ANY_OLD_PARENT,
HIER_MAX
} hier_code;
asnInit();
ACL::Initialize();
peerSelectInit();
-#if USE_CARP
carpInit();
-#endif
}
void
"CD_PARENT_HIT",
"CD_SIBLING_HIT",
#endif
-#if USE_CARP
"CARP",
-#endif
"ANY_PARENT",
"INVALID CODE"
};
if ((p = getDefaultParent(request))) {
code = DEFAULT_PARENT;
-#if USE_CARP
-
} else if ((p = carpSelectParent(request))) {
code = CARP;
-#endif
-
} else if ((p = getRoundRobinParent(request))) {
code = ROUNDROBIN_PARENT;
} else if ((p = getWeightedRoundRobinParent(request))) {
SQUIDCEXTERN const char *internalHostname(void);
SQUIDCEXTERN int internalHostnameIs(const char *);
-#if USE_CARP
SQUIDCEXTERN void carpInit(void);
extern void carpRegisterWithCacheManager(CacheManager & manager);
SQUIDCEXTERN peer *carpSelectParent(HttpRequest *);
-#endif
#if USE_LEAKFINDER
unsigned int no_delay:1;
#endif
unsigned int allow_miss:1;
-#if USE_CARP
unsigned int carp:1;
-#endif
unsigned int originserver:1;
} options;
int rr_lastcount;
peer *next;
int test_fd;
-#if USE_CARP
struct
{
double load_multiplier;
double load_factor; /* normalized weight value */
} carp;
-#endif
char *login; /* Proxy authorization */
time_t connect_timeout;