dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.259 2002/04/01 13:06:28 hno Exp $
+dnl $Id: configure.in,v 1.260 2002/04/04 23:59:25 hno Exp $
dnl
dnl
dnl
AC_CONFIG_AUX_DIR(cfgaux)
AM_INIT_AUTOMAKE(squid, 2.6-DEVEL)
AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.259 $)dnl
+AC_REVISION($Revision: 1.260 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
setsid \
sigaction \
snprintf \
+ socketpair \
srand48 \
srandom \
statfs \
/*
- * $Id: auth_basic.cc,v 1.14 2001/10/24 05:26:12 hno Exp $
+ * $Id: auth_basic.cc,v 1.15 2002/04/04 23:59:26 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
basicauthenticators = helperCreate("basicauthenticator");
basicauthenticators->cmdline = basicConfig->authenticate;
basicauthenticators->n_to_start = basicConfig->authenticateChildren;
- basicauthenticators->ipc_type = IPC_TCP_SOCKET;
+ basicauthenticators->ipc_type = IPC_STREAM;
helperOpenServers(basicauthenticators);
if (!init) {
cachemgrRegister("basicauthenticator",
/*
- * $Id: auth_digest.cc,v 1.11 2002/01/13 01:08:44 robertc Exp $
+ * $Id: auth_digest.cc,v 1.12 2002/04/04 23:59:27 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Robert Collins
digestauthenticators = helperCreate("digestauthenticator");
digestauthenticators->cmdline = digestConfig->authenticate;
digestauthenticators->n_to_start = digestConfig->authenticateChildren;
- digestauthenticators->ipc_type = IPC_TCP_SOCKET;
+ digestauthenticators->ipc_type = IPC_STREAM;
helperOpenServers(digestauthenticators);
if (!init) {
cachemgrRegister("digestauthenticator", "User Authenticator Stats",
/*
- * $Id: auth_ntlm.cc,v 1.18 2002/02/18 23:32:53 hno Exp $
+ * $Id: auth_ntlm.cc,v 1.19 2002/04/04 23:59:27 hno Exp $
*
* DEBUG: section 29 NTLM Authenticator
* AUTHOR: Robert Collins
assert(proxy_auth_cache);
ntlmauthenticators->cmdline = ntlmConfig->authenticate;
ntlmauthenticators->n_to_start = ntlmConfig->authenticateChildren;
- ntlmauthenticators->ipc_type = IPC_TCP_SOCKET;
+ ntlmauthenticators->ipc_type = IPC_STREAM;
ntlmauthenticators->datapool = ntlm_helper_state_pool;
ntlmauthenticators->IsAvailable = authenticateNTLMHelperServerAvailable;
ntlmauthenticators->OnEmptyQueue = authenticateNTLMHelperServerOnEmpty;
/*
- * $Id: defines.h,v 1.99 2002/02/26 15:48:14 adrian Exp $
+ * $Id: defines.h,v 1.100 2002/04/04 23:59:25 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#define IPC_TCP_SOCKET 1
#define IPC_UDP_SOCKET 2
#define IPC_FIFO 3
+#define IPC_UNIX_STREAM 4
+#define IPC_UNIX_DGRAM 5
+
+#if HAVE_SOCKETPAIR && defined (AF_UNIX)
+#define IPC_STREAM IPC_UNIX_STREAM
+#define IPC_DGRAM IPC_UNIX_DGRAM
+#else
+#define IPC_STREAM IPC_TCP_SOCKET
+#define IPC_DGRAM IPC_UDP_SOCKET
+#endif
#define STORE_META_KEY STORE_META_KEY_MD5
/*
- * $Id: dns.cc,v 1.86 2001/03/13 23:22:42 wessels Exp $
+ * $Id: dns.cc,v 1.87 2002/04/04 23:59:25 hno Exp $
*
* DEBUG: section 34 Dnsserver interface
* AUTHOR: Harvest Derived
if (dnsservers == NULL)
dnsservers = helperCreate("dnsserver");
dnsservers->n_to_start = Config.dnsChildren;
- dnsservers->ipc_type = IPC_TCP_SOCKET;
+ dnsservers->ipc_type = IPC_STREAM;
assert(dnsservers->cmdline == NULL);
wordlistAdd(&dnsservers->cmdline, Config.Program.dnsserver);
if (Config.onoff.res_defnames)
/*
- * $Id: store_dir_diskd.cc,v 1.60 2002/04/01 21:53:21 hno Exp $
+ * $Id: store_dir_diskd.cc,v 1.61 2002/04/04 23:59:28 hno Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
args[2] = skey2;
args[3] = skey3;
args[4] = NULL;
-#if HAVE_POLL && defined(_SQUID_OSF_)
- /* pipes and poll() don't get along on DUNIX -DW */
- x = ipcCreate(IPC_TCP_SOCKET,
-#else
- x = ipcCreate(IPC_FIFO,
-#endif
+ x = ipcCreate(IPC_STREAM,
Config.Program.diskd,
args,
"diskd",
/*
- * $Id: icmp.cc,v 1.74 2002/03/31 14:50:21 hno Exp $
+ * $Id: icmp.cc,v 1.75 2002/04/04 23:59:25 hno Exp $
*
* DEBUG: section 37 ICMP Routines
* AUTHOR: Duane Wessels
int wfd;
args[0] = "(pinger)";
args[1] = NULL;
- x = ipcCreate(IPC_UDP_SOCKET,
+ x = ipcCreate(IPC_DGRAM,
Config.Program.pinger,
args,
"Pinger Socket",
return;
assert(rfd == wfd);
icmp_sock = rfd;
+ fd_note(icmp_sock, "pinger");
commSetSelect(icmp_sock, COMM_SELECT_READ, icmpRecv, NULL, 0);
commSetTimeout(icmp_sock, -1, NULL, NULL);
debug(29, 1) ("Pinger socket opened on FD %d\n", icmp_sock);
/*
- * $Id: ipc.cc,v 1.27 2001/12/24 15:33:43 adrian Exp $
+ * $Id: ipc.cc,v 1.28 2002/04/04 23:59:25 hno Exp $
*
* DEBUG: section 54 Interprocess Communication
* AUTHOR: Duane Wessels
fd_open(cwfd = p2c[1], FD_PIPE, "IPC FIFO Child Write");
fd_open(crfd = c2p[0], FD_PIPE, "IPC FIFO Child Read");
fd_open(pwfd = c2p[1], FD_PIPE, "IPC FIFO Parent Write");
+#if HAVE_SOCKETPAIR && defined(AF_UNIX)
+ } else if (type == IPC_UNIX_STREAM) {
+ int fds[2];
+ int buflen = 32768;
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
+ debug(50, 0) ("ipcCreate: socketpair: %s\n", xstrerror());
+ return -1;
+ }
+ setsockopt(fds[0], SOL_SOCKET, SO_SNDBUF, (void *) &buflen, sizeof(buflen));
+ setsockopt(fds[0], SOL_SOCKET, SO_RCVBUF, (void *) &buflen, sizeof(buflen));
+ setsockopt(fds[1], SOL_SOCKET, SO_SNDBUF, (void *) &buflen, sizeof(buflen));
+ setsockopt(fds[1], SOL_SOCKET, SO_RCVBUF, (void *) &buflen, sizeof(buflen));
+ fd_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX STREAM Parent");
+ fd_open(crfd = cwfd = fds[1], FD_PIPE, "IPC UNIX STREAM Parent");
+ } else if (type == IPC_UNIX_DGRAM) {
+ int fds[2];
+ if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds) < 0) {
+ debug(50, 0) ("ipcCreate: socketpair: %s\n", xstrerror());
+ return -1;
+ }
+ fd_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX DGRAM Parent");
+ fd_open(crfd = cwfd = fds[1], FD_PIPE, "IPC UNIX DGRAM Parent");
+#endif
} else {
assert(IPC_NONE);
}
/*
- * $Id: redirect.cc,v 1.88 2001/03/03 10:39:33 hno Exp $
+ * $Id: redirect.cc,v 1.89 2002/04/04 23:59:25 hno Exp $
*
* DEBUG: section 29 Redirector
* AUTHOR: Duane Wessels
redirectors = helperCreate("redirector");
redirectors->cmdline = Config.Program.redirect;
redirectors->n_to_start = Config.redirectChildren;
- redirectors->ipc_type = IPC_TCP_SOCKET;
+ redirectors->ipc_type = IPC_STREAM;
helperOpenServers(redirectors);
if (!init) {
cachemgrRegister("redirector",
/*
- * $Id: unlinkd.cc,v 1.45 2001/12/24 15:33:44 adrian Exp $
+ * $Id: unlinkd.cc,v 1.46 2002/04/04 23:59:26 hno Exp $
*
* DEBUG: section 12 Unlink Daemon
* AUTHOR: Duane Wessels
args[1] = NULL;
#if USE_POLL && defined(_SQUID_OSF_)
/* pipes and poll() don't get along on DUNIX -DW */
- x = ipcCreate(IPC_TCP_SOCKET,
+ x = ipcCreate(IPC_STREAM,
#else
+ /* We currently need to use FIFO.. see below */
x = ipcCreate(IPC_FIFO,
#endif
Config.Program.unlinkd,